Send proper CTCP responses.

This commit is contained in:
James Vega 2004-12-16 18:07:55 +00:00
parent 1e484a2b87
commit 7b800fb4c6

View File

@ -125,17 +125,19 @@ class Ctcp(callbacks.PrivmsgCommandAndRegexp):
def ctcpTime(self, irc, msg, match): def ctcpTime(self, irc, msg, match):
"\x01TIME\x01" "\x01TIME\x01"
self.log.info('Received CTCP TIME from %s' % msg.prefix) self.log.info('Received CTCP TIME from %s' % msg.prefix)
self._reply(irc, msg, time.ctime()) self._reply(irc, msg, 'TIME %s' % time.ctime())
def ctcpFinger(self, irc, msg, match): def ctcpFinger(self, irc, msg, match):
"\x01FINGER\x01" "\x01FINGER\x01"
self.log.info('Received CTCP FINGER from %s' % msg.prefix) self.log.info('Received CTCP FINGER from %s' % msg.prefix)
self._reply(irc, msg, 'Supybot, the best Python IRC bot in existence!') self._reply(irc, msg,
'FINGER Supybot, the best Python IRC bot in existence!')
def ctcpSource(self, irc, msg, match): def ctcpSource(self, irc, msg, match):
"\x01SOURCE\x01" "\x01SOURCE\x01"
self.log.info('Received CTCP SOURCE from %s' % msg.prefix) self.log.info('Received CTCP SOURCE from %s' % msg.prefix)
self._reply(irc, msg, 'http://www.sourceforge.net/projects/supybot/') self._reply(irc, msg,
'SOURCE http://www.sourceforge.net/projects/supybot/')
def doNotice(self, irc, msg): def doNotice(self, irc, msg):
if ircmsgs.isCtcp(msg): if ircmsgs.isCtcp(msg):