diff --git a/Changes b/Changes index 94a92e25c..23493d061 100644 --- a/Changes +++ b/Changes @@ -669,3 +669,4 @@ seen. gmtime warning still there - Fixed some rant stuff - Fixed a documentation bug in unrealircd.conf.txt, made config_error actually bitch when loop.ircd_booted +- Made badword fix found by eternal/Jsmj \ No newline at end of file diff --git a/src/s_conf.c b/src/s_conf.c index b16107aad..642a49fd8 100644 --- a/src/s_conf.c +++ b/src/s_conf.c @@ -2260,8 +2260,8 @@ int _conf_badword(ConfigFile *conf, ConfigEntry *ce) ca = MyMallocEx(sizeof(ConfigItem_badword)); if (!ce->ce_vardata) { config_error("%s:%i: badword without type", - cep->ce_fileptr->cf_filename, - cep->ce_varlinenum); + ce->ce_fileptr->cf_filename, + ce->ce_varlinenum); return -1; } diff --git a/src/support.c b/src/support.c index cec6f8e0e..e7e664ac9 100644 --- a/src/support.c +++ b/src/support.c @@ -432,3 +432,26 @@ time_t atime(char *xtime) return ((D * 86400) + (H * 3600) + (M * 60) + S); } + +void iCstrip(char *line) +{ + char *c; + + if ((c = strchr(line, '\n'))) + *c = '\0'; + if ((c = strchr(line, '\r'))) + *c = '\0'; +} + + +char *rfctime(time_t t, char *buf) +{ + struct tm *tp; + + tp = gmtime(&t); + if (tp == 0) { + return 0; + } + strftime(buf, 31, "%a, %d %b %Y %H:%M:%S GMT", tp); + return buf; +}