Pārlūkot izejas kodu

PM forward filter

tBKwtWS 7 gadi atpakaļ
vecāks
revīzija
ac9da6aa30
1 mainītis faili ar 4 papildinājumiem un 1 dzēšanām
  1. 4 1
      irc/bot.py

+ 4 - 1
irc/bot.py

@@ -122,7 +122,10 @@ class PyRot(irc.bot.SingleServerIRCBot):
         commands.admin.do_command(self, connection, event)
         commands.statistics.do_command(self, connection, event)
         commands.games.do_command(self, connection, event)
-        Inform.owners(self, connection, "PM from " + red + red + event.source.nick + grey + ": " + reset + event.arguments[0] + ".")
+        if not event.source == connection.get_nickname():
+            if event.arguemnts[0] == "Password authentication required for that command.":
+                return
+            Inform.owners(self, connection, "PM from " + red + red + event.source.nick + grey + ": " + reset + event.arguments[0] + ".")
     
     def on_pubnotice(self, connection, event):
         log.info(event)