]> jfr.im git - irc/eggheads/eggdrop.git/commit
Try to avoid ident race condition
authorMichael Ortmann <redacted>
Mon, 15 Feb 2021 03:08:37 +0000 (03:08 +0000)
committerGitHub <redacted>
Mon, 15 Feb 2021 03:08:37 +0000 (22:08 -0500)
commit9f6bbd60f40f869f46fa4042c40f8ba46c6d2560
tree5cc0edc419d8206740b0f26f6886021b949d8d52
parent746dacd1cff0bc9bbe3c32597ba4f06f9f6dbf7a
Try to avoid ident race condition

Found by: PeGaSuS
Patch by: michaelortmann

This patch moves the check_tcl_event("ident") as close as possible to the connect() call. It was observed that Freenode (perhaps not to standard) sends the ident request earlier than expected in the connection process, sometimes before the client is fully connected/registered. This resulted in incorrect ident information being sent, before it was updated/written by Eggdrop. The write to file was moved up, so that even if we are not fully connected yet, we already have what we need.

This also adds the STAT_SERV entry to the status bitmask, allowing Eggdrop to positively identify this as a server connection, instead of something else (ie, telnet). This could now be used elsewhere in code if it helps
src/eggdrop.h
src/mod/ident.mod/ident.c
src/mod/server.mod/servmsg.c
src/net.c