add reload command to detect plugin changes

pull/2/head
Mallory Hancock 2017-10-16 10:34:35 -07:00
parent 3a148ae34f
commit 1be0f47983
1 changed files with 3 additions and 0 deletions

View File

@ -97,6 +97,9 @@ class Bot(irc.bot.SingleServerIRCBot):
helplist = sorted([i for i in self.cmds])
msg = ', '.join(helplist)
c.privmsg(chan, 'Available commands: {}'.format(msg))
elif cmd == '!reload' and nick in self.ops:
self.load_plugins()
c.privmsg(chan, 'Plugins reloaded')
elif cmd in self.cmds:
try:
output = self.cmds[cmd](Message(