put check for pubmsg vs. privmsg in Module.reply() rather than a method where it achieved nothing
This commit is contained in:
parent
fca716af9e
commit
752515a628
10
Module.py
10
Module.py
@ -93,14 +93,9 @@ class Module(object):
|
|||||||
|
|
||||||
nick = irclib.nm_to_n(event.source())
|
nick = irclib.nm_to_n(event.source())
|
||||||
userhost = irclib.nm_to_uh(event.source())
|
userhost = irclib.nm_to_uh(event.source())
|
||||||
replypath = event.target()
|
|
||||||
what = event.arguments()[0]
|
what = event.arguments()[0]
|
||||||
admin_unlocked = False
|
admin_unlocked = False
|
||||||
|
|
||||||
# privmsg
|
|
||||||
if replypath == connection.get_nickname():
|
|
||||||
replypath = nick
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if userhost == self.config.get('dr.botzo', 'admin_userhost'):
|
if userhost == self.config.get('dr.botzo', 'admin_userhost'):
|
||||||
admin_unlocked = True
|
admin_unlocked = True
|
||||||
@ -121,6 +116,11 @@ class Module(object):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
replypath = event.target()
|
replypath = event.target()
|
||||||
|
|
||||||
|
# check for privmsg
|
||||||
|
if replypath == connection.get_nickname():
|
||||||
|
replypath = irclib.nm_to_n(event.source())
|
||||||
|
|
||||||
if replystr is not None:
|
if replystr is not None:
|
||||||
if replypath is None:
|
if replypath is None:
|
||||||
return replystr
|
return replystr
|
||||||
|
Loading…
x
Reference in New Issue
Block a user