seen: this shouldn't do anything w/privmsg

This commit is contained in:
Brian S. Stephan 2015-06-18 10:34:02 -05:00
parent b3da273b2d
commit ae0f56cd58
1 changed files with 2 additions and 4 deletions

View File

@ -21,9 +21,8 @@ class Seen(Plugin):
"""Hook handler functions into the IRC library."""
self.connection.add_global_handler('pubmsg', self.handle_seeing)
self.connection.add_global_handler('privmsg', self.handle_seeing)
self.connection.reactor.add_global_regex_handler(['pubmsg', 'privmsg'], r'^!seen\s+(\S+)$', self.handle_seen)
self.connection.reactor.add_global_regex_handler(['pubmsg'], r'^!seen\s+(\S+)$', self.handle_seen)
super(Seen, self).start()
@ -31,9 +30,8 @@ class Seen(Plugin):
"""Unhook handler functions into the IRC library."""
self.connection.remove_global_handler('pubmsg', self.handle_seeing)
self.connection.remove_global_handler('privmsg', self.handle_seeing)
self.connection.reactor.remove_global_regex_handler(['pubmsg', 'privmsg'], self.handle_seen)
self.connection.reactor.remove_global_regex_handler(['pubmsg'], self.handle_seen)
super(Seen, self).stop()