-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changed ircop internal behavior to eliminate a race condition
Before, a method would request OP itself, then add one or more items to one of the buffers, and then set a timer to process the buffers in a few tenths of a second. The buffer processing method checks if it has op, and if it does, assumes it should keep op and doesn't relinquish it afterwards. Usually chanserv was slow enough that this was never a problem. The bot was never OPed before the buffer timer was up and the buffers started processing, so the buffer processor correctly saw it didn't have op and needed it for the request. But today chanserv was unusually fast and it OPed the bot before the buffers starting processing, causing the bot to keep its OP after processing the buffers. I've changed the code to eliminate the calls to get OP in places where it was being called preemtively of the buffer processor. This may cause a slightly longer delay with some commands, but 0.2 seconds shouldn't be enough to matter, and if chanserv is faster for good, then it especially doesn't matter.
- Loading branch information
Showing
1 changed file
with
26 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters