Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
coretasks: fix bad WHO loop, update querytype
who_reqs, which is used to track WHO requests to the server, had flipped keys/values and was never getting cleared upon RPL_ENDOFWHO. Eventually, this would lead to an endless loop while the bot tried to get an unused "querytype" (randint) in order to track WHO replies. This unneccessary loop/check to ensure unique values for the query type was removed. A RPL_WHOREPLY includes the channel name in the response, so confirming that the querytype for a channel matched is sufficient. querytype should be unique _per purpose_. So, now a constant querytype is used for `coretasks` WHO(X) requests. Notes: According to [the closest thing to] official specs: ircv3/ircv3-specifications#81 (comment) querytypes should be useful to: > simplify scripting, in example one could pass a certain value in the query > and have that value "signal" back what is to be done with those replies. Also see: https://github.com/quakenet/snircd/blob/17c92003d376c70db674821e92f2880ba1587132/doc/readme.who#L154 https://github.com/quakenet/snircd/blob/17c92003d376c70db674821e92f2880ba1587132/doc/readme.who#L105
- Loading branch information