]> kaliko git repositories - sid.git/blobdiff - sid/echo.py
Some cleanup and reformatting.
[sid.git] / sid / echo.py
index 534163c378c95df65e0ad888786c4c5481ccbf29..90ccd900dfc42ff9a2956d21b6220cd547a1a513 100644 (file)
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 
 # Copyright (C) 2007-2012 Thomas Perl <thp.io/about>
-# Copyright (C) 2014 kaliko <kaliko@azylum.org>
+# Copyright (C) 2014, 2020 kaliko <kaliko@azylum.org>
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,6 +17,7 @@
 
 from .plugin import Plugin, botcmd
 
+
 class Echo(Plugin):
     """Drop a message to be sent when someone gets online.
     """
@@ -30,7 +31,8 @@ class Echo(Plugin):
         # any presences you send yourself. To limit event handling
         # to a single room, use the events muc::room@server::presence,
         # muc::room@server::got_online, or muc::room@server::got_offline.
-        bot.add_event_handler("muc::%s::presence" %    self.bot.room, self.log_presence)
+        bot.add_event_handler("muc::%s::presence" %
+                              self.bot.room, self.log_presence)
 
     def log_presence(self, pres):
         """Register presence"""
@@ -43,7 +45,7 @@ class Echo(Plugin):
                 self.send(self.bot.room,
                           self.inbox.get(nick).pop(),
                           mtype='groupchat')
-            self.inbox.pop(nick)
+                self.inbox.pop(nick)
 
     @botcmd
     def tell(self, message, args):