AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   An example of an antispam check (https://forums.alliedmods.net/showthread.php?t=182989)

Impact123 04-15-2012 22:09

An example of an antispam check
 
I've seen a few people still struggling with this, so here is my participation.
This simple commented example script shows you how to avoid command/function spamming.
I wrote this for beginners, so it's heavily commented.
Hope it helps!
Code

Yours sincerely
Impact

mcpan313 04-16-2012 08:21

Re: An example of an antispam check
 
thx, it's usefull

animalnots 01-26-2013 08:12

Re: An example of an antispam check
 
Its cool but what about userids ? You should use userids instead of client or there should be a check that it's the same client we're communicating with.
http://wiki.alliedmods.net/Introduct...Entity_Indexes

Impact123 01-26-2013 08:16

Re: An example of an antispam check
 
There is is no need for it, the time will be purged if the client leaves the server.
This is just an simple example to get you started, for example an client can trick this by rejoining the server.

Yours sincerely
Impact

animalnots 01-26-2013 08:29

Re: An example of an antispam check
 
But if he joins again he can spam again.

thetwistedpanda 01-26-2013 09:55

Re: An example of an antispam check
 
The userid will change if the client reconnects. If the value must be maintained, it can be thrown into a clientpref, array, steamid trie, etc.

animalnots 01-26-2013 10:14

Re: An example of an antispam check
 
steamid trie? Give an example.
Array? Is there a dynamic allocated array??

minimoney1 01-26-2013 14:23

Re: An example of an antispam check
 
Quote:

Originally Posted by animalnots (Post 1881023)
steamid trie? Give an example.
Array? Is there a dynamic allocated array??

adt_array is probably what you're looking for.
adt_trie is for tries. Take a look at the API page and you'll get more information.

Ermert1992 01-07-2014 05:48

Re: An example of an antispam check
 
Thanks, I've looked for something like that :)


All times are GMT -4. The time now is 01:44.

Powered by vBulletin®
Copyright ©2000 - 2015, vBulletin Solutions, Inc.