Commit d481569
committed
coretasks: fix bad WHO tracking stuck in loop
`who_reqs` used to track `WHO` requests to the server 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.
Now, key/values are in a more useful order (channel --map--> querytype).
Also, the unneccessary loop used 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. The same
querytype could even be used for every channel without issue.1 parent e2d8439 commit d481569
1 file changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
702 | 702 | | |
703 | 703 | | |
704 | 704 | | |
705 | | - | |
706 | | - | |
707 | | - | |
| 705 | + | |
708 | 706 | | |
709 | 707 | | |
710 | 708 | | |
| |||
1243 | 1241 | | |
1244 | 1242 | | |
1245 | 1243 | | |
1246 | | - | |
| 1244 | + | |
1247 | 1245 | | |
1248 | 1246 | | |
1249 | 1247 | | |
| |||
1314 | 1312 | | |
1315 | 1313 | | |
1316 | 1314 | | |
1317 | | - | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
1318 | 1318 | | |
1319 | 1319 | | |
1320 | 1320 | | |
| |||
0 commit comments