Conversation
…g to report Each sent nothing in some cases, so a client could only give up on its own timeout. FINDIP also gains a closing line, so a client knows when the list has ended. get_ip now returns whether the user exists alongside the IP, because a NULL last_ip and a missing user were both None. Fixes ScarylePoo#61.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GETIP,FINDIP,SETBOTMODEandGETUSERINFOeach answered with silence in some cases: an IP nobody has used, a name that does not exist, a lookup the caller is not allowed to make. A client cannot tell silence from a lost reply, so it waits out its own timeout and then has to guess, which is a poor way to be told "nothing found".Each case now gets a line.
FINDIPalso gets a closing line after a non-empty list, in the shapeLISTBANSalready uses, so a client knows when the list has ended rather than guessing from a gap in the stream.The one judgement call is in
get_ip, which returnedNoneboth for a user who does not exist and for one with no stored address. It now reports the two apart, soGETIPcan say which happened without a second query on the reactor thread. The wording of the new lines is not protocol, and I am happy to change any of it.Fixes #61.