Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: kokia on Sep 24, 2015, 03:57 AM

Title: anitspammer
Post by: kokia on Sep 24, 2015, 03:57 AM
hello guys how to create IRC bot anti spammer i have no idea how to please tell  me
Title: Re: anitspammer
Post by: DizzasTeR on Sep 24, 2015, 04:18 AM
Which message spam? the messages sent in-game or the one of channel itself?
Title: Re: anitspammer
Post by: Thijn on Sep 24, 2015, 05:44 AM
The principle is the same. What I usually do is make two variables. One to hold warnings, and one to hold times.
When someone says something, you check the time of the previous message. If it's within, something like, 2 seconds, you increase the warnings counter.
You do that until the warnings are above to the amount of lines someone is allowed to spam.
When the message is above 2 seconds of the previous message you reset the warnings to 0.
Quick little piece of code, you'd have to make it work yourself.
if ( ( time() - antiSpamTime[ player.ID ] ) <= 2 ) {
antiSpamWarnings[ player.ID ]++;
if ( antiSpamWarnings[ player.ID ] > 4 ) {
Kick( player );
}
} else {
antiSpamWarnings[ player.ID ] = 0;
}
antiSpamTime[ player.ID ] = time();
Title: Re: anitspammer
Post by: FinchDon on Sep 24, 2015, 08:26 AM
Killerx Next Reply

2 Replies

1.Where i add it?
2.I add it it say antiSpamTime does not exist or antiSpamWarning does not exist
Title: Re: anitspammer
Post by: KAKAN on Sep 24, 2015, 08:47 AM
Quote from: Thijn on Sep 24, 2015, 05:44 AMThe principle is the same. What I usually do is make two variables. One to hold warnings, and one to hold times.
When someone says something, you check the time of the previous message. If it's within, something like, 2 seconds, you increase the warnings counter.
You do that until the warnings are above to the amount of lines someone is allowed to spam.
When the message is above 2 seconds of the previous message you reset the warnings to 0.
Quick little piece of code, you'd have to make it work yourself.
if ( ( time() - antiSpamTime[ player.ID ] ) <= 2 ) {
antiSpamWarnings[ player.ID ]++;
if ( antiSpamWarnings[ player.ID ] > 4 ) {
Kick( player );
}
} else {
antiSpamWarnings[ player.ID ] = 0;
}
antiSpamTime[ player.ID ] = time();
I tried many ways to create a IRC anti-spam function, but it never worked!

Quote from: Doom_Killer on Sep 24, 2015, 04:18 AMWhich message spam? the messages sent in-game or the one of channel itself?
Anything is okay, I just need a example
Title: Re: anitspammer
Post by: FinchDon on Sep 24, 2015, 09:30 AM
maybe the warchiefs spam may work?
Title: Re: anitspammer
Post by: KAKAN on Sep 24, 2015, 11:49 AM
LOL,,!!, we are talking about anti-spam for IRC, not for in-game xD
Title: Re: anitspammer
Post by: MacTavish on Sep 24, 2015, 01:26 PM
This Is Impossible because Chatting on an IRC channel is not from Server side you just have only one way that is mute the channel by /MODE #yourchannel +m
Title: Re: anitspammer
Post by: kokia on Sep 24, 2015, 02:10 PM
i want it for commands spam!!!!
[player.ID] will not work i think on bot!!!!!
i use fbs!!!!!!
help!!!!!!!
please!!!!!!!!!!!!!
thanks!!!!!!!
Title: Re: anitspammer
Post by: Murdock on Sep 24, 2015, 02:55 PM
Quote from: kokia on Sep 24, 2015, 02:10 PMi want it for commands spam!!!!
[player.ID] will not work i think on bot!!!!!
i use fbs!!!!!!
help!!!!!!!
please!!!!!!!!!!!!!
thanks!!!!!!!

i want $10000 from you!!!
send it to my bank account!!!
help!!!!!!!
please!!!!!!!!!!!!!
thanks!!!!!!!
Title: Re: anitspammer
Post by: SAzEe21 on Oct 10, 2015, 07:34 PM
use /mode #Channel +Kfnt 3:5 ( 3 for 3 times player types then get kicked in 5 seconds. ).
Title: Re: anitspammer
Post by: KAKAN on Oct 10, 2015, 07:48 PM
Really? It would be very helpful.
Title: Re: anitspammer
Post by: Xmair on Oct 11, 2015, 03:45 AM
Uh, I told you guys that XD
Title: Re: anitspammer
Post by: KAKAN on Oct 11, 2015, 04:47 AM
Quote from: Xmair on Oct 11, 2015, 03:45 AMUh, I told you guys that XD
You actually never did it, atleast not in this topic.
Title: Re: anitspammer
Post by: Xmair on Oct 11, 2015, 05:20 AM
I did it in every channel which I am set +O, It should be locked now.