3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 01:09:22 +01:00

ts6: re-add some of the ircd traffic examples

This commit is contained in:
James Lu 2016-04-07 18:23:21 -07:00
parent fb74179f58
commit abcf3b6082

View File

@ -137,6 +137,8 @@ class TS6Protocol(TS6BaseProtocol):
def mode(self, numeric, target, modes, ts=None): def mode(self, numeric, target, modes, ts=None):
"""Sends mode changes from a PyLink client/server.""" """Sends mode changes from a PyLink client/server."""
# c <- :0UYAAAAAA TMODE 0 #a +o 0T4AAAAAC
# u <- :0UYAAAAAA MODE 0UYAAAAAA :-Facdefklnou
if (not self.irc.isInternalClient(numeric)) and \ if (not self.irc.isInternalClient(numeric)) and \
(not self.irc.isInternalServer(numeric)): (not self.irc.isInternalServer(numeric)):
@ -421,6 +423,7 @@ class TS6Protocol(TS6BaseProtocol):
def handle_sjoin(self, servernumeric, command, args): def handle_sjoin(self, servernumeric, command, args):
"""Handles incoming SJOIN commands.""" """Handles incoming SJOIN commands."""
# parameters: channelTS, channel, simple modes, opt. mode parameters..., nicklist # parameters: channelTS, channel, simple modes, opt. mode parameters..., nicklist
# <- :0UY SJOIN 1451041566 #channel +nt :@0UYAAAAAB
channel = utils.toLower(self.irc, args[1]) channel = utils.toLower(self.irc, args[1])
userlist = args[-1].split() userlist = args[-1].split()
their_ts = int(args[0]) their_ts = int(args[0])
@ -464,6 +467,7 @@ class TS6Protocol(TS6BaseProtocol):
def handle_join(self, numeric, command, args): def handle_join(self, numeric, command, args):
"""Handles incoming channel JOINs.""" """Handles incoming channel JOINs."""
# parameters: channelTS, channel, '+' (a plus sign) # parameters: channelTS, channel, '+' (a plus sign)
# <- :0UYAAAAAF JOIN 0 #channel +
ts = int(args[0]) ts = int(args[0])
if args[0] == '0': if args[0] == '0':
# /join 0; part the user from all channels # /join 0; part the user from all channels
@ -556,6 +560,7 @@ class TS6Protocol(TS6BaseProtocol):
def handle_tmode(self, numeric, command, args): def handle_tmode(self, numeric, command, args):
"""Handles incoming TMODE commands (channel mode change).""" """Handles incoming TMODE commands (channel mode change)."""
# <- :42XAAAAAB TMODE 1437450768 #test -c+lkC 3 agte4 # <- :42XAAAAAB TMODE 1437450768 #test -c+lkC 3 agte4
# <- :0UYAAAAAD TMODE 0 #a +h 0UYAAAAAD
channel = utils.toLower(self.irc, args[1]) channel = utils.toLower(self.irc, args[1])
oldobj = self.irc.channels[channel].deepcopy() oldobj = self.irc.channels[channel].deepcopy()
modes = args[2:] modes = args[2:]