diff options
author | mathieui <mathieui@mathieui.net> | 2018-08-15 13:13:17 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2018-08-15 13:13:17 +0200 |
commit | 6e13b8b73572f9c0ac9b5c683b98a475afbeab38 (patch) | |
tree | 7dae86588339a8cf144b2d98c9280f28646341a9 /plugins/regex_admin.py | |
parent | d1b624753bb5371cf287cc9d86bb685593a99315 (diff) | |
download | poezio-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.py | 29 |
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) - |