X-Git-Url: http://git.kaliko.me/?a=blobdiff_plain;f=sid%2Fping.py;h=a0463ea03ee4b098b609f6f0986912b2c731cb92;hb=cf4e0e61fd723ec820449c6dd26a820514404c63;hp=827ddb634267e8dadc040f98390fa6660e759f1c;hpb=e518fc7f4c42f6e911d85ce8f662b3d21b6da757;p=sid.git diff --git a/sid/ping.py b/sid/ping.py index 827ddb6..a0463ea 100644 --- a/sid/ping.py +++ b/sid/ping.py @@ -1,21 +1,10 @@ # -*- coding: utf-8 -*- - -# Copyright (C) 2014 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: 2014, 2020 kaliko +# SPDX-License-Identifier: GPL-3.0-or-later from .plugin import Plugin, botcmd + class Ping(Plugin): PongURL = 'http://upload.wikimedia.org/wikipedia/commons/f/f8/Pong.png' @@ -23,15 +12,14 @@ class Ping(Plugin): Plugin.__init__(self, bot) @botcmd - def ping(self, message, args): - """ping's answering a pong showing the bot is alive. + def ping(self, rcv, args): + """Answers a pong showing the bot is alive. + !ping : You'll get back "pong"! """ - msg = { - 'mhtml':'!pong'.format(self), - 'mbody':'!pong', - } - self.send(msg) + msg = {'mhtml': '!pong'.format(self), + 'mbody': '!pong'} + self.reply(rcv, msg) # VIM MODLINE # vim: ai ts=4 sw=4 sts=4 expandtab