summaryrefslogtreecommitdiff
path: root/plugins/csi.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/csi.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/csi.py')
-rw-r--r--plugins/csi.py23
1 files changed, 15 insertions, 8 deletions
diff --git a/plugins/csi.py b/plugins/csi.py
index 03a0d394..1bd6a928 100644
--- a/plugins/csi.py
+++ b/plugins/csi.py
@@ -22,23 +22,30 @@ Commands
from poezio.plugin import BasePlugin
+
class Plugin(BasePlugin):
def init(self):
- self.api.add_command('csi_active', self.command_active,
- help='Set the client state indication to “active”',
- short='Manual set active')
- self.api.add_command('csi_inactive', self.command_inactive,
- help='Set the client state indication to “inactive”',
- short='Manual set inactive')
+ self.api.add_command(
+ 'csi_active',
+ self.command_active,
+ help='Set the client state indication to “active”',
+ short='Manual set active')
+ self.api.add_command(
+ 'csi_inactive',
+ self.command_inactive,
+ help='Set the client state indication to “inactive”',
+ short='Manual set inactive')
def command_active(self, args):
if not self.core.xmpp.plugin['xep_0352'].enabled:
- self.api.information('CSI is not enabled in this server', 'Warning')
+ self.api.information('CSI is not enabled in this server',
+ 'Warning')
else:
self.core.xmpp.plugin['xep_0352'].send_active()
def command_inactive(self, args):
if not self.core.xmpp.plugin['xep_0352'].enabled:
- self.api.information('CSI is not enabled in this server', 'Warning')
+ self.api.information('CSI is not enabled in this server',
+ 'Warning')
else:
self.core.xmpp.plugin['xep_0352'].send_inactive()