Skip to content
This repository was archived by the owner on Feb 21, 2018. It is now read-only.

Commit d4cfb75

Browse files
committed
Fix JOIN syntax for irc daemons that take channel name as the first param
1 parent cbb1a1f commit d4cfb75

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

modules/protocol/elemental-ircd.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
def initModule(cod):
3636
cod.loginFunc = login
3737
cod.burstClient = burstClient
38+
cod.tsSecond = False
3839

3940
cod.s2scommands["EUID"] = [handleEUID]
4041
cod.s2scommands["QUIT"] = [handleQUIT]

modules/protocol/inspircd.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232

3333
def initModule(cod):
3434
cod.loginFunc = login
35-
cod.join = join
3635
cod.burstClient = burstClient
36+
cod.tsSecond = True
3737

3838
cod.s2scommands["UID"] = [handleUID]
3939
cod.s2scommands["QUIT"] = [handleQUIT]
@@ -120,8 +120,8 @@ def handleENDBURST(cod, line):
120120
cod.loadmod("admin")
121121
cod.loadmod("help")
122122

123-
cod.join(cod, cod.config["etc"]["staffchan"])
124-
cod.join(cod, cod.config["etc"]["snoopchan"])
123+
cod.join(cod.config["etc"]["staffchan"])
124+
cod.join(cod.config["etc"]["snoopchan"])
125125

126126
cod.privmsg("NickServ", "IDENTIFY %s" % cod.config["me"]["servicespass"])
127127

src/cod.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,10 @@ def join(self, channel, client=None):
364364

365365
channel = self.channels[channel]
366366

367-
self.sendLine(client.join(channel))
367+
if self.tsSecond:
368+
self.sendLine(":%s JOIN %s %s" % (client.uid, channel.name, channel.ts))
369+
else:
370+
self.sendLine(client.join(channel))
368371

369372
client.channels.append(channel.name)
370373

0 commit comments

Comments
 (0)