add reload command to detect plugin changes
parent
3a148ae34f
commit
1be0f47983
|
@ -97,6 +97,9 @@ class Bot(irc.bot.SingleServerIRCBot):
|
||||||
helplist = sorted([i for i in self.cmds])
|
helplist = sorted([i for i in self.cmds])
|
||||||
msg = ', '.join(helplist)
|
msg = ', '.join(helplist)
|
||||||
c.privmsg(chan, 'Available commands: {}'.format(msg))
|
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:
|
elif cmd in self.cmds:
|
||||||
try:
|
try:
|
||||||
output = self.cmds[cmd](Message(
|
output = self.cmds[cmd](Message(
|
||||||
|
|
Loading…
Reference in New Issue