X-Git-Url: http://git.kaliko.me/?a=blobdiff_plain;f=sid%2Fping.py;h=a641c83108206543c1631546a10b78e2bfe3cb61;hb=4a7f23317ab2236a85c3a17a00a52ac034c9bad7;hp=827ddb634267e8dadc040f98390fa6660e759f1c;hpb=e518fc7f4c42f6e911d85ce8f662b3d21b6da757;p=sid.git diff --git a/sid/ping.py b/sid/ping.py index 827ddb6..a641c83 100644 --- a/sid/ping.py +++ b/sid/ping.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2014 kaliko +# 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 @@ -16,6 +16,7 @@ from .plugin import Plugin, botcmd + class Ping(Plugin): PongURL = 'http://upload.wikimedia.org/wikipedia/commons/f/f8/Pong.png' @@ -23,15 +24,14 @@ class Ping(Plugin): Plugin.__init__(self, bot) @botcmd - def ping(self, message, args): + def ping(self, rcv, args): """ping's answering 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