mirror of
https://github.com/jlu5/PyLink.git
synced 2025-03-01 20:10:44 +01:00
protocols: move invite() into IRCS2SProtocol
This commit is contained in:
parent
085b4cacbe
commit
d149576b4e
@ -243,12 +243,6 @@ class InspIRCdProtocol(TS6BaseProtocol):
|
|||||||
self.channels[target].topic = text
|
self.channels[target].topic = text
|
||||||
self.channels[target].topicset = True
|
self.channels[target].topicset = True
|
||||||
|
|
||||||
def invite(self, numeric, target, channel):
|
|
||||||
"""Sends an INVITE from a PyLink client.."""
|
|
||||||
if not self.is_internal_client(numeric):
|
|
||||||
raise LookupError('No such PyLink client exists.')
|
|
||||||
self._send_with_prefix(numeric, 'INVITE %s %s' % (target, channel))
|
|
||||||
|
|
||||||
def knock(self, numeric, target, text):
|
def knock(self, numeric, target, text):
|
||||||
"""Sends a KNOCK from a PyLink client."""
|
"""Sends a KNOCK from a PyLink client."""
|
||||||
if not self.is_internal_client(numeric):
|
if not self.is_internal_client(numeric):
|
||||||
|
@ -352,6 +352,13 @@ class IRCS2SProtocol(IRCCommonProtocol):
|
|||||||
if parsed_args is not None:
|
if parsed_args is not None:
|
||||||
return [sender, command, parsed_args]
|
return [sender, command, parsed_args]
|
||||||
|
|
||||||
|
def invite(self, source, target, channel):
|
||||||
|
"""Sends an INVITE from a PyLink client.."""
|
||||||
|
if not self.is_internal_client(source):
|
||||||
|
raise LookupError('No such PyLink client exists.')
|
||||||
|
|
||||||
|
self._send_with_prefix(source, 'INVITE %s %s' % (self._expandPUID(target), channel))
|
||||||
|
|
||||||
def kick(self, numeric, channel, target, reason=None):
|
def kick(self, numeric, channel, target, reason=None):
|
||||||
"""Sends kicks from a PyLink client/server."""
|
"""Sends kicks from a PyLink client/server."""
|
||||||
|
|
||||||
|
@ -300,12 +300,6 @@ class UnrealProtocol(TS6BaseProtocol):
|
|||||||
self.call_hooks([self.sid, 'CHGNAME',
|
self.call_hooks([self.sid, 'CHGNAME',
|
||||||
{'target': target, 'newgecos': text}])
|
{'target': target, 'newgecos': text}])
|
||||||
|
|
||||||
def invite(self, numeric, target, channel):
|
|
||||||
"""Sends an INVITE from a PyLink client.."""
|
|
||||||
if not self.is_internal_client(numeric):
|
|
||||||
raise LookupError('No such PyLink client exists.')
|
|
||||||
self._send_with_prefix(numeric, 'INVITE %s %s' % (target, channel))
|
|
||||||
|
|
||||||
def knock(self, numeric, target, text):
|
def knock(self, numeric, target, text):
|
||||||
"""Sends a KNOCK from a PyLink client."""
|
"""Sends a KNOCK from a PyLink client."""
|
||||||
# KNOCKs in UnrealIRCd are actually just specially formatted NOTICEs,
|
# KNOCKs in UnrealIRCd are actually just specially formatted NOTICEs,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user