fixed a bug that is caused by fping being used nearly simultaneously by two users

This commit is contained in:
Jimmy Cao 2011-08-04 12:11:26 -05:00
parent 80b4cec6ce
commit 732a6239a8

View File

@ -76,6 +76,7 @@ def connect_callback(cli):
prepare_stuff() prepare_stuff()
var.LAST_PING = 0 # time of last ping var.LAST_PING = 0 # time of last ping
var.PINGING = False
var.ROLES = {"person" : []} var.ROLES = {"person" : []}
var.ORIGINAL_ROLES = {} var.ORIGINAL_ROLES = {}
var.DEAD_USERS = {} var.DEAD_USERS = {}
@ -211,6 +212,8 @@ def pinger(cli, nick, chan, rest):
return return
var.LAST_PING = datetime.now() var.LAST_PING = datetime.now()
if var.PINGING:
return
var.PINGING = True var.PINGING = True
TO_PING = [] TO_PING = []