I wanted to find the simplest and smallest anti-spam plugin for my server.
That search led me to this plugin -> https://forums.alliedmods.net/showthread.php?t=137697
And as you can see that plugin is now old and the author has "abandoned" it.
So i read those few codes he wrote in that 4 different versions of the plugin,
and in the end i basically rearranged the lines/paragraphs so I would get what i needed.
Below in the spoiler is what i wanted and have edited:
// Preprocessor macros (Config) #define KICK_NICK_REASON "Spam in nick!" #define IN_GAME_WARNING_MSG "Advertising other servers or web sites is strictly prohibited!" #define KICK_MSG_REASON "Spam message!" #define MSG_BLOCK_INFO "Advertising on your behalf, please do not advertise other sites/servers"
public plugin_init() { register_plugin("Anti-Spam Lite", "1.0.4", "NullWarez") register_clcmd("say","check_player_msg") register_clcmd("say_team","check_player_msg") }
// Check the nick when connecting public client_connect(id) { if(is_user_admin(id)) return PLUGIN_CONTINUE
// Displays a warning ban for spam public showWarning(id) { if(is_user_connected(id)) client_print(id, print_chat, "Advertising other servers or web sites is strictly prohibited!") }
// Check say or say_team message public check_player_msg(id) { if(is_user_admin(id)) return PLUGIN_CONTINUE
new text[128] read_args(text,127) if(is_invalid(text)) { client_print(id, print_chat, "Advertising other servers or web sites is strictly prohibited!") return PLUGIN_HANDLED } return PLUGIN_CONTINUE }
// Called when set name public client_infochanged(id) { if(is_user_admin(id)) return PLUGIN_CONTINUE
So I combined it and edited few lines to get a plugin which would restrict access
to those who connect to my server with any IP address in their nickname and
it would also restrict to the players to send IP addresses of any other servers
into my server's chat. Tested it a few times, and i was satisfied until i found a
small problem. The plugin restricts connection to the server to those who have
word "depres" in their nickname. I don't understand how that happens or why
that word or combination of letters is exactly the problem, so if there is anyone
who would read this novel of mine and help me out a bit i would be very grateful!
Thanx in advance and sorry if I've done anything that breaks the rules of this board
'cause I'm relatively new here and this is my first topic, be gentle to the new guy!
Greet's!
Last edited by MeinHerzBrennt; 05-07-2015 at 10:24.