X-Git-Url: https://git.kaliko.me/?p=sid.git;a=blobdiff_plain;f=sid%2Fecho.py;h=96ea393d93c90180128f971c097d5fbea22bbbb0;hp=90ccd900dfc42ff9a2956d21b6220cd547a1a513;hb=HEAD;hpb=912b046c8bdf24a2e8a477269256ad99593f0728 diff --git a/sid/echo.py b/sid/echo.py index 90ccd90..12b4376 100644 --- a/sid/echo.py +++ b/sid/echo.py @@ -1,25 +1,13 @@ # -*- coding: utf-8 -*- - -# Copyright (C) 2007-2012 Thomas Perl -# Copyright (C) 2014, 2020 kaliko - -# 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 . +# SPDX-FileCopyrightText: 2007-2012 Thomas Perl +# SPDX-FileCopyrightText: 2014, 2020 kaliko +# SPDX-License-Identifier: GPL-3.0-or-later from .plugin import Plugin, botcmd class Echo(Plugin): - """Drop a message to be sent when someone gets online. + """Drops a message to be sent when someone gets online. """ def __init__(self, bot): @@ -35,7 +23,7 @@ class Echo(Plugin): self.bot.room, self.log_presence) def log_presence(self, pres): - """Register presence""" + """Handler method registering MUC participants presence""" self.log.debug('%s: %s', pres['muc']['nick'], pres['type']) nick = pres['muc']['nick'] self.presence.update({nick: (pres['muc']['role'], pres['type'])}) @@ -49,9 +37,10 @@ class Echo(Plugin): @botcmd def tell(self, message, args): - """drop a message to be sent when someone gets online. - !tell queue : messages in queue - !tell : append to in queue""" + """Drops a message to be sent when someone gets online. + + * ``!tell queue`` : messages in queue + * ``!tell ``: append to in queue""" if not len(args): msg = 'Missing arguments:\n{}'.format(self.tell.__doc__) self.reply(message, msg)