Don't override "!google", only "!google ..."

This commit is contained in:
Terence Simpson
2011-02-12 15:47:54 +00:00
parent edf17bfbb5
commit 8e1ff7fe95

View File

@ -476,7 +476,7 @@ class Encyclopedia(callbacks.Plugin):
elif term[0] == "seen" or term[0].startswith("seen "): # Some people expect a '!seen <nick>' command
ret = "I have no seen command"
retmsg = term[2] and "%s: " % msg.prefix.split('!', 1)[0] or '' # Redirect back at the caller, rather than the target
elif term[0] == "google" or term[0].startswith("google "): # Some poeple expect a '!google <term...>' command
elif term[0].startswith("google "): # Some poeple expect a '!google <term...>' command
ret = "I have no google command, use http://www.google.com/"
retmsg = term[2] and "%s: " % msg.prefix.split('!', 1)[0] or '' # Redirect back at the caller, rather than the taget
elif term[0] in ("what", "whats", "what's") or term[0].startswith("what ") or term[0].startswith("what ") or term[0].startswith("whats ") or term[0].startswith("what's "): # Try and catch people saying "ubottu: what is ...?"