diff --git a/plugins/automode.py b/plugins/automode.py index 1120fc7..6a541a8 100644 --- a/plugins/automode.py +++ b/plugins/automode.py @@ -232,3 +232,4 @@ def handle_services_login(irc, source, command, args): match(irc, channel, source) utils.add_hook(handle_services_login, 'CLIENT_SERVICES_LOGIN') +utils.add_hook(handle_services_login, 'PYLINK_RELAY_SERVICES_LOGIN') diff --git a/plugins/relay.py b/plugins/relay.py index 1276ae0..0568b30 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -1313,6 +1313,15 @@ def handle_endburst(irc, numeric, command, args): initializeAll(irc) utils.add_hook(handle_endburst, "ENDBURST") +def handle_services_login(irc, numeric, command, args): + """ + Relays services account changes as a hook, for integration with plugins like Automode. + """ + for netname, user in relayusers[(irc.name, numeric)].items(): + remoteirc = world.networkobjects[netname] + remoteirc.callHooks([user, 'PYLINK_RELAY_SERVICES_LOGIN', args]) +utils.add_hook(handle_services_login, 'CLIENT_SERVICES_LOGIN') + def handle_disconnect(irc, numeric, command, args): """Handles IRC network disconnections (internal hook).""" # Quit all of our users' representations on other nets, and remove