mirror of
https://github.com/jlu5/PyLink.git
synced 2025-02-26 02:10:39 +01:00
nefarious: handle end of burst (send acknowledgement and hook)
This commit is contained in:
parent
cc16c610dd
commit
f9f3e97f42
@ -83,6 +83,8 @@ class P10Protocol(Protocol):
|
|||||||
# SID generator for P10.
|
# SID generator for P10.
|
||||||
self.sidgen = P10SIDGenerator(irc)
|
self.sidgen = P10SIDGenerator(irc)
|
||||||
|
|
||||||
|
self.hook_map = {'END_OF_BURST': 'ENDBURST'}
|
||||||
|
|
||||||
def _send(self, source, text):
|
def _send(self, source, text):
|
||||||
self.irc.send("%s %s" % (source, text))
|
self.irc.send("%s %s" % (source, text))
|
||||||
|
|
||||||
@ -566,4 +568,11 @@ class P10Protocol(Protocol):
|
|||||||
|
|
||||||
handle_create = handle_join
|
handle_create = handle_join
|
||||||
|
|
||||||
|
def handle_end_of_burst(self, source, command, args):
|
||||||
|
"""Handles end of burst from our uplink."""
|
||||||
|
# Send EOB acknowledgement; this is required by the P10 specification,
|
||||||
|
# and needed if we want to be able to receive channel messages, etc.
|
||||||
|
self._send(self.irc.sid, 'EA')
|
||||||
|
return {}
|
||||||
|
|
||||||
Class = P10Protocol
|
Class = P10Protocol
|
||||||
|
Loading…
x
Reference in New Issue
Block a user