Made the bot not respond to himself when he gets something that's not a command.

This commit is contained in:
Jeremy Fincher 2003-09-10 18:52:12 +00:00
parent 335addc623
commit 7dfdef787a

View File

@ -45,6 +45,7 @@ import textwrap
import conf
import debug
import utils
import world
import ircmsgs
import ircutils
import privmsgs
@ -55,7 +56,7 @@ class MiscCommands(callbacks.Privmsg):
# This exists to be able to respond to attempts to command the bot
# with a "That's not a command!" if the proper conf.variable is set.
callbacks.Privmsg.doPrivmsg(self, irc, msg)
if conf.replyWhenNotCommand:
if conf.replyWhenNotCommand and msg.nick != irc.nick:
s = callbacks.addressed(irc.nick, msg)
if s:
tokens = callbacks.tokenize(s)