Let's make threaded commands tag the message as replied from the start, so things like Infobot won't respond.

This commit is contained in:
Jeremy Fincher 2004-09-30 05:29:26 +00:00
parent e803bc1e0a
commit c20d3cafbd

View File

@ -607,6 +607,12 @@ class IrcObjectProxy(RichReplyMethods):
def _callCommand(self, name, cb): def _callCommand(self, name, cb):
try: try:
self.commandMethod = cb.getCommand(name) self.commandMethod = cb.getCommand(name)
if not world.isMainThread():
# If we're a threaded command, we may not reply quickly enough
# to prevent regexp stuff from running. So we do this to make
# sure it doesn't happen. Neither way (tagging or not tagging)
# is perfect, but this seems better than not tagging.
self.msg.tag('repliedTo')
try: try:
cb.callCommand(name, self, self.msg, self.args) cb.callCommand(name, self, self.msg, self.args)
except Error, e: except Error, e: