3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-25 20:22:45 +01:00

coreplugin: log successful operups to INFO

TODO: Investigate why this doesn't work on charybdis/TS6...
This commit is contained in:
James Lu 2015-10-23 19:08:03 -07:00
parent 5ff82274e4
commit 5bccfcd170

View File

@ -111,6 +111,11 @@ def handle_mode(irc, source, command, args):
irc.proto.modeServer(irc.sid, target, {('+o', None)}) irc.proto.modeServer(irc.sid, target, {('+o', None)})
utils.add_hook(handle_mode, 'MODE') utils.add_hook(handle_mode, 'MODE')
def handle_operup(irc, source, command, args):
"""Logs successful oper-ups on networks."""
log.info("(%s) Successful oper-up (opertype %r) from %s", irc.name, args.get('text'), utils.getHostmask(irc, source))
utils.add_hook(handle_operup, 'PYLINK_CLIENT_OPERED')
# Essential, core commands go here so that the "commands" plugin with less-important, # Essential, core commands go here so that the "commands" plugin with less-important,
# but still generic functions can be reloaded. # but still generic functions can be reloaded.