Log unhandled IRC errors as LOG_INFO in bip.log #8
Loading…
Reference in New Issue
No description provided.
Delete Branch "Kyoshiro/bip:481_irc_errors"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We can discuss the level where this is logged.
I have set to log on bip log level INFO, but then we can move to WARN (not sure this is relevant though).
Fixes https://projects.duckcorp.org/issues/481
56a4c15130
toc14f4634b6
@ -143,6 +143,13 @@ void irc_line_drop(struct line *line, int elem)
bip_cfree(array_drop(&line->words, elem));
}
unsigned int irc_line_is_error(struct line *line)
Other functions use
int
instead ofunsigned int
. Shouldunsigned int
be used everywhere? Or c99/stdbool.h be used?I did not realize that, indeed using c99/stdbool.h would make sense, but then that's a somewhat large change.
In the meantime, I've updated the code to use
int
to match the rest of the code.Thanks!
@ -146,0 +147,4 @@
{
const char *irc_code = irc_line_elem(line, 0);
const char *error_code = "4";
return (irc_code[0] == error_code[0]);
Not a request to change: i would have used
return *irc_code == '4';
because it seems closer to the style used in this file.Oh I agree, and it is simpler also.
I don't know why I did that 😆
Thanks again!
c14f4634b6
toad77e19bfe
Force pushed with fixes, thanks!
ad77e19bfe
tod19099eb3c