mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +01:00
clientbot: don't send JOIN hooks for the bot itself when receiving JOIN
Closes #519.
This commit is contained in:
parent
96c89b13b1
commit
c2fc9080cc
@ -828,18 +828,17 @@ class ClientbotWrapperProtocol(IRCCommonProtocol):
|
|||||||
"""
|
"""
|
||||||
# <- :GL|!~GL@127.0.0.1 JOIN #whatever
|
# <- :GL|!~GL@127.0.0.1 JOIN #whatever
|
||||||
channel = args[0]
|
channel = args[0]
|
||||||
|
self.channels[channel].users.add(source)
|
||||||
|
self.users[source].channels.add(channel)
|
||||||
|
|
||||||
# Only fetch modes, TS, and user hosts once we're actually in the channel.
|
# Only fetch modes, TS, and user hosts once we're actually in the channel.
|
||||||
# The IRCd will send us a JOIN with our nick!user@host if our JOIN succeeded.
|
# The IRCd will send us a JOIN with our nick!user@host if our JOIN succeeded.
|
||||||
if self.pseudoclient and source == self.pseudoclient.uid:
|
if self.pseudoclient and source == self.pseudoclient.uid:
|
||||||
self.send('MODE %s' % channel)
|
self.send('MODE %s' % channel)
|
||||||
self._send_who(channel)
|
self._send_who(channel)
|
||||||
|
else:
|
||||||
self.channels[channel].users.add(source)
|
self.call_hooks([source, 'CLIENTBOT_JOIN', {'channel': channel}])
|
||||||
self.users[source].channels.add(channel)
|
return {'channel': channel, 'users': [source], 'modes': self.channels[channel].modes}
|
||||||
|
|
||||||
self.call_hooks([source, 'CLIENTBOT_JOIN', {'channel': channel}])
|
|
||||||
return {'channel': channel, 'users': [source], 'modes': self.channels[channel].modes}
|
|
||||||
|
|
||||||
def handle_kick(self, source, command, args):
|
def handle_kick(self, source, command, args):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user