Add setting to prevent sending a random quote on quit
This commit is contained in:
parent
63418dc0f3
commit
0f09184e48
1 changed files with 5 additions and 3 deletions
|
@ -11,9 +11,11 @@ class Module(object):
|
||||||
self.bot.events.on("signal").on("interrupt").call(signum=signum, frame=frame)
|
self.bot.events.on("signal").on("interrupt").call(signum=signum, frame=frame)
|
||||||
|
|
||||||
for server in self.bot.servers.values():
|
for server in self.bot.servers.values():
|
||||||
quote = self.bot.events.on("get.quit-quote"
|
reason = "Leaving"
|
||||||
).call_for_result(default="Leaving")
|
if server.get_setting("quit-quote", True):
|
||||||
server.send_quit(quote)
|
reason = self.bot.events.on("get.quit-quote"
|
||||||
|
).call_for_result(default="Leaving")
|
||||||
|
server.send_quit(reason)
|
||||||
self.bot.register_write(server)
|
self.bot.register_write(server)
|
||||||
|
|
||||||
self.bot.running = False
|
self.bot.running = False
|
||||||
|
|
Loading…
Reference in a new issue