]> kaliko git repositories - sid.git/blobdiff - sid/log.py
Bump min python/slixmpp required (3.7, 1.8.1)
[sid.git] / sid / log.py
index e97e738f4734bd32d4e96fdf06fba6b937c579ee..1872c1beedf486c074f0f563b7e62b57726be54c 100644 (file)
@@ -1,18 +1,6 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
-
-# Copyright (C) 2020 kaliko <kaliko@azylum.org>
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, version 3 only.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# SPDX-FileCopyrightText: 2020 kaliko <kaliko@azylum.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
 
 from datetime import datetime
 from os import fdopen
 
 from datetime import datetime
 from os import fdopen
@@ -23,7 +11,7 @@ from .plugin import Plugin, botcmd
 
 
 class Log(Plugin):
 
 
 class Log(Plugin):
-    """Logs presence.
+    """Logs group chat participant presence.
 
     The account running the bot need at least room moderation right to log
     participants JIDs (fallback to nickname).
 
     The account running the bot need at least room moderation right to log
     participants JIDs (fallback to nickname).
@@ -70,8 +58,9 @@ class Log(Plugin):
 
     @botcmd(hidden=True)
     def write(self, message, args):
 
     @botcmd(hidden=True)
     def write(self, message, args):
-        """
-        **command** (hidden) ``!write`` : Writes log to file (use mktemp and return file location as MUC message)"""
+        """Dump/save room presences log
+
+        ``!write`` : Writes log to file (use mktemp and return file location as MUC message)"""
         delay = int(time()) - Log.throttle_ts
         if delay < 30:
             self.log.debug('throttling file creation')
         delay = int(time()) - Log.throttle_ts
         if delay < 30:
             self.log.debug('throttling file creation')
@@ -89,7 +78,7 @@ class Log(Plugin):
 
     @botcmd(hidden=True)
     def dump(self, message, args):
 
     @botcmd(hidden=True)
     def dump(self, message, args):
-        """**command** (hidden)  ``!dump``  : Dumps log as MUC message"""
+        """``!dump``  : Dumps log as MUC message"""
         self.reply(message, self._format_log())
 
 
         self.reply(message, self._format_log())