# HG changeset patch # User Mikael Berthe # Date 1178107255 -7200 # Node ID 2fea9969b088ee55466d1c10c9cf1e8072292c35 # Parent 1439873e9c35cedf6826f2610c9a5f37153bd9f6 WTF: Do not answer in public places when no answer was found diff -r 1439873e9c35 -r 2fea9969b088 plugins/wtf_plugin.py --- a/plugins/wtf_plugin.py Wed May 02 13:50:07 2007 +0200 +++ b/plugins/wtf_plugin.py Wed May 02 14:00:55 2007 +0200 @@ -9,14 +9,19 @@ word = parameters.upper() + "\t" if not parameters: - smsg(type, source, "Gimme an acronym!") + if type == 'private': + smsg(type, source, "Gimme an acronym!") return reply = ''.join(line for line in file(WTF_FILE) \ if line.startswith(word)) if not reply: - reply = "Sorry, I don't know what " + parameters + " means..." + if type == 'private': + reply = "Sorry, I don't know what " + parameters + \ + " means..." + else: + return else: reply= re.sub("\t+", ": ", reply.rstrip())