3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-27 21:19:31 +01:00

protocols: numericServer(...) -> numeric(...)

This commit is contained in:
James Lu 2016-01-16 16:47:35 -08:00
parent 3a53005d8c
commit 196282db86
4 changed files with 4 additions and 4 deletions

View File

@ -39,7 +39,7 @@ def handle_whois(irc, source, command, args):
log.warning('(%s) Got a WHOIS request for %r from %r, but the target ' log.warning('(%s) Got a WHOIS request for %r from %r, but the target '
'doesn\'t exist in irc.users!', irc.name, target, source) 'doesn\'t exist in irc.users!', irc.name, target, source)
return return
f = irc.proto.numericServer f = irc.proto.numeric
server = irc.getServer(target) or irc.sid server = irc.getServer(target) or irc.sid
nick = user.nick nick = user.nick
sourceisOper = ('o', None) in irc.users[source].modes sourceisOper = ('o', None) in irc.users[source].modes

View File

@ -68,7 +68,7 @@ internals](https://github.com/GLolol/PyLink/blob/0.4.0-dev/classes.py#L267-L272)
- **`notice`**`(self, source, target, text)` - Sends a NOTICE from a PyLink client. - **`notice`**`(self, source, target, text)` - Sends a NOTICE from a PyLink client.
- **`numericServer`**`(self, source, numeric, target, text)` - Sends a raw numeric `numeric` with `text` from the `source` server to `target`. - **`numeric`**`(self, source, numeric, target, text)` - Sends a raw numeric `numeric` with `text` from the `source` server to `target`.
- **`partClient`**`(self, client, channel, reason=None)` - Sends a part from a PyLink client. - **`partClient`**`(self, client, channel, reason=None)` - Sends a part from a PyLink client.

View File

@ -281,7 +281,7 @@ class InspIRCdProtocol(TS6BaseProtocol):
if not (target is None or source is None): if not (target is None or source is None):
self._send(source, 'PING %s %s' % (source, target)) self._send(source, 'PING %s %s' % (source, target))
def numericServer(self, source, numeric, target, text): def numeric(self, source, numeric, target, text):
raise NotImplementedError("Numeric sending is not yet implemented by this " raise NotImplementedError("Numeric sending is not yet implemented by this "
"protocol module. WHOIS requests are handled " "protocol module. WHOIS requests are handled "
"locally by InspIRCd servers, so there is no " "locally by InspIRCd servers, so there is no "

View File

@ -36,7 +36,7 @@ class TS6BaseProtocol(Protocol):
### OUTGOING COMMANDS ### OUTGOING COMMANDS
def numericServer(self, source, numeric, target, text): def numeric(self, source, numeric, target, text):
"""Sends raw numerics from a server to a remote client, used for WHOIS """Sends raw numerics from a server to a remote client, used for WHOIS
replies.""" replies."""
self._send(source, '%s %s %s' % (numeric, target, text)) self._send(source, '%s %s %s' % (numeric, target, text))