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

coreplugin: ignore services' attempts to send accountname before user introduction

This happens in the case of SASL on InspIRCd+atheme, for example.
This commit is contained in:
James Lu 2016-03-04 12:22:17 -08:00
parent 1ce2725f1e
commit 4df027cac4

View File

@ -137,7 +137,12 @@ utils.add_hook(handle_operup, 'CLIENT_OPERED')
def handle_services_login(irc, source, command, args):
"""Sets services login status for users."""
irc.users[source].services_account = args['text']
try:
irc.users[source].services_account = args['text']
except KeyError: # User doesn't exist
log.debug("(%s) Ignoring early account name setting for %s (UID hasn't been sent yet)", irc.name, source)
utils.add_hook(handle_services_login, 'CLIENT_SERVICES_LOGIN')
# Essential, core commands go here so that the "commands" plugin with less-important,