Services: Update 'identified' state using SASL status

Otherwise features like auto-opping are permanently unavailable when using
SASL instead of NickServ IDENTIFY
This commit is contained in:
Valentin Lorentz 2023-08-29 22:49:18 +02:00
parent 5357f50bed
commit acad80296a

View File

@ -372,6 +372,30 @@ class Services(callbacks.Plugin):
self.log.info('Received notice from NickServ %s: %q.', on, self.log.info('Received notice from NickServ %s: %q.', on,
ircutils.stripFormatting(msg.args[1])) ircutils.stripFormatting(msg.args[1]))
def do903(self, irc, msg): # RPL_SASLSUCCESS
if self.disabled(irc):
return
state = self._getState(irc)
state.identified = True
for channel in irc.state.channels.keys():
self.checkPrivileges(irc, channel)
if irc.state.fsm in [irclib.IrcStateFsm.CONNECTED,
irclib.IrcStateFsm.CONNECTED_SASL]:
for channel in state.channels:
irc.queueMsg(networkGroup.channels.join(channel))
waitingJoins = state.waitingJoins
state.waitingJoins = []
for join in waitingJoins:
irc.sendMsg(join)
do907 = do903 # ERR_SASLALREADY, just to be sure we didn't miss it
def do901(self, irc, msg): # RPL_LOGGEDOUT
if self.disabled(irc):
return
state = self._getState(irc)
state.identified = False
def checkPrivileges(self, irc, channel): def checkPrivileges(self, irc, channel):
if self.disabled(irc): if self.disabled(irc):
return return