pydle
pydle copied to clipboard
Possible to create users that never get cleaned up
Currently, members of self.users
are primarily only destroyed when Pydle or the user in question leaves a channel. However, there are numerous events that call _sync_user
, which will create the user in question if they don't already exist -- including receiving a NOTICE or PRIVMSG from another user.
Since these users are not necessarily in the same channel, Pydle will never see them leaving the channel and thus never know to clean them up. This can cause the users dict to become bloated over time.
(Also didn't receive this one over email. Odd.)
Yeah, I'm aware of this, but currently not sure of a good method to fix this. Maybe a timed WHOIS or MONITOR for servers that support it.
I think my hackish workaround checks to see if the user I'm question shares channels with us at the end of one of the relevant methods, and -- if not -- destroys them. I'll see if I'm functional enough to dig out the source when I get home