Skip to content

Commit

Permalink
Services: Update 'identified' state using SASL status
Browse files Browse the repository at this point in the history
Otherwise features like auto-opping are permanently unavailable when using
SASL instead of NickServ IDENTIFY
  • Loading branch information
progval committed Aug 29, 2023
1 parent 5357f50 commit acad802
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions plugins/Services/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,30 @@ def doNickservNotice(self, irc, msg):
self.log.info('Received notice from NickServ %s: %q.', on,
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):
if self.disabled(irc):
return
Expand Down

0 comments on commit acad802

Please sign in to comment.