fix user references staying around due to !pingif pinger

also remove ugly hack since we don't need it anymore
This commit is contained in:
jacob1 2017-02-02 22:08:04 -05:00
parent e1e3b8d177
commit 4c67a5b438
2 changed files with 1 additions and 11 deletions

View File

@ -73,17 +73,6 @@ def _get(nick=None, ident=None, host=None, realname=None, account=None, *, allow
return potential[0]
if len(potential) > 1:
# XXX Debugging aid for when this fails (and we can't figure out why)
import sys, gc
all_refs = []
for user in potential:
for ref in gc.get_referrers(user):
for mod_name, module in sys.modules.items():
for var_name, variable in module.__dict__.items():
if ref is variable: # Found it!
all_refs.append((user, mod_name, name))
break
raise ValueError("More than one user matches: " +
_arg_msg.format(nick, ident, host, realname, account, allow_bot))

View File

@ -702,6 +702,7 @@ def join_timer_handler(var):
msg_prefix = messages["ping_player"].format(len(pl), "" if len(pl) == 1 else "s")
channels.Main.send(*user_list, first=msg_prefix)
del to_ping[:]
events.remove_listener("who_result", get_altpingers)
events.remove_listener("who_end", ping_altpingers)