mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-28 05:29:25 +01:00
Move squit() to ircs2s_common
This commit is contained in:
parent
9132556fd9
commit
5d4f2149e6
@ -376,12 +376,6 @@ class InspIRCdProtocol(TS6BaseProtocol):
|
|||||||
self._send_with_prefix(sid, 'ENDBURST')
|
self._send_with_prefix(sid, 'ENDBURST')
|
||||||
return sid
|
return sid
|
||||||
|
|
||||||
def squit(self, source, target, text='No reason given'):
|
|
||||||
"""SQUITs a PyLink server."""
|
|
||||||
# -> :9PY SQUIT 9PZ :blah, blah
|
|
||||||
self._send_with_prefix(source, 'SQUIT %s :%s' % (target, text))
|
|
||||||
self.handle_squit(source, 'SQUIT', [target, text])
|
|
||||||
|
|
||||||
### Core / command handlers
|
### Core / command handlers
|
||||||
|
|
||||||
def post_connect(self):
|
def post_connect(self):
|
||||||
|
@ -394,6 +394,13 @@ class IRCS2SProtocol(IRCCommonProtocol):
|
|||||||
|
|
||||||
self._send_with_prefix(numeric, 'NOTICE %s :%s' % (target, text))
|
self._send_with_prefix(numeric, 'NOTICE %s :%s' % (target, text))
|
||||||
|
|
||||||
|
def squit(self, source, target, text='No reason given'):
|
||||||
|
"""SQUITs a PyLink server."""
|
||||||
|
# -> SQUIT 9PZ :blah, blah
|
||||||
|
log.debug('(%s) squit: source=%s, target=%s', self.name, source, target)
|
||||||
|
self._send_with_prefix(source, 'SQUIT %s :%s' % (target, text))
|
||||||
|
self.handle_squit(source, 'SQUIT', [target, text])
|
||||||
|
|
||||||
def topic(self, numeric, target, text):
|
def topic(self, numeric, target, text):
|
||||||
"""Sends a TOPIC change from a PyLink client."""
|
"""Sends a TOPIC change from a PyLink client."""
|
||||||
if not self.is_internal_client(numeric):
|
if not self.is_internal_client(numeric):
|
||||||
|
@ -214,13 +214,6 @@ class TS6BaseProtocol(IRCS2SProtocol):
|
|||||||
self.servers[sid] = Server(uplink, name, internal=True, desc=desc)
|
self.servers[sid] = Server(uplink, name, internal=True, desc=desc)
|
||||||
return sid
|
return sid
|
||||||
|
|
||||||
def squit(self, source, target, text='No reason given'):
|
|
||||||
"""SQUITs a PyLink server."""
|
|
||||||
# -> SQUIT 9PZ :blah, blah
|
|
||||||
log.debug('source=%s, target=%s', source, target)
|
|
||||||
self._send_with_prefix(source, 'SQUIT %s :%s' % (target, text))
|
|
||||||
self.handle_squit(source, 'SQUIT', [target, text])
|
|
||||||
|
|
||||||
def away(self, source, text):
|
def away(self, source, text):
|
||||||
"""Sends an AWAY message from a PyLink client. <text> can be an empty string
|
"""Sends an AWAY message from a PyLink client. <text> can be an empty string
|
||||||
to unset AWAY status."""
|
to unset AWAY status."""
|
||||||
|
Loading…
Reference in New Issue
Block a user