mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +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.
|
||||
self.sidgen = P10SIDGenerator(irc)
|
||||
|
||||
self.hook_map = {'END_OF_BURST': 'ENDBURST'}
|
||||
|
||||
def _send(self, source, text):
|
||||
self.irc.send("%s %s" % (source, text))
|
||||
|
||||
@ -566,4 +568,11 @@ class P10Protocol(Protocol):
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user