From 20cb65e668b0f52e22fba41cbc33b7ae8bf7ca4c Mon Sep 17 00:00:00 2001 From: James Lu Date: Sat, 16 Jan 2016 16:40:36 -0800 Subject: [PATCH] protocols: rename awayClient -> away --- docs/technical/pmodule-spec.md | 2 +- plugins/relay.py | 4 ++-- protocols/inspircd.py | 2 +- protocols/ts6_common.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/technical/pmodule-spec.md b/docs/technical/pmodule-spec.md index d7848b3..444bccb 100644 --- a/docs/technical/pmodule-spec.md +++ b/docs/technical/pmodule-spec.md @@ -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. -- **`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. diff --git a/plugins/relay.py b/plugins/relay.py index 07723a2..9cc80a3 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -284,7 +284,7 @@ def getRemoteUser(irc, remoteirc, user, spawnIfMissing=True): remoteirc.users[u].opertype = opertype away = userobj.away if away: - remoteirc.proto.awayClient(u, away) + remoteirc.proto.away(u, away) relayusers[(irc.name, user)][remoteirc.name] = u return u @@ -998,7 +998,7 @@ utils.add_hook(handle_kill, 'KILL') def handle_away(irc, numeric, command, args): for netname, user in relayusers[(irc.name, numeric)].items(): remoteirc = world.networkobjects[netname] - remoteirc.proto.awayClient(user, args['text']) + remoteirc.proto.away(user, args['text']) utils.add_hook(handle_away, 'AWAY') def handle_spawnmain(irc, numeric, command, args): diff --git a/protocols/inspircd.py b/protocols/inspircd.py index e4425e7..7cb5524 100644 --- a/protocols/inspircd.py +++ b/protocols/inspircd.py @@ -287,7 +287,7 @@ class InspIRCdProtocol(TS6BaseProtocol): "locally by InspIRCd servers, so there is no " "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. can be an empty string to unset AWAY status.""" if text: diff --git a/protocols/ts6_common.py b/protocols/ts6_common.py index 2647945..fe94a19 100644 --- a/protocols/ts6_common.py +++ b/protocols/ts6_common.py @@ -148,7 +148,7 @@ class TS6BaseProtocol(Protocol): self._send(source, 'SQUIT %s :%s' % (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. can be an empty string to unset AWAY status.""" if text: