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:
parent
e1e3b8d177
commit
4c67a5b438
11
src/users.py
11
src/users.py
@ -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))
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user