diff --git a/classes.py b/classes.py index 584d930..3b5e5ba 100644 --- a/classes.py +++ b/classes.py @@ -372,7 +372,7 @@ class Irc(): def schedulePing(self): """Schedules periodic pings in a loop.""" - self.proto.pingServer() + self.proto.ping() self.pingTimer = threading.Timer(self.pingfreq, self.schedulePing) self.pingTimer.daemon = True diff --git a/docs/technical/pmodule-spec.md b/docs/technical/pmodule-spec.md index f995545..715367e 100644 --- a/docs/technical/pmodule-spec.md +++ b/docs/technical/pmodule-spec.md @@ -28,7 +28,7 @@ The following functions *must* be implemented by any protocol module within its - **`handle_events`**`(self, line)` - Handles inbound data (lines of text) from the uplink IRC server. Normally, this will pass commands to other command handlers within the protocol module, while dropping commands that are unrecognized (wildcard handling). But, it's really up to you how to structure your modules. You will want to be able to parse command arguments properly into a list: many protocols send RFC1459-style commands that can be parsed using the [`Protocol.parseArgs()`](https://github.com/GLolol/PyLink/blob/e4fb64aebaf542122c70a8f3a49061386a00b0ca/classes.py#L539) function. -- **`pingServer`**`(self, source=None, target=None)` - Sends a PING to a target server. Periodic PINGs are sent to our uplink automatically by the [`Irc()` +- **`ping`**`(self, source=None, target=None)` - Sends a PING to a target server. Periodic PINGs are sent to our uplink automatically by the [`Irc()` internals](https://github.com/GLolol/PyLink/blob/0.4.0-dev/classes.py#L267-L272); plugins shouldn't have to use this. ### Outgoing command functions diff --git a/protocols/inspircd.py b/protocols/inspircd.py index 13e8e85..9450012 100644 --- a/protocols/inspircd.py +++ b/protocols/inspircd.py @@ -254,7 +254,7 @@ class InspIRCdProtocol(TS6BaseProtocol): self.irc.callHooks([self.irc.sid, 'CHGNAME', {'target': target, 'newgecos': text}]) - def pingServer(self, source=None, target=None): + def ping(self, source=None, target=None): """Sends a PING to a target server. Periodic PINGs are sent to our uplink automatically by the Irc() internals; plugins shouldn't have to use this.""" source = source or self.irc.sid diff --git a/protocols/ts6.py b/protocols/ts6.py index 2223fba..d97322c 100644 --- a/protocols/ts6.py +++ b/protocols/ts6.py @@ -224,7 +224,7 @@ class TS6Protocol(TS6BaseProtocol): raise NotImplementedError("Changing field %r of a client is " "unsupported by this protocol." % field) - def pingServer(self, source=None, target=None): + def ping(self, source=None, target=None): """Sends a PING to a target server. Periodic PINGs are sent to our uplink automatically by the Irc() internals; plugins shouldn't have to use this.""" source = source or self.irc.sid diff --git a/protocols/unreal.py b/protocols/unreal.py index d63a64d..338e10d 100644 --- a/protocols/unreal.py +++ b/protocols/unreal.py @@ -168,7 +168,7 @@ class UnrealProtocol(TS6BaseProtocol): # Only save our prefix modes in the channel state if our TS is lower than or equal to theirs. utils.applyModes(self.irc, channel, changedmodes) - def pingServer(self, source=None, target=None): + def ping(self, source=None, target=None): """Sends a PING to a target server. Periodic PINGs are sent to our uplink automatically by the Irc() internals; plugins shouldn't have to use this.""" source = source or self.irc.sid