mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-23 19:19:31 +01:00
protocols: rename pingServer -> ping
This commit is contained in:
parent
3d0bf18001
commit
812a866a4e
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user