diff sat/plugins/plugin_misc_text_commands.py @ 2689:d715d912afac

plugin XEP-0199: implementation of XMPP Ping
author Goffi <goffi@goffi.org>
date Sat, 10 Nov 2018 10:16:38 +0100
parents 56f94936df1e
children 003b8b4b56a7
line wrap: on
line diff
--- a/sat/plugins/plugin_misc_text_commands.py	Sat Nov 10 10:16:38 2018 +0100
+++ b/sat/plugins/plugin_misc_text_commands.py	Sat Nov 10 10:16:38 2018 +0100
@@ -57,7 +57,8 @@
     #       should be downloadable independently)
 
     HELP_SUGGESTION = _(
-        "Type '/help' to get a list of the available commands. If you didn't want to use a command, please start your message with '//' to escape the slash."
+        u"Type '/help' to get a list of the available commands. If you didn't want to "
+        u"use a command, please start your message with '//' to escape the slash."
     )
 
     def __init__(self, host):
@@ -75,7 +76,8 @@
         @param cmd: function or method callback for the command,
             its docstring will be used for self documentation in the following way:
             - first line is the command short documentation, shown with /help
-            - @command keyword can be used, see http://wiki.goffi.org/wiki/Coding_style/en for documentation
+            - @command keyword can be used,
+              see http://wiki.goffi.org/wiki/Coding_style/en for documentation
         @return (dict): dictionary with parsed data where key can be:
             - "doc_short_help" (default: ""): the untranslated short documentation
             - "type" (default "all"): the command type as specified in documentation
@@ -177,10 +179,12 @@
         """Add a callback which give information to the /whois command
 
         @param callback: a callback which will be called with the following arguments
-            - whois_msg: list of information strings to display, callback need to append its own strings to it
+            - whois_msg: list of information strings to display, callback need to append
+                         its own strings to it
             - target_jid: full jid from whom we want information
             - profile: %(doc_profile)s
-        @param priority: priority of the information to show (the highest priority will be displayed first)
+        @param priority: priority of the information to show (the highest priority will
+            be displayed first)
         """
         self._whois.append((priority, callback))
         self._whois.sort(key=lambda item: item[0], reverse=True)
@@ -195,11 +199,14 @@
     def _sendMessageCmdHook(self, mess_data, client):
         """ Check text commands in message, and react consequently
 
-        msg starting with / are potential command. If a command is found, it is executed, else and help message is sent
+        msg starting with / are potential command. If a command is found, it is executed,
+        else an help message is sent.
         msg starting with // are escaped: they are sent with a single /
-        commands can abord message sending (if they return anything evaluating to False), or continue it (if they return True), eventually after modifying the message
-        an "unparsed" key is added to message, containing part of the message not yet parsed
-        commands can be deferred or not
+        commands can abord message sending (if they return anything evaluating to False),
+        or continue it (if they return True), eventually after modifying the message
+        an "unparsed" key is added to message, containing part of the message not yet
+        parsed.
+        Commands can be deferred or not
         @param mess_data(dict): data comming from sendMessage trigger
         @param profile: %(doc_profile)s
         """