DrBotIRC: bring reply() back to the base server, for use in alias
This commit is contained in:
parent
395d436008
commit
d50b0867e8
19
DrBotIRC.py
19
DrBotIRC.py
@ -384,6 +384,25 @@ class DrBotIRC(irclib.IRC):
|
|||||||
self._xmlrpc_shutdown()
|
self._xmlrpc_shutdown()
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
|
def reply(self, connection, event, replystr, stop_responding=False):
|
||||||
|
"""Reply over IRC to replypath or return a string with the reply."""
|
||||||
|
|
||||||
|
replypath = event.target()
|
||||||
|
|
||||||
|
# check for privmsg
|
||||||
|
if replypath == connection.get_nickname():
|
||||||
|
replypath = irclib.nm_to_n(event.source())
|
||||||
|
|
||||||
|
if replystr is not None:
|
||||||
|
if event._recursing:
|
||||||
|
return replystr
|
||||||
|
else:
|
||||||
|
replies = replystr.split('\n')
|
||||||
|
for reply in replies:
|
||||||
|
connection.privmsg(replypath, reply)
|
||||||
|
if stop_responding:
|
||||||
|
return "NO MORE"
|
||||||
|
|
||||||
def save_modules(self):
|
def save_modules(self):
|
||||||
for module in self.modlist:
|
for module in self.modlist:
|
||||||
module.save()
|
module.save()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user