WTF: Do not answer in public places when no answer was found
authorMikael Berthe <mikael@lilotux.net>
Wed, 02 May 2007 14:00:55 +0200
changeset 21 2fea9969b088
parent 20 1439873e9c35
child 22 3f031ac4c71b
WTF: Do not answer in public places when no answer was found
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())