mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +01:00
protocols: skip queuing when responding to PING
This commit is contained in:
parent
5d10ee39be
commit
029bb38af8
@ -893,7 +893,7 @@ class ClientbotWrapperProtocol(Protocol):
|
|||||||
"""
|
"""
|
||||||
Handles incoming PING requests.
|
Handles incoming PING requests.
|
||||||
"""
|
"""
|
||||||
self.irc.send('PONG :%s' % args[0])
|
self.irc.send('PONG :%s' % args[0], queue=False)
|
||||||
|
|
||||||
def handle_pong(self, source, command, args):
|
def handle_pong(self, source, command, args):
|
||||||
"""
|
"""
|
||||||
|
@ -518,7 +518,7 @@ class InspIRCdProtocol(TS6BaseProtocol):
|
|||||||
# <- :70M PING 70M 0AL
|
# <- :70M PING 70M 0AL
|
||||||
# -> :0AL PONG 0AL 70M
|
# -> :0AL PONG 0AL 70M
|
||||||
if self.irc.isInternalServer(args[1]):
|
if self.irc.isInternalServer(args[1]):
|
||||||
self._send(args[1], 'PONG %s %s' % (args[1], source))
|
self._send(args[1], 'PONG %s %s' % (args[1], source), queue=False)
|
||||||
|
|
||||||
def handle_fjoin(self, servernumeric, command, args):
|
def handle_fjoin(self, servernumeric, command, args):
|
||||||
"""Handles incoming FJOIN commands (InspIRCd equivalent of JOIN/SJOIN)."""
|
"""Handles incoming FJOIN commands (InspIRCd equivalent of JOIN/SJOIN)."""
|
||||||
|
@ -77,8 +77,8 @@ class P10Protocol(IRCS2SProtocol):
|
|||||||
|
|
||||||
self.protocol_caps |= {'slash-in-hosts', 'underscore-in-hosts'}
|
self.protocol_caps |= {'slash-in-hosts', 'underscore-in-hosts'}
|
||||||
|
|
||||||
def _send(self, source, text):
|
def _send(self, source, text, **kwargs):
|
||||||
self.irc.send("%s %s" % (source, text))
|
self.irc.send("%s %s" % (source, text), **kwargs)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def access_sort(key):
|
def access_sort(key):
|
||||||
@ -1040,7 +1040,7 @@ class P10Protocol(IRCS2SProtocol):
|
|||||||
if self.irc.isInternalServer(sid):
|
if self.irc.isInternalServer(sid):
|
||||||
# Only respond if the target server is ours. No forwarding is needed because
|
# Only respond if the target server is ours. No forwarding is needed because
|
||||||
# no IRCds can ever connect behind us...
|
# no IRCds can ever connect behind us...
|
||||||
self._send(self.irc.sid, 'Z %s %s %s %s' % (target, orig_pingtime, timediff, currtime))
|
self._send(self.irc.sid, 'Z %s %s %s %s' % (target, orig_pingtime, timediff, currtime), queue=False)
|
||||||
|
|
||||||
def handle_pass(self, source, command, args):
|
def handle_pass(self, source, command, args):
|
||||||
"""Handles authentication with our uplink."""
|
"""Handles authentication with our uplink."""
|
||||||
|
@ -407,7 +407,7 @@ class TS6Protocol(TS6BaseProtocol):
|
|||||||
except IndexError:
|
except IndexError:
|
||||||
destination = self.irc.sid
|
destination = self.irc.sid
|
||||||
if self.irc.isInternalServer(destination):
|
if self.irc.isInternalServer(destination):
|
||||||
self._send(destination, 'PONG %s %s' % (destination, source))
|
self._send(destination, 'PONG %s %s' % (destination, source), queue=False)
|
||||||
|
|
||||||
if destination == self.irc.sid and not self.has_eob:
|
if destination == self.irc.sid and not self.has_eob:
|
||||||
# Charybdis' idea of endburst is just sending a PING. No, really!
|
# Charybdis' idea of endburst is just sending a PING. No, really!
|
||||||
|
@ -109,9 +109,9 @@ class TS6BaseProtocol(IRCS2SProtocol):
|
|||||||
# SID generator for TS6.
|
# SID generator for TS6.
|
||||||
self.sidgen = TS6SIDGenerator(irc)
|
self.sidgen = TS6SIDGenerator(irc)
|
||||||
|
|
||||||
def _send(self, source, msg):
|
def _send(self, source, msg, **kwargs):
|
||||||
"""Sends a TS6-style raw command from a source numeric to the self.irc connection given."""
|
"""Sends a TS6-style raw command from a source numeric to the self.irc connection given."""
|
||||||
self.irc.send(':%s %s' % (source, msg))
|
self.irc.send(':%s %s' % (source, msg), **kwargs)
|
||||||
|
|
||||||
def _expandPUID(self, uid):
|
def _expandPUID(self, uid):
|
||||||
"""
|
"""
|
||||||
|
@ -447,7 +447,7 @@ class UnrealProtocol(TS6BaseProtocol):
|
|||||||
|
|
||||||
def handle_ping(self, numeric, command, args):
|
def handle_ping(self, numeric, command, args):
|
||||||
if numeric == self.irc.uplink:
|
if numeric == self.irc.uplink:
|
||||||
self.irc.send('PONG %s :%s' % (self.irc.serverdata['hostname'], args[-1]))
|
self.irc.send('PONG %s :%s' % (self.irc.serverdata['hostname'], args[-1]), queue=False)
|
||||||
|
|
||||||
def handle_server(self, numeric, command, args):
|
def handle_server(self, numeric, command, args):
|
||||||
"""Handles the SERVER command, which is used for both authentication and
|
"""Handles the SERVER command, which is used for both authentication and
|
||||||
|
Loading…
Reference in New Issue
Block a user