mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 11:42:52 +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',
|
||||
'ctcpTime', 'ctcpFinger', 'ctcpSource')
|
||||
def ctcpPing(self, irc, msg, match):
|
||||
"\x01PING (.*)\x01"
|
||||
"\x01PING ?(.*)\x01"
|
||||
self.log.info('Received CTCP PING from %s', msg.prefix)
|
||||
self._reply(irc, msg, 'PING %s' % match.group(1))
|
||||
payload = match.group(1)
|
||||
if payload:
|
||||
self._reply(irc, msg, 'PING %s' % match.group(1))
|
||||
else:
|
||||
self._reply(irc, msg, 'PING')
|
||||
|
||||
def ctcpVersion(self, irc, msg, match):
|
||||
"\x01VERSION\x01"
|
||||
|
Loading…
Reference in New Issue
Block a user