]> kaliko git repositories - sid.git/blobdiff - sid/sid.py
Switch to SPDX headers
[sid.git] / sid / sid.py
index a3ca555e891602c839ababae1097635676a08e75..7d2f4b7b362fc166c2cf2c98cd112bda44067f17 100644 (file)
@@ -1,20 +1,8 @@
 # -*- coding: utf-8 -*-
-
-# Copyright (C) 2007-2012 Thomas Perl <thp.io/about>
-# Copyright (C) 2010, 2011 Anaël Verrier <elghinn@free.fr>
-# Copyright (C) 2014, 2015, 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: 2007-2012 Thomas Perl <thp.io/about>
+# SPDX-FileCopyrightText: 2010, 2011 Anaël Verrier <elghinn@free.fr>
+# SPDX-FileCopyrightText: 2014, 2015, 2020, 2023 kaliko <kaliko@azylum.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
 
 
 import inspect
@@ -23,7 +11,7 @@ import traceback
 
 import slixmpp
 
-from sid import __url__
+from sid import __url__, __doc__
 
 
 def botcmd(*args, **kwargs):
@@ -172,11 +160,13 @@ class MUCBot(slixmpp.ClientXMPP):
         """
         await self.get_roster()
         self.send_presence()
-        self.plugin['xep_0045'].join_muc(self.room,
+        await self.plugin['xep_0045'].join_muc_wait(self.room,
                                          self.nick,
+                                         # Do not fetch history
+                                         seconds=0,
                                          # If a room password is needed, use:
                                          # password=the_room_password,
-                                         wait=True)
+                                         )
 
     def register_bot_plugin(self, plugin_cls):
         """Registers plugin, takes a class, the method instanciates the plugin
@@ -210,6 +200,7 @@ class MUCBot(slixmpp.ClientXMPP):
         Automatically assigned to the "help" command."""
         help_cmd = ('Type {}help <command name>'.format(self.prefix) +
                     ' to get more info about that specific command.\n\n' +
+                    f'DOC: {__doc__}\n' +
                     f'SRC: {__url__}')
         if not args:
             if self.__doc__: