Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(WIP) Fix and enhance logging for port already bound #1634

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

michaelortmann
Copy link
Member

@michaelortmann michaelortmann commented Jul 3, 2024

Found by:
Patch by: michaelortmann
Fixes: #1479

One-line summary:
Fix #1479 by not letting the bot die on .rehash over a changed listen port and enhancing error logging, give the user hints, how to fix it.

Additional description (if needed):

Test cases demonstrating functionality (if applicable):
In eggdrop.conf:
listen 4040 all

.tcl listen 127.0.0.1 4040 all 
[23:21:10] tcl: builtin dcc call: *dcc:tcl -HQ 1 listen 127.0.0.1 4040 all
[23:21:10] tcl: evaluating .tcl listen 127.0.0.1 4040 all
[23:21:10] Listening for telnet connections on 127.0.0.1 port 4040 (all).
[23:21:10] tcl: evaluated .tcl listen 127.0.0.1 4040 all, user 0.031ms sys 0.031ms
Tcl: 4040
.rehash
[23:21:16] tcl: builtin dcc call: *dcc:rehash -HQ 1 
[23:21:16] #-HQ# rehash
Rehashing.
[23:21:16] Writing user file...
[23:21:15] Writing channel file...
[23:21:15] Rehashing ...
[23:21:15] Writing channel file...
[23:21:15] Loading dccwhois.tcl...
[23:21:15] Loaded dccwhois.tcl
[23:21:15] Userinfo TCL v1.08 loaded (URL BF GF IRL EMAIL DOB PHONE ICQ YOUTUBE TWITCH).
[23:21:15] use '.help userinfo' for commands.
[23:21:15] Loaded quotepong.tcl
[23:21:15] Listening for telnet connections on 0.0.0.0 port 3333 (all).
[23:21:15] Listening for telnet connections on 0.0.0.0 port +3343 (all).
[23:21:15] WARNING: Port 4040 is already bound to specific IP 127.0.0.1 on this machine, remove it (using listen [ip] <port> off) before trying to bind to IP 0.0.0.0, check listen settings in config file or restart instead of rehash.
[23:21:15] Writing channel file...
[23:21:15] Userfile loaded, unpacking...

@michaelortmann michaelortmann changed the title Fix and enhance logging for port already bound (WIP) Fix and enhance logging for port already bound Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.rehash could let bot die
1 participant