Hello Ppls,
i have rewrite the module ippaddr to spamfilter.c, but i have a question on it.
All times, when an Services Administrator enter the command: "!Spamfilter
www.url.com" on the #channel, this module insert the SPAM-URL into the spamfilter block automatically. After this, i must manually rehash the server config file like ./unreal rehash. But now my question is, is it possible to wrote a command into the spamfilter module that this script rehash the config file automatically after the code below
if ( pFile != NULL ) {
fprintf(pFile, "#Added by %s\n", u->nick);
fprintf(pFile, "spamfilter {\n");
fprintf(pFile, "regex \"%s\";\n", argv[3]);
fprintf(pFile, "target { private; channel; };\n");
fprintf(pFile, "action block;\n");
fprintf(pFile, "reason \"No spam on our network!\";\n");
fprintf(pFile, "};\n");
fprintf(pFile, "\n");
fclose (pFile);
notice(whosends(ci), ci->name, "!spamfilter used by %s: adding: %s",
u->nick, argv[3]);
return MOD_CONT;
}else{
....
}
The method to rehash my config file: --> /home/my_ircd/Unreal3.2/./unreal rehash.
The complete code u can find here:
http://modules.anope.org/index.php?page=browser&id=262&release=1.0.0&name=spamfilter.c&v=43Thx for help