diff --git a/docs/technical/pmodule-spec.md b/docs/technical/pmodule-spec.md index a38e8b5..df27781 100644 --- a/docs/technical/pmodule-spec.md +++ b/docs/technical/pmodule-spec.md @@ -64,7 +64,7 @@ internals](https://github.com/GLolol/PyLink/blob/0.4.0-dev/classes.py#L267-L272) - **`modeServer`**`(self, source, target, modes, ts=None)` - Sends modes from a PyLink server. -- **`nickClient`**`(self, source, newnick)` - Changes the nick of a PyLink client. +- **`nick`**`(self, source, newnick)` - Changes the nick of a PyLink client. - **`notice`**`(self, source, target, text)` - Sends a NOTICE from a PyLink client. diff --git a/plugins/bots.py b/plugins/bots.py index 04601ea..740e31f 100644 --- a/plugins/bots.py +++ b/plugins/bots.py @@ -94,7 +94,7 @@ def nick(irc, source, args): elif not utils.isManipulatableClient(irc, u): irc.reply("Error: Cannot force nick changes for a protected PyLink services client.") return - irc.proto.nickClient(u, newnick) + irc.proto.nick(u, newnick) irc.callHooks([u, 'PYLINK_BOTSPLUGIN_NICK', {'newnick': newnick, 'oldnick': nick, 'parse_as': 'NICK'}]) @utils.add_cmd diff --git a/plugins/relay.py b/plugins/relay.py index 56aa3e6..f0e21bb 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -688,7 +688,7 @@ def handle_nick(irc, numeric, command, args): remoteirc = world.networkobjects[netname] newnick = normalizeNick(remoteirc, irc.name, args['newnick'], uid=user) if remoteirc.users[user].nick != newnick: - remoteirc.proto.nickClient(user, newnick) + remoteirc.proto.nick(user, newnick) utils.add_hook(handle_nick, 'NICK') def handle_part(irc, numeric, command, args): @@ -1084,7 +1084,7 @@ def handle_save(irc, numeric, command, args): newnick = normalizeNick(irc, remotenet, nick) log.info('(%s) SAVE received for relay client %r (%s), fixing nick to %s', irc.name, target, nick, newnick) - irc.proto.nickClient(target, newnick) + irc.proto.nick(target, newnick) else: log.warning('(%s) SAVE received for relay client %r (%s), not ' 'fixing nick again due to 5 failed attempts in ' diff --git a/protocols/ts6_common.py b/protocols/ts6_common.py index 5e5c1ec..9a1dcbe 100644 --- a/protocols/ts6_common.py +++ b/protocols/ts6_common.py @@ -64,7 +64,7 @@ class TS6BaseProtocol(Protocol): raise LookupError('No such PyLink server exists.') self._sendKick(numeric, channel, target, reason=reason) - def nickClient(self, numeric, newnick): + def nick(self, numeric, newnick): """Changes the nick of a PyLink client.""" if not self.irc.isInternalClient(numeric): raise LookupError('No such PyLink client exists.') diff --git a/tests/tests_common.py b/tests/tests_common.py index d8fd269..91fd9ce 100644 --- a/tests/tests_common.py +++ b/tests/tests_common.py @@ -55,7 +55,7 @@ class CommonProtoTestCase(PluginTestCase): self.assertEqual(cmds, ['MODE', 'FMODE']) def testNickClient(self): - self.proto.nickClient(self.u, 'NotPyLink') + self.proto.nick(self.u, 'NotPyLink') self.assertEqual('NotPyLink', self.irc.users[self.u].nick) def testPartClient(self):