3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-18 08:02:51 +01:00

protocols: rename awayClient -> away

This commit is contained in:
James Lu 2016-01-16 16:40:36 -08:00
parent b4e5c57a35
commit 20cb65e668
4 changed files with 5 additions and 5 deletions

View File

@ -44,7 +44,7 @@ internals](https://github.com/GLolol/PyLink/blob/0.4.0-dev/classes.py#L267-L272)
- **`join`**`(self, client, channel)` - Joins the given client UID given to a channel. - **`join`**`(self, client, channel)` - Joins the given client UID given to a channel.
- **`awayClient`**`(self, source, text)` - Sends an AWAY message from a PyLink client. `text` can be an empty string to unset AWAY status. - **`away`**`(self, source, text)` - Sends an AWAY message from a PyLink client. `text` can be an empty string to unset AWAY status.
- **`invite`**`(self, source, target, channel)` - Sends an INVITE from a PyLink client. - **`invite`**`(self, source, target, channel)` - Sends an INVITE from a PyLink client.

View File

@ -284,7 +284,7 @@ def getRemoteUser(irc, remoteirc, user, spawnIfMissing=True):
remoteirc.users[u].opertype = opertype remoteirc.users[u].opertype = opertype
away = userobj.away away = userobj.away
if away: if away:
remoteirc.proto.awayClient(u, away) remoteirc.proto.away(u, away)
relayusers[(irc.name, user)][remoteirc.name] = u relayusers[(irc.name, user)][remoteirc.name] = u
return u return u
@ -998,7 +998,7 @@ utils.add_hook(handle_kill, 'KILL')
def handle_away(irc, numeric, command, args): def handle_away(irc, numeric, command, args):
for netname, user in relayusers[(irc.name, numeric)].items(): for netname, user in relayusers[(irc.name, numeric)].items():
remoteirc = world.networkobjects[netname] remoteirc = world.networkobjects[netname]
remoteirc.proto.awayClient(user, args['text']) remoteirc.proto.away(user, args['text'])
utils.add_hook(handle_away, 'AWAY') utils.add_hook(handle_away, 'AWAY')
def handle_spawnmain(irc, numeric, command, args): def handle_spawnmain(irc, numeric, command, args):

View File

@ -287,7 +287,7 @@ class InspIRCdProtocol(TS6BaseProtocol):
"locally by InspIRCd servers, so there is no " "locally by InspIRCd servers, so there is no "
"need for PyLink to send numerics directly yet.") "need for PyLink to send numerics directly yet.")
def awayClient(self, source, text): def away(self, source, text):
"""Sends an AWAY message from a PyLink client. <text> can be an empty string """Sends an AWAY message from a PyLink client. <text> can be an empty string
to unset AWAY status.""" to unset AWAY status."""
if text: if text:

View File

@ -148,7 +148,7 @@ class TS6BaseProtocol(Protocol):
self._send(source, 'SQUIT %s :%s' % (target, text)) self._send(source, 'SQUIT %s :%s' % (target, text))
self.handle_squit(source, 'SQUIT', [target, text]) self.handle_squit(source, 'SQUIT', [target, text])
def awayClient(self, source, text): def away(self, source, text):
"""Sends an AWAY message from a PyLink client. <text> can be an empty string """Sends an AWAY message from a PyLink client. <text> can be an empty string
to unset AWAY status.""" to unset AWAY status."""
if text: if text: