From 5bccfcd17045fddc177b4f86745366803f0b0057 Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 23 Oct 2015 19:08:03 -0700 Subject: [PATCH] coreplugin: log successful operups to INFO TODO: Investigate why this doesn't work on charybdis/TS6... --- coreplugin.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/coreplugin.py b/coreplugin.py index 1e94c5d..d167603 100644 --- a/coreplugin.py +++ b/coreplugin.py @@ -111,6 +111,11 @@ def handle_mode(irc, source, command, args): irc.proto.modeServer(irc.sid, target, {('+o', None)}) 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, # but still generic functions can be reloaded.