Skip to content
Snippets Groups Projects
Commit d99905a4 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Lowercase the topics in hack and spam action messages

parent ae705bb6
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #3699 passed
......@@ -62,6 +62,7 @@ extern "C" BOOL hacklog(scfg_t* cfg, struct mqtt* mqtt, const char* prot, const
text= "";
snprintf(str, sizeof(str), "%s\t%u\t%s\t%s\t%s", user, inet_addrport(addr), host, ip, text);
snprintf(topic, sizeof(topic), "hack/%s", prot);
strlwr(topic);
mqtt_pub_timestamped_msg(mqtt, TOPIC_BBS_ACTION, topic, now, str);
}
......@@ -120,6 +121,7 @@ extern "C" BOOL spamlog(scfg_t* cfg, struct mqtt* mqtt, char* prot, char* action
reason = (char*)"";
snprintf(str, sizeof(str), "%s\t%s\t%s\t%s\t%s\t%s", prot, host, ip_addr, from, to_user, reason);
snprintf(topic, sizeof(topic), "spam/%s", action);
strlwr(topic);
mqtt_pub_timestamped_msg(mqtt, TOPIC_BBS_ACTION, topic, now, str);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment