Display IP address and port of user on Login and Quit #41
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.
This PR is in preparation for writing failed logins to a log file, or taking some other DDOS mitigation actions. For now, simply write these details to the console...
login_denied
-> stringlogin_error
to keep track of the specific denial reasonThe new placement of the login success message in
SetWaitPort
(code 2) isn't entirely satisfactory, but the client's listening port isn't known until that point...... However, this discrepancy makes me wonder if any
SRoomList
,SWishlistInterval
,watch
,set_status
andget_pms_for
calls are supposed to occur after the client wait port has been set (i.e. whence the login is considered to be fully established), as it seems like the program might be jumping the gun a bit here, so I'd like to revisit this to make sure the correct order of events does take place compared to the official server, and whether or notproc_message()
should block other cases until the client has set the wait port, or perhaps even disconnect a non-compliant peer whose requests are out of order.