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

providers: don't send empty body/usage lines to IRC #7

Merged
merged 1 commit into from
Nov 11, 2023
Merged

Conversation

dgw
Copy link
Member

@dgw dgw commented Nov 10, 2023

There's no effect visible to the user, but we can eliminate an unnecessary error (412) from the IRC server.

Before:

2023-11-09 21:49:41,145 >>      "PRIVMSG dgw :Manage Sopel's blocking features.\r\n"
2023-11-09 21:49:41,146 >>      'PRIVMSG dgw :\r\n'
2023-11-09 21:49:41,147 >>      'PRIVMSG dgw :Full argspec: `list [nick|host]` or `[add|del] [nick|host] pattern`\r\n'
2023-11-09 21:49:41,148 >>      'PRIVMSG dgw :e.g. .blocks add nick sp(a|4)mb(o|0)t\\d*, .blocks add host some\\.malicious\\.network or .blocks del nick falsep0sitive\r\n'
2023-11-09 21:49:41,193 <<      ':irc.rizon.io 412 SopelTest :No text to send\r\n'

After:

2023-11-09 22:07:00,389 >>      "PRIVMSG dgw :Manage Sopel's blocking features.\r\n"
2023-11-09 22:07:00,390 >>      'PRIVMSG dgw :Full argspec: `list [nick|host]` or `[add|del] [nick|host] pattern`\r\n'
2023-11-09 22:07:00,391 >>      'PRIVMSG dgw :e.g. .blocks add nick sp(a|4)mb(o|0)t\\d*, .blocks add host some\\.malicious\\.network or .blocks del nick falsep0sitive\r\n'

@Exirel
Copy link
Collaborator

Exirel commented Nov 11, 2023

OK I'm going to merge that without the required tests... which I'm going to write myself.

@Exirel Exirel merged commit 2e121ad into master Nov 11, 2023
@Exirel Exirel deleted the empty-lines branch November 11, 2023 13:51
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.

2 participants