Skip to content

Commit

Permalink
make emergency reload work in privmsg
Browse files Browse the repository at this point in the history
  • Loading branch information
pefoley2 committed Apr 26, 2015
1 parent e1b1c0c commit e2cbe6e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions helpers/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def __init__(self, botconfig):
super().__init__([serverinfo], nick, nick, connect_factory=factory, reconnection_interval=5)
# This does the magic when everything else is dead
self.connection.add_global_handler("pubmsg", self.reload_handler, -30)
self.connection.add_global_handler("privmsg", self.reload_handler, -30)
self.connection.add_global_handler("all_events", self.handle_event, 10)
# We need to get the channels that a nick is currently in before the regular quit event is processed.
self.connection.add_global_handler("quit", self.handle_quit, -21)
Expand Down Expand Up @@ -145,8 +146,6 @@ def is_reload(self, e):

def reload_handler(self, c, e):
"""This handles reloads."""
if e.type not in ['pubmsg', 'privmsg']:
return
cmd = self.is_reload(e)
cmdchar = self.config['core']['cmdchar']
if cmd is not None:
Expand Down

0 comments on commit e2cbe6e

Please sign in to comment.