Skip to content

Conversation

@thommey
Copy link
Member

@thommey thommey commented Dec 31, 2025

Found by: various
Patch by: thommey

One-line summary: Understand mode info from raw 005 isupport and parse modes correctly

Additional description (if needed):
Phase 1 is parsing mode info from ISUPPORT raw 005 and using it to properly split modes (primarily for bind mode / pushmode).
It is not intended to overhaul eggdrop's mode enforcement or understanding of/reaction to modes.
The goal is to introduce proper parsing without breaking anything first.

Test cases demonstrating functionality (if applicable):
Basic parsing unit tests: cd src/mod/irc.mod && make test (needs criterion)

FULL FF-MERGE, NO SQUASHING

Commit history is clean, review individual commits instead of full diff

@thommey thommey force-pushed the feature/arbchanmodes2 branch 2 times, most recently from 005b4d7 to c6e5a76 Compare December 31, 2025 16:49
@thommey thommey force-pushed the feature/arbchanmodes2 branch 4 times, most recently from 0258744 to acf0fcd Compare December 31, 2025 21:40
@thommey thommey force-pushed the feature/arbchanmodes2 branch from acf0fcd to 772f123 Compare December 31, 2025 21:59
@thommey thommey force-pushed the feature/arbchanmodes2 branch from 772f123 to 8303e27 Compare January 3, 2026 17:10
return result;
}

char *join_str_array(char **argv, int argc, char *delim)
Copy link
Member

Choose a reason for hiding this comment

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

can we have last parameter type char or is there a need for delimiters longer than 1 char?

Copy link
Member

Choose a reason for hiding this comment

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

on the other hand, i can imagine things delimiters like ", ". but i think for generic misc functions exported via module API, we should make the output buffer a parameter and len, not a static array. could be useful for threaded code or for code that needs to join into a buffer longer than 512 chars.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think keeping it open for multi-char delimiters is more flexible and doesn't make it any more difficult to use.
Caller-provided buffer with length limitation makes sense, I'll change that.

void splitcn(char *, char *, char, size_t);
void remove_crlf(char **);
parsed_irc_t parse_irc(char *);
char *join_str_array(char **argv, int argc, char *delim);
Copy link
Member

Choose a reason for hiding this comment

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

remove variable names?

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.

3 participants