Skip to content

run spamfilters against NICK#330

Open
jesopo wants to merge 4 commits intomainfrom
jess/filter-nick
Open

run spamfilters against NICK#330
jesopo wants to merge 4 commits intomainfrom
jess/filter-nick

Conversation

@jesopo
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 jesopo requested a review from spb February 2, 2024 14:50
@jesopo
Copy link
Copy Markdown
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