@@ -35,11 +35,6 @@ def initModule(cod):
3535 cod .join = join
3636 cod .burstClient = burstClient
3737
38- cod .loadmod ("help" )
39- cod .loadmod ("admin" )
40-
41- cod .terminator = "\n "
42-
4338 cod .s2scommands ["UID" ] = [handleUID ]
4439 cod .s2scommands ["QUIT" ] = [handleQUIT ]
4540 cod .s2scommands ["FJOIN" ] = [handleSJOIN ]
@@ -53,6 +48,7 @@ def initModule(cod):
5348 cod .s2scommands ["STATS" ] = [handleSTATS ]
5449 cod .s2scommands ["PING" ] = [handlePING ]
5550 cod .s2scommands ["SERVER" ] = [handleSERVER ]
51+ cod .s2scommands ["ENDBURST" ] = [handleENDBURST ]
5652
5753 cod .s2scommands ["PRIVMSG" ].append (handlePRIVMSG )
5854
@@ -74,6 +70,7 @@ def destroyModule(cod):
7470 del cod .s2scommands ["STATS" ]
7571 del cod .s2scommands ["PING" ]
7672 del cod .s2scommands ["SERVER" ]
73+ del cod .s2scommands ["ENDBURST" ]
7774
7875 cod .s2scommands ["PRIVMSG" ].remove (handlePRIVMSG )
7976
@@ -83,16 +80,16 @@ def rehash():
8380 pass
8481
8582# Monkey-patch join because inspircd is weird
86- def join (self , channel , client = None ):
83+ def join (cod , channel , client = None ):
8784 if client is None :
88- client = self .client
85+ client = cod .client
8986
90- if channel not in self .channels :
91- self .channels [channel ] = Channel (channel , int (time .time ()))
87+ if channel not in cod .channels :
88+ cod .channels [channel ] = Channel (channel , int (time .time ()))
9289
93- channel = self .channels [channel ]
90+ channel = cod .channels [channel ]
9491
95- self .sendLine (":%s FJOIN %s %s + ,%s" % (cod .sid , channel .name , channel .ts ,
92+ cod .sendLine (":%s FJOIN %s %s + ,%s" % (cod .sid , channel .name , channel .ts ,
9693 client .uid ))
9794
9895def burstClient (cod , nick , user , host , real , uid = None ):
@@ -115,6 +112,15 @@ def login(cod):
115112 cod .sendLine ("ENDBURST" )
116113 cod .bursted = True
117114
115+ def handleENDBURST (cod , line ):
116+ cod .loadmod ("admin" )
117+ cod .loadmod ("help" )
118+
119+ cod .join (cod , cod .config ["etc" ]["staffchan" ])
120+ cod .join (cod , cod .config ["etc" ]["snoopchan" ])
121+
122+ cod .privmsg ("NickServ" , "IDENTIFY %s" % cod .config ["me" ]["servicespass" ])
123+
118124def nullCommand (cod , line ):
119125 pass
120126
@@ -313,7 +319,5 @@ def handlePING(cod, line):
313319 the connection it came from. Don't ask why, just do.
314320 """
315321
316- cod .sendLine (":%s PONG %s :%s" %
317- (cod .config ["uplink" ]["sid" ], cod .config ["me" ]["name" ],
318- line .source ))
322+ cod .sendLine (":%s PONG %s %s" % (cod .sid , line .source , cod .sid ))
319323
0 commit comments