removing bad latency command
This commit is contained in:
parent
16102be5ad
commit
85b2df3277
22
plugin.py
22
plugin.py
|
|
@ -116,13 +116,6 @@ class TriviaTime(callbacks.Plugin):
|
|||
irc.sendMsg(ircmsgs.privmsg(channel, 'Giving MVP to %s for being top #%d this WEEK' % (username, user[15])))
|
||||
irc.queueMsg(ircmsgs.voice(channel, username))
|
||||
|
||||
def doPong(self, irc, msg):
|
||||
username = str.lower(msg.args[1])
|
||||
if username in self.pings:
|
||||
pingTime = float(time.time() - self.pings[username][1])
|
||||
irc.sendMsg(ircmsgs.privmsg(self.pings[username][0], """%s: Pong: response %0.2f seconds""" % (username, pingTime)))
|
||||
del self.pings[username]
|
||||
|
||||
def deletequestion(self, irc, msg, arg, id):
|
||||
"""<question id>
|
||||
Deletes a question from the database.
|
||||
|
|
@ -256,21 +249,6 @@ class TriviaTime(callbacks.Plugin):
|
|||
alltime = wrap(alltime)
|
||||
"""
|
||||
|
||||
def latency(self, irc, msg, arg):
|
||||
username = str.lower(msg.nick)
|
||||
channel = ircutils.toLower(msg.args[0])
|
||||
expiredPings = []
|
||||
for ping in self.pings:
|
||||
if time.time() - self.pings[ping] > 60:
|
||||
expiredPings.append(ping)
|
||||
for ping in expiredPings:
|
||||
del expiredPings[ping]
|
||||
if username in self.pings:
|
||||
return
|
||||
self.pings[username] = (channel, time.time())
|
||||
irc.sendMsg(ircmsgs.ping(username))
|
||||
latency = wrap(latency)
|
||||
|
||||
def edit(self, irc, msg, arg, num, question):
|
||||
"""<question number> <corrected text>
|
||||
Correct a question by providing the question number and the corrected text.
|
||||
|
|
|
|||
Loading…
Reference in New Issue