diff --git a/classes.py b/classes.py index c103653..584d930 100644 --- a/classes.py +++ b/classes.py @@ -428,10 +428,10 @@ class Irc(): is optional, and defaults to the main PyLink client if not specified.""" source = source or self.pseudoclient.uid if notice: - self.proto.noticeClient(source, target, text) + self.proto.notice(source, target, text) cmd = 'PYLINK_SELF_NOTICE' else: - self.proto.messageClient(source, target, text) + self.proto.message(source, target, text) cmd = 'PYLINK_SELF_PRIVMSG' self.callHooks([source, cmd, {'target': target, 'text': text}]) diff --git a/docs/technical/pmodule-spec.md b/docs/technical/pmodule-spec.md index a321c82..b776ab9 100644 --- a/docs/technical/pmodule-spec.md +++ b/docs/technical/pmodule-spec.md @@ -58,7 +58,7 @@ internals](https://github.com/GLolol/PyLink/blob/0.4.0-dev/classes.py#L267-L272) - **`knock`**`(self, source, target, text)` - Sends a KNOCK from a PyLink client. -- **`messageClient`**`(self, source, target, text)` - Sends a PRIVMSG from a PyLink client. +- **`message`**`(self, source, target, text)` - Sends a PRIVMSG from a PyLink client. - **`modeClient`**`(self, source, target, modes, ts=None)` - Sends modes from a PyLink client. `modes` takes a set of `([+/-]mode char, mode arg)` tuples. @@ -66,7 +66,7 @@ internals](https://github.com/GLolol/PyLink/blob/0.4.0-dev/classes.py#L267-L272) - **`nickClient`**`(self, source, newnick)` - Changes the nick of a PyLink client. -- **`noticeClient`**`(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`. diff --git a/plugins/bots.py b/plugins/bots.py index a9b0862..04601ea 100644 --- a/plugins/bots.py +++ b/plugins/bots.py @@ -146,5 +146,5 @@ def msg(irc, source, args): if not text: irc.reply('Error: No text given.') return - irc.proto.messageClient(sourceuid, real_target, text) + irc.proto.message(sourceuid, real_target, text) irc.callHooks([sourceuid, 'PYLINK_BOTSPLUGIN_MSG', {'target': real_target, 'text': text, 'parse_as': 'PRIVMSG'}]) diff --git a/plugins/relay.py b/plugins/relay.py index 9cc80a3..56aa3e6 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -753,9 +753,9 @@ def handle_messages(irc, numeric, command, args): user = getRemoteUser(irc, remoteirc, numeric, spawnIfMissing=False) real_target = prefix + real_target if notice: - remoteirc.proto.noticeClient(user, real_target, text) + remoteirc.proto.notice(user, real_target, text) else: - remoteirc.proto.messageClient(user, real_target, text) + remoteirc.proto.message(user, real_target, text) else: remoteuser = getOrigUser(irc, target) if remoteuser is None: @@ -773,9 +773,9 @@ def handle_messages(irc, numeric, command, args): remoteirc = world.networkobjects[homenet] user = getRemoteUser(irc, remoteirc, numeric, spawnIfMissing=False) if notice: - remoteirc.proto.noticeClient(user, real_target, text) + remoteirc.proto.notice(user, real_target, text) else: - remoteirc.proto.messageClient(user, real_target, text) + remoteirc.proto.message(user, real_target, text) for cmd in ('PRIVMSG', 'NOTICE', 'PYLINK_SELF_NOTICE', 'PYLINK_SELF_PRIVMSG'): utils.add_hook(handle_messages, cmd) diff --git a/protocols/ts6_common.py b/protocols/ts6_common.py index fe94a19..9abbcf6 100644 --- a/protocols/ts6_common.py +++ b/protocols/ts6_common.py @@ -91,13 +91,13 @@ class TS6BaseProtocol(Protocol): else: raise LookupError("No such PyLink client exists.") - def messageClient(self, numeric, target, text): + def message(self, numeric, target, text): """Sends a PRIVMSG from a PyLink client.""" if not self.irc.isInternalClient(numeric): raise LookupError('No such PyLink client exists.') self._send(numeric, 'PRIVMSG %s :%s' % (target, text)) - def noticeClient(self, numeric, target, text): + def notice(self, numeric, target, text): """Sends a NOTICE from a PyLink client.""" if not self.irc.isInternalClient(numeric): raise LookupError('No such PyLink client exists.')