3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-30 14:49:28 +01:00

protocols: rename knockClient -> knock

This commit is contained in:
James Lu 2016-01-16 16:41:17 -08:00
parent 20cb65e668
commit 108be5e25e
4 changed files with 5 additions and 5 deletions

View File

@ -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. - **`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. - **`messageClient`**`(self, source, target, text)` - Sends a PRIVMSG from a PyLink client.

View File

@ -225,7 +225,7 @@ class InspIRCdProtocol(TS6BaseProtocol):
raise LookupError('No such PyLink client exists.') raise LookupError('No such PyLink client exists.')
self._send(numeric, 'INVITE %s %s' % (target, channel)) 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.""" """Sends a KNOCK from a PyLink client."""
if not self.irc.isInternalClient(numeric): if not self.irc.isInternalClient(numeric):
raise LookupError('No such PyLink client exists.') raise LookupError('No such PyLink client exists.')

View File

@ -213,10 +213,10 @@ class TS6Protocol(TS6BaseProtocol):
raise LookupError('No such PyLink client exists.') raise LookupError('No such PyLink client exists.')
self._send(numeric, 'INVITE %s %s %s' % (target, channel, self.irc.channels[channel].ts)) 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.""" """Sends a KNOCK from a PyLink client."""
if 'KNOCK' not in self.irc.caps: 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) 'doesn\'t support it.', self.irc.name, target)
return return
if not self.irc.isInternalClient(numeric): if not self.irc.isInternalClient(numeric):

View File

@ -288,7 +288,7 @@ class UnrealProtocol(TS6BaseProtocol):
raise LookupError('No such PyLink client exists.') raise LookupError('No such PyLink client exists.')
self._send(numeric, 'INVITE %s %s' % (target, channel)) 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.""" """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,
# sent to all ops in a channel. # sent to all ops in a channel.