mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 19:52:54 +01:00
Fix replies to some dumb/broken CTCP PING implementations.
This commit is contained in:
parent
fee37e43cc
commit
1e49f9e82b
@ -104,9 +104,13 @@ class Ctcp(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
regexps = ('ctcpPing', 'ctcpVersion', 'ctcpUserinfo',
|
regexps = ('ctcpPing', 'ctcpVersion', 'ctcpUserinfo',
|
||||||
'ctcpTime', 'ctcpFinger', 'ctcpSource')
|
'ctcpTime', 'ctcpFinger', 'ctcpSource')
|
||||||
def ctcpPing(self, irc, msg, match):
|
def ctcpPing(self, irc, msg, match):
|
||||||
"\x01PING (.*)\x01"
|
"\x01PING ?(.*)\x01"
|
||||||
self.log.info('Received CTCP PING from %s', msg.prefix)
|
self.log.info('Received CTCP PING from %s', msg.prefix)
|
||||||
|
payload = match.group(1)
|
||||||
|
if payload:
|
||||||
self._reply(irc, msg, 'PING %s' % match.group(1))
|
self._reply(irc, msg, 'PING %s' % match.group(1))
|
||||||
|
else:
|
||||||
|
self._reply(irc, msg, 'PING')
|
||||||
|
|
||||||
def ctcpVersion(self, irc, msg, match):
|
def ctcpVersion(self, irc, msg, match):
|
||||||
"\x01VERSION\x01"
|
"\x01VERSION\x01"
|
||||||
|
Loading…
Reference in New Issue
Block a user