mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-20 01:19:26 +01:00
Added @network uptime
This commit is contained in:
parent
51ef07caf5
commit
de89a9bf90
@ -317,6 +317,18 @@ class Network(callbacks.Plugin):
|
|||||||
irc.reply(otherIrc.driver.__class__.__module__[8:])
|
irc.reply(otherIrc.driver.__class__.__module__[8:])
|
||||||
driver = wrap(driver, ['networkIrc'])
|
driver = wrap(driver, ['networkIrc'])
|
||||||
|
|
||||||
|
@internationalizeDocstring
|
||||||
|
def uptime(self, irc, msg, args, otherIrc):
|
||||||
|
"""[<network>]
|
||||||
|
|
||||||
|
Returns the time duration since the connection was established.
|
||||||
|
"""
|
||||||
|
network = otherIrc.network
|
||||||
|
now = time.time()
|
||||||
|
started = otherIrc.startedAt
|
||||||
|
irc.reply(_("I've been connected to %s for %s.") %
|
||||||
|
(network, utils.timeElapsed(now - started)))
|
||||||
|
uptime = wrap(uptime, ['networkIrc'])
|
||||||
|
|
||||||
Class = Network
|
Class = Network
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user