summaryrefslogtreecommitdiff
path: root/plugins/regex_admin.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2018-08-15 13:13:17 +0200
committermathieui <mathieui@mathieui.net>2018-08-15 13:13:17 +0200
commit6e13b8b73572f9c0ac9b5c683b98a475afbeab38 (patch)
tree7dae86588339a8cf144b2d98c9280f28646341a9 /plugins/regex_admin.py
parentd1b624753bb5371cf287cc9d86bb685593a99315 (diff)
downloadpoezio-6e13b8b73572f9c0ac9b5c683b98a475afbeab38.tar.gz
poezio-6e13b8b73572f9c0ac9b5c683b98a475afbeab38.tar.bz2
poezio-6e13b8b73572f9c0ac9b5c683b98a475afbeab38.tar.xz
poezio-6e13b8b73572f9c0ac9b5c683b98a475afbeab38.zip
yapf -rip on plugins
Diffstat (limited to 'plugins/regex_admin.py')
-rw-r--r--plugins/regex_admin.py29
1 files changed, 16 insertions, 13 deletions
diff --git a/plugins/regex_admin.py b/plugins/regex_admin.py
index b5ca3581..befbcac2 100644
--- a/plugins/regex_admin.py
+++ b/plugins/regex_admin.py
@@ -25,25 +25,29 @@ Those commands take a regular expression (as defined in the
.. _re module documentation: http://docs.python.org/3/library/re.html
"""
-
from poezio.plugin import BasePlugin
from poezio.tabs import MucTab
import re
+
class Plugin(BasePlugin):
def init(self):
- self.api.add_tab_command(MucTab, 'rkick',
- self.command_rkick,
- usage='<regex>',
- help='Kick occupants of a room according to a regex',
- short='Regex Kick')
-
- self.api.add_tab_command(MucTab, 'rban',
- self.command_rban,
- usage='<regex>',
- help='Ban occupants of a room according to a regex',
- short='Regex Ban')
+ self.api.add_tab_command(
+ MucTab,
+ 'rkick',
+ self.command_rkick,
+ usage='<regex>',
+ help='Kick occupants of a room according to a regex',
+ short='Regex Kick')
+
+ self.api.add_tab_command(
+ MucTab,
+ 'rban',
+ self.command_rban,
+ usage='<regex>',
+ help='Ban occupants of a room according to a regex',
+ short='Regex Ban')
def return_users(self, users, regex):
try:
@@ -69,4 +73,3 @@ class Plugin(BasePlugin):
users = self.return_users(tab.users, regex)
for user in users:
tab.command_kick(user.nick)
-