summaryrefslogtreecommitdiff
path: root/plugins/pacokick.py
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/pacokick.py')
-rw-r--r--plugins/pacokick.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/plugins/pacokick.py b/plugins/pacokick.py
index bf6bd844..4ec9d0af 100644
--- a/plugins/pacokick.py
+++ b/plugins/pacokick.py
@@ -17,21 +17,26 @@ from poezio.tabs import MucTab
from poezio.plugin import BasePlugin
+
class Plugin(BasePlugin):
def init(self):
- self.api.add_command('pacokick', self.command_kick,
- usage='',
- help='Kick a random user.',
- short='Kick a random user')
+ self.api.add_command(
+ 'pacokick',
+ self.command_kick,
+ usage='',
+ help='Kick a random user.',
+ short='Kick a random user')
def command_kick(self, arg):
tab = self.api.current_tab()
if isinstance(tab, MucTab):
- kickable = list(filter(lambda x: x.affiliation in ('none', 'member'), tab.users))
+ kickable = list(
+ filter(lambda x: x.affiliation in ('none', 'member'),
+ tab.users))
if kickable:
to_kick = choice(kickable)
if to_kick:
to_kick = to_kick.nick
- tab.command_kick(to_kick + ' ' +arg)
+ tab.command_kick(to_kick + ' ' + arg)
else:
self.api.information('No one to kick :(', 'Info')