summaryrefslogtreecommitdiff
path: root/plugins/regex_admin.py
diff options
context:
space:
mode:
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)
-