put check for pubmsg vs. privmsg in Module.reply() rather than a method where it achieved nothing

This commit is contained in:
Brian S. Stephan 2011-02-17 12:07:41 -06:00
parent fca716af9e
commit 752515a628
1 changed files with 5 additions and 5 deletions

View File

@ -93,14 +93,9 @@ class Module(object):
nick = irclib.nm_to_n(event.source())
userhost = irclib.nm_to_uh(event.source())
replypath = event.target()
what = event.arguments()[0]
admin_unlocked = False
# privmsg
if replypath == connection.get_nickname():
replypath = nick
try:
if userhost == self.config.get('dr.botzo', 'admin_userhost'):
admin_unlocked = True
@ -121,6 +116,11 @@ class Module(object):
"""
replypath = event.target()
# check for privmsg
if replypath == connection.get_nickname():
replypath = irclib.nm_to_n(event.source())
if replystr is not None:
if replypath is None:
return replystr