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

run spamfilters against NICK #330

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

run spamfilters against NICK #330

wants to merge 4 commits into from

Conversation

jesopo
Copy link
Member

@jesopo jesopo commented Apr 15, 2022

this isn't perfect because it'll format as

0:nick1!user@host#0 NICK :nick2

(note the :) so maybe I should beat up match_message's snprintf a bit

@dwfreed
Copy link
Member

dwfreed commented Jun 30, 2022

This should also apply to the initial nick, otherwise one could still register with the bad nick. Alarm consumers would need to handle that situation, though.

@jesopo jesopo marked this pull request as ready for review February 2, 2024 01:21
}
if (r & ACT_ALARM) {
sendto_realops_snomask(SNO_GENERAL, L_ALL | L_NETWIDE,
"FILTER:REGISTER: %s@%s",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is my initial solution for how alarm consumers are going to handle this case: slightly different snote. bikeshed on the format please

struct Client *s = data->client;
struct sockaddr *addr = (void *)&s->localClient->ip;

if(find_conf_by_address(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can't make people immune from this by them being an oper, obviously, and this is the only alternative that came to mind

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or maybe we just treat it like a RESV. you have to connect first and then switch your nick

@jesopo
Copy link
Member Author

jesopo commented Feb 2, 2024

i plan to do a second PR after this that runs spamfilters against USER; when i do this im going to move away from using match_message(...) for everything and refactor out the bits of match_message(...) that are useful for things that are not messages, but i thought i'd keep this simple to start with.

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