mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 13:09:23 +01:00
protocols: rename knockClient -> knock
This commit is contained in:
parent
20cb65e668
commit
108be5e25e
@ -56,7 +56,7 @@ internals](https://github.com/GLolol/PyLink/blob/0.4.0-dev/classes.py#L267-L272)
|
||||
|
||||
- **`killServer`**`(self, source, target, reason)` - Sends a kill from a PyLink server.
|
||||
|
||||
- **`knockClient`**`(self, source, target, text)` - Sends a KNOCK from a PyLink client.
|
||||
- **`knock`**`(self, source, target, text)` - Sends a KNOCK from a PyLink client.
|
||||
|
||||
- **`messageClient`**`(self, source, target, text)` - Sends a PRIVMSG from a PyLink client.
|
||||
|
||||
|
@ -225,7 +225,7 @@ class InspIRCdProtocol(TS6BaseProtocol):
|
||||
raise LookupError('No such PyLink client exists.')
|
||||
self._send(numeric, 'INVITE %s %s' % (target, channel))
|
||||
|
||||
def knockClient(self, numeric, target, text):
|
||||
def knock(self, numeric, target, text):
|
||||
"""Sends a KNOCK from a PyLink client."""
|
||||
if not self.irc.isInternalClient(numeric):
|
||||
raise LookupError('No such PyLink client exists.')
|
||||
|
@ -213,10 +213,10 @@ class TS6Protocol(TS6BaseProtocol):
|
||||
raise LookupError('No such PyLink client exists.')
|
||||
self._send(numeric, 'INVITE %s %s %s' % (target, channel, self.irc.channels[channel].ts))
|
||||
|
||||
def knockClient(self, numeric, target, text):
|
||||
def knock(self, numeric, target, text):
|
||||
"""Sends a KNOCK from a PyLink client."""
|
||||
if 'KNOCK' not in self.irc.caps:
|
||||
log.debug('(%s) knockClient: Dropping KNOCK to %r since the IRCd '
|
||||
log.debug('(%s) knock: Dropping KNOCK to %r since the IRCd '
|
||||
'doesn\'t support it.', self.irc.name, target)
|
||||
return
|
||||
if not self.irc.isInternalClient(numeric):
|
||||
|
@ -288,7 +288,7 @@ class UnrealProtocol(TS6BaseProtocol):
|
||||
raise LookupError('No such PyLink client exists.')
|
||||
self._send(numeric, 'INVITE %s %s' % (target, channel))
|
||||
|
||||
def knockClient(self, numeric, target, text):
|
||||
def knock(self, numeric, target, text):
|
||||
"""Sends a KNOCK from a PyLink client."""
|
||||
# KNOCKs in UnrealIRCd are actually just specially formatted NOTICEs,
|
||||
# sent to all ops in a channel.
|
||||
|
Loading…
Reference in New Issue
Block a user