Fix filter code
This commit is contained in:
parent
774951afaf
commit
bb8276a16f
|
@ -137,13 +137,11 @@ signed int prepare_log_path(IRC_Message* message, PathBuf* pathbuffer, Connectio
|
||||||
elements[1].isdir = false;
|
elements[1].isdir = false;
|
||||||
} else if (ISCMD(PRIVMSG) || ISCMD(NOTICE)) {
|
} else if (ISCMD(PRIVMSG) || ISCMD(NOTICE)) {
|
||||||
if (message->args[0] == NULL) return -2;
|
if (message->args[0] == NULL) return -2;
|
||||||
if (*message->args[0] != '#' && *message->args[0] != '&' && *message->args[0] != '+' && *message->args[0] != '!') {
|
if (*message->args[0] != '#' && *message->args[0] != '&' && *message->args[0] != '+' && *message->args[0] != '!' && message->name.nick != NULL) {
|
||||||
elements[0].name = reused_strings[1];
|
elements[0].name = reused_strings[1];
|
||||||
strncpy(temp, message->args[0], sizeof(temp));
|
|
||||||
} else if (message->name.nick != NULL) {
|
|
||||||
strncpy(temp, message->name.nick, sizeof(temp));
|
strncpy(temp, message->name.nick, sizeof(temp));
|
||||||
} else
|
} else
|
||||||
return -2;
|
strncpy(temp, message->args[0], sizeof(temp));
|
||||||
cleanup_path_names(temp);
|
cleanup_path_names(temp);
|
||||||
elements[1].name = temp;
|
elements[1].name = temp;
|
||||||
} else if (ISCMD(RPL_TOPIC) || ISCMD(RPL_NOTOPIC)) {
|
} else if (ISCMD(RPL_TOPIC) || ISCMD(RPL_NOTOPIC)) {
|
||||||
|
|
Reference in New Issue