(Probabbly) fixed a bug in get_quote.py

master
Stefan Krulj 12 years ago
parent 060cefcd46
commit 97ffefbc2f
  1. 4
      modules/active/get_quote.py

@ -74,11 +74,11 @@ def search_wiki(code,term):
return results return results
def quote(msg,args): def quote(msg,args):
if len(args)!=2: if len(args)!=2 or len(args)!=3:
brathuhn.sendMsg(brathuhn.ROOM,"Usage: "+args[0]+" language (two letter code) [topic]",'groupchat') brathuhn.sendMsg(brathuhn.ROOM,"Usage: "+args[0]+" language (two letter code) [topic]",'groupchat')
else: else:
try: try:
if args==2: if len(args)==2:
brathuhn.sendMsg(brathuhn.ROOM,'fetching random page...','groupchat') brathuhn.sendMsg(brathuhn.ROOM,'fetching random page...','groupchat')
url = "http://"+args[1][0:2]+".wikiquote.org/wiki/Special:Random" url = "http://"+args[1][0:2]+".wikiquote.org/wiki/Special:Random"
else: else:

Loading…
Cancel
Save