mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 09:19:23 +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')
|
||||
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
|
||||
|
||||
def post_connect(self):
|
||||
|
@ -394,6 +394,13 @@ class IRCS2SProtocol(IRCCommonProtocol):
|
||||
|
||||
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):
|
||||
"""Sends a TOPIC change from a PyLink client."""
|
||||
if not self.is_internal_client(numeric):
|
||||
|
@ -214,13 +214,6 @@ class TS6BaseProtocol(IRCS2SProtocol):
|
||||
self.servers[sid] = Server(uplink, name, internal=True, desc=desc)
|
||||
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):
|
||||
"""Sends an AWAY message from a PyLink client. <text> can be an empty string
|
||||
to unset AWAY status."""
|
||||
|
Loading…
Reference in New Issue
Block a user