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

Fix relay port and log #1478

Merged
merged 2 commits into from
Oct 9, 2023
Merged

Fix relay port and log #1478

merged 2 commits into from
Oct 9, 2023

Conversation

michaelortmann
Copy link
Member

@michaelortmann michaelortmann commented Oct 6, 2023

Found by: michaelortmann
Patch by: michaelortmann
Fixes: #1426

One-line summary:
.relay still did old port+1..3 and logging also didnt work properly while .relay-ing

Additional description (if needed):

Test cases demonstrating functionality (if applicable):
For this test user HQ has console +d (debug), testuser2 does not.
Before:
Normal telnet user:

.relay BotB
Connecting to BotB @ 127.0.0.1:4567 ...
(Type *BYE* on a line by itself to abort.)
Could not link to BotB.

HQ (console user):

[20:13:55] tcl: builtin dcc call: *dcc:relay testuser2 7 BotB
[20:13:55] #testuser2# relay BotB
[20:13:55] net: open_telnet_raw(): idx 4 host 127.0.0.1 ip 127.0.0.1 port 4567 ssl 0
[20:13:55] net: attempted socket connection refused: 127.0.0.1:4567
[20:13:55] net: open_telnet_raw(): idx 4 host 127.0.0.1 ip 127.0.0.1 port 4568 ssl 0
[20:13:55] net: attempted socket connection refused: 127.0.0.1:4567
[20:13:55] net: open_telnet_raw(): idx 4 host 127.0.0.1 ip 127.0.0.1 port 4569 ssl 0
[20:13:55] net: attempted socket connection refused: 127.0.0.1:4567
[20:13:55] net: open_telnet_raw(): idx 4 host 127.0.0.1 ip 127.0.0.1 port 4570 ssl 0
[20:13:55] net: attempted socket connection refused: 127.0.0.1:4567

.relay BotB 
[20:15:26] tcl: builtin dcc call: *dcc:relay -HQ 1 BotB
[20:15:26] #-HQ# relay BotB
Connecting to BotB @ 127.0.0.1:4567 ...
(Type *BYE* on a line by itself to abort.)
Could not link to BotB.

After:
Normal telnet user:

.relay BotB
Connecting to BotB @ 127.0.0.1:4567 ...
(Type *BYE* on a line by itself to abort.)
Could not link to BotB.

HQ (console user):

[20:16:35] tcl: builtin dcc call: *dcc:relay testuser2 7 BotB
[20:16:35] #testuser2# relay BotB
[20:16:35] net: open_telnet_raw(): idx 4 host 127.0.0.1 ip 127.0.0.1 port 4567 ssl 0
[20:16:35] net: attempted socket connection refused: 127.0.0.1:4567

.relay BotB
[20:17:27] tcl: builtin dcc call: *dcc:relay -HQ 1 BotB
[20:17:27] #-HQ# relay BotB
Connecting to BotB @ 127.0.0.1:4567 ...
(Type *BYE* on a line by itself to abort.)
[20:17:27] net: open_telnet_raw(): idx 4 host 127.0.0.1 ip 127.0.0.1 port 4567 ssl 0
[20:17:27] net: attempted socket connection refused: 127.0.0.1:4567
Could not link to BotB.

Michael Ortmann added 2 commits October 6, 2023 19:31
@michaelortmann michaelortmann changed the title Fix relay Fix relay port and log Oct 6, 2023
@michaelortmann
Copy link
Member Author

michaelortmann commented Oct 9, 2023

One more test with and without console flag +d (debug) to make sure, console flags are handled as usual while dcc type is DCC_PRE_RELAY:

.whois BotB
[00:30:20] triggering bind dcc:whois
[00:30:20] tcl: builtin dcc call: *dcc:whois -HQ 1 BotB
[00:30:20] #-HQ# whois BotB
HANDLE                           PASS NOTES FLAGS           LAST
BotB                             no       0 b               never (nowhere)
  ADDRESS: 127.0.0.1
     users: 4567, bots: 4567
[00:30:20] triggered bind dcc:whois, user 0.000ms sys 0.195ms
.console -d
[00:29:30] #-HQ# console -d
Set your console to *: mkcoblrxsv (msgs, kicks/modes, cmds, misc, bots, linked bot msgs, raw, files, server input, server output).
.relay BotB
[00:29:38] #-HQ# relay BotB
Connecting to BotB @ 127.0.0.1:4567 ...
(Type *BYE* on a line by itself to abort.)
Could not link to BotB.
.console +d
[00:29:42] #-HQ# console +d
Set your console to *: mkcoblrxsdv (msgs, kicks/modes, cmds, misc, bots, linked bot msgs, raw, files, server input, debug, server output).
.relay BotB
[00:29:45] tcl: builtin dcc call: *dcc:relay -HQ 1 BotB
[00:29:45] #-HQ# relay BotB
Connecting to BotB @ 127.0.0.1:4567 ...
(Type *BYE* on a line by itself to abort.)
[00:29:45] net: open_telnet_raw(): idx 3 host 127.0.0.1 ip 127.0.0.1 port 4567 ssl 0
[00:29:45] net: attempted socket connection refused: 127.0.0.1:4567
Could not link to BotB.

@vanosg vanosg added this to the v1.10 milestone Oct 9, 2023
@vanosg vanosg merged commit 26a8bc9 into eggheads:develop Oct 9, 2023
@michaelortmann michaelortmann deleted the relay branch October 9, 2023 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incomplete fix: Remove eggdrop port+1,2,3 linking
2 participants