Bug Uninterruptable checkplurals

Cool12309

Member
If the checkplurals command is called, it cannot be stopped. Pressing escape or clicking "stop now" does nothing, and graygui force isn't clearing the queue/clearing it. If I use the chat cli to do graygui force, it resumes (limited testing seems to show it's still happening even before I did the chat clear, but it wasn't printing), with the Requests complete. message showing after ever message. Also, if I log out and back in, the command is still running, though now using my old password hash.
Also, kind of related to what I'm doing with checkplurals, how do I make the checkplurals output print to the session log?
 

Veracity

Developer
Staff member
The various (intended for developers) long-running "check" commands are Java, not ASH, and would have to be hardcoded to recognize that the esc key was pressed. The "running over logout" thing is interesting; I suspect even an infinitely looping ASH script would behave that way, too.

That said, there is a recently added variable - StaticEntity.userAborted - which is "true" if the user hit the "stop now" button or pressed the Esc key. This is checked in KoLmafia.refusesContinue(), which SHOULD be checked in anything which loops making requests. However, checkplurals doesn't actually make "requests" - i.e., use RequestThread. It goes straight to HttpURLConnection to read pages from the Wiki.

It would probably be nice if all the "check" commands which loop and read things from the net checked refusesContinue in their loop and cleanly abort if it is true.
 
Top