Parcourir la source

rejoin after kick fixed

tBKwtWS il y a 7 ans
Parent
commit
a515dd4bd3
3 fichiers modifiés avec 4 ajouts et 2 suppressions
  1. 2 1
      commands/statistics.py
  2. 1 0
      common/do_everything_to.py
  3. 1 1
      events/on_kick.py

+ 2 - 1
commands/statistics.py

@@ -1,5 +1,6 @@
 from common import log
 from commands.common import CommandHelpers as CH
+
 bold = "\x02"
 italic = "\x1D"
 underline = "\x1F"
@@ -23,7 +24,7 @@ def do_command(self, connection, event):
                 return
             connection.privmsg(replyto, "Displays a list of commands.")
         elif cmdtype == "cmd":
-            connection.privmsg(replyto, grey + "Statistics commands: " + CH.ccc(self, "joins") + CH.ccc(self, "kicks")[:-2] + ".")
+            connection.privmsg(replyto, grey + "Statistics commands: " + CH.ccc(self, "joins") + CH.ccc(self, "kicks") + CH.ccc(self, "")[:-2] + ".")
     
     
     elif command.split()[0] == "joins" or command.split()[0] == "kicks":

+ 1 - 0
common/do_everything_to.py

@@ -15,6 +15,7 @@ def join(self, connection, channel, key=False):
     elif knownkey:
         connection.join(channel, key)
     else:
+        print("executing join " + channel)
         connection.join(channel)
 
 def unban(connection, channel, user, mask):

+ 1 - 1
events/on_kick.py

@@ -98,7 +98,7 @@ def process_event(self, connection, event):
         # Rejoin if bot was kicked.
         if kicked == connection.get_nickname():
             print("Rejoining " + channel)
-            do_everything_to.join(self, connection, self.homechannel)
+            do_everything_to.join(self, connection, channel)
         
         if event.source.nick == connection.get_nickname() or self.channels[self.homechannel].is_owner(kicker):
             print("Stop if offender is bot or owner")