Keslertje2005 Posted February 17, 2007 Share Posted February 17, 2007 Hi scripters, As some of you might know I'ts possible to flood the server with commands like: !admin!admin !admin !admin !admin !admin This makes MIRC very slow, does any one know how to solve this problem? Because we can't ban them when they use this, only when we use remote admin... Thanks already! Link to comment
lil Toady Posted February 17, 2007 Share Posted February 17, 2007 i already posted a script to solve this, search the forum Link to comment
Keslertje2005 Posted February 17, 2007 Author Share Posted February 17, 2007 I searched on Flood kick... but didnt found anything Link to comment
lil Toady Posted February 17, 2007 Share Posted February 17, 2007 (edited) on *:SIGNAL:mta.command:{ if (!%command [ $+ [ $1 ] $+ [ $3 ] ]) { set -u3 %command [ $+ [ $1 ] $+ [ $3 ] ] 1 } else mta.msg $1 $2 Please don't use the command $+(',$3,') so much. } Edited February 18, 2007 by Guest Link to comment
Keslertje2005 Posted February 17, 2007 Author Share Posted February 17, 2007 Is this script for mta sa? And does this mean I have to add to all commands 2 spaces? Link to comment
lil Toady Posted February 17, 2007 Share Posted February 17, 2007 just find the 'on *:SIGNAL:mta.command:{ ' in your script, copy everything under it and put there, this is for mta0.5, if you want it to work with mta:sa change the mta.msg to mta.pm, thats all Link to comment
Keslertje2005 Posted February 18, 2007 Author Share Posted February 18, 2007 } on *:SIGNAL:mta.command: { ;Parameters: ;$1 = Server ;$2 = ID ;$3 = Command ;$4- = Parameters var %a = $iif($4,$iif($mta.nick($1,$4) != $null,$4,$gus.getid($1,$4)),$2) /* ///////////////////////////////////////////////////// ////////////// MTA:mA:GUS RPG ///////////// ///////////////////////////////////////////////////// // ..Work in Progress.. // // ..Please remember to update.. // ///////////////////////////////////////////////////// */ if (!%command [ $+ [ $1 ] $+ [ $3 ] ]) { set -u3 %command [ $+ [ $1 ] $+ [ $3 ] ] 1 if (!vote* iswm $3) { if ($gus.didvote($1,$2) == 0) { if ($4 == $null) mta.pm $1 $2 Error - $3 <1> elseif ($4) { if (10 >= $4 && $4 >= 1) { mta.pm $1 $2 You have given race " $+ $mta.race($1) $+ " a $4 $+ /10 Rating. ( $+ $calc($4 * 10) $+ $chr(37) $+ ) !writeini -n " $+ $scriptdir $+ vote.ini" MAP $replace($mta.race($1),$chr(32),-) $gus.add($gus.votes($1),1) !writeini -n " $+ $scriptdir $+ vote.ini" VOTE $replace($mta.race($1),$chr(32),-) $+ $mta.nick($1,$2) 1 !writeini -n " $+ $scriptdir $+ vote.ini" PERCENT $replace($mta.race($1),$chr(32),-) $gus.add($gus.votepercent($1),$calc($4 * 10)) } else mta.pm $1 $2 Error - $3 <1> } else mta.pm $1 $2 Error - $3 <1> } else mta.pm $1 $2 Error - You have already voted on this map. } elseif ($3 == !rating) { Thats what I did... but I dont think thats the way. I put that other message at the end of all the commands with mta.text.. What did u do wrong? Link to comment
DazzaJay Posted February 18, 2007 Share Posted February 18, 2007 just a side note, i did some command flood testing on my server, and i discovered that it doesnt just affect the mirc server.... i tested it with !info programmed into my G15 keyboard, so i could mash the button.... it doesnt take much to completely crash mirc, but whats worse is, when its done in rapid succession, it can completely lock up the game on other peoples computers, such as my mates who was helping me test. so i believe that all tho there is a problem with mIRC trying to reply to command spamming, there is also a problem with MTA itself that doesnt like it. --------------------- also, does that script mute or kick said player for spamming? cos im looking for something like that to help protect against that kind of thing. Link to comment
CoZ Posted February 18, 2007 Share Posted February 18, 2007 (edited) } if (!%command [ $+ [ $1 ] $+ [ $3 ] ]) { set -u3 %command [ $+ [ $1 ] $+ [ $3 ] ] 1 if (!vote* iswm $3) { Thats what I did... but I dont think thats the way. I put that other message at the end of all the commands with mta.text.. What did u do wrong? it should be (edit .. i meant in general) if { } elseif {} elseif {} etcetcetc Edited February 18, 2007 by Guest Link to comment
Keslertje2005 Posted February 18, 2007 Author Share Posted February 18, 2007 Dit this: on *:SIGNAL:mta.command: { ;Parameters: ;$1 = Server ;$2 = ID ;$3 = Command ;$4- = Parameters var %a = $iif($4,$iif($mta.nick($1,$4) != $null,$4,$gus.getid($1,$4)),$2) if (!%command [ $+ [ $1 ] $+ [ $3 ] ]) { set -u3 %command [ $+ [ $1 ] $+ [ $3 ] ] 1 } /* ///////////////////////////////////////////////////// ////////////// MTA:mA:GUS RPG ///////////// ///////////////////////////////////////////////////// // ..Work in Progress.. // // ..Please remember to update.. // ///////////////////////////////////////////////////// */ elseif (!vote* iswm $3) { if ($gus.didvote($1,$2) == 0) { if ($4 == $null) mta.pm $1 $2 Error - $3 <1> elseif ($4) { if (10 >= $4 && $4 >= 1) { mta.pm $1 $2 You have given race " $+ $mta.race($1) $+ " a $4 $+ /10 Rating. ( $+ $calc($4 * 10) $+ $chr(37) $+ ) !writeini -n " $+ $scriptdir $+ vote.ini" MAP $replace($mta.race($1),$chr(32),-) $gus.add($gus.votes($1),1) !writeini -n " $+ $scriptdir $+ vote.ini" VOTE $replace($mta.race($1),$chr(32),-) $+ $mta.nick($1,$2) 1 !writeini -n " $+ $scriptdir $+ vote.ini" PERCENT $replace($mta.race($1),$chr(32),-) $gus.add($gus.votepercent($1),$calc($4 * 10)) } Still isnt workin Link to comment
lil Toady Posted February 18, 2007 Share Posted February 18, 2007 of course, you're doing it wrong... i said: on *:SIGNAL:mta.command:{ if (!%command [ $+ [ $1 ] $+ [ $3 ] ]) { set -u3 %command [ $+ [ $1 ] $+ [ $3 ] ] 1 } else mta.msg $1 $2 Please don't use the command $+(',$3,') so much. } and you do: on *:SIGNAL:mta.command:{ if (!%command [ $+ [ $1 ] $+ [ $3 ] ]) { set -u3 %command [ $+ [ $1 ] $+ [ $3 ] ] 1 } else mta.msg $1 $2 Please don't use the command $+(',$3,') so much. } see the difference? do like i said Link to comment
Keslertje2005 Posted February 18, 2007 Author Share Posted February 18, 2007 that is because your command didnt work, and I tryed the other thing that other guy told me to do Link to comment
Scooby Posted February 19, 2007 Share Posted February 19, 2007 I have a Spam checker in The PRS script, in hash, however it should work okish in an ini, i havent tested this, but it should be ok. alias spamcheck { if ($readini(spamtemp,id,$1 $+ $2) == spam) { mta.pm $1 $2 WARNING - DO NO SPAM!!! (30 sec mute) mta.mute $1 $2 .timerunmute $+ $2 1 30 mta.unmute $1 $2 } !writeini spamtemp id $1 $+ $2 spam .timerspam $+ $1 $+ $2 -m 1 900 !remini spamtemp id $1 $+ $2 } also, add to ur first line of mta.text and mta.command, spamcheck $1- the 900 is the delay in miliseconds, if ur not happy with the time, u can change this number, but i tested it in my script and it seemed ok. Link to comment
Aggressor Posted February 19, 2007 Share Posted February 19, 2007 I have a Spam checker in The PRS script, in hash, however it should work okish in an ini, i havent tested this, but it should be ok. alias spamcheck { if ($readini(spamtemp,id,$1 $+ $2) == spam) { mta.pm $1 $2 WARNING - DO NO SPAM!!! (30 sec mute) mta.mute $1 $2 .timerunmute $+ $2 1 30 mta.unmute $1 $2 } !writeini spamtemp id $1 $+ $2 spam .timerspam $+ $1 $+ $2 -m 1 900 !remini spamtemp id $1 $+ $2 } also, add to ur first line of mta.text and mta.command, spamcheck $1- the 900 is the delay in miliseconds, if ur not happy with the time, u can change this number, but i tested it in my script and it seemed ok. Ah, thats nice so i dont have to type in all commands again. Does this work in mtavc version to? Link to comment
SanZoR.Sr Posted February 19, 2007 Share Posted February 19, 2007 Yep, you just need changed some stuff to other ones. Then it works in MTA:VC and MTA:SA. Link to comment
Scooby Posted February 19, 2007 Share Posted February 19, 2007 I have a Spam checker in The PRS script, in hash, however it should work okish in an ini, i havent tested this, but it should be ok. alias spamcheck { if ($readini(spamtemp,id,$1 $+ $2) == spam) { mta.pm $1 $2 WARNING - DO NO SPAM!!! (30 sec mute) mta.mute $1 $2 .timerunmute $+ $2 1 30 mta.unmute $1 $2 } !writeini spamtemp id $1 $+ $2 spam .timerspam $+ $1 $+ $2 -m 1 900 !remini spamtemp id $1 $+ $2 } also, add to ur first line of mta.text and mta.command, spamcheck $1- the 900 is the delay in miliseconds, if ur not happy with the time, u can change this number, but i tested it in my script and it seemed ok. Ah, thats nice so i dont have to type in all commands again. Does this work in mtavc version to? There is no mta.mute in VC so it wont work, however, u could change it slightly to make it kick the player. by changing: mta.pm $1 $2 WARNING - DO NO SPAM!!! (30 sec mute) mta.mute $1 $2 .timerunmute $+ $2 1 30 mta.unmute $1 $2 to: mta.msg $1 $2 Warning - Do Not Spam In This Server! mta.kick $1 $2 this should work. Link to comment
SanZoR.Sr Posted February 19, 2007 Share Posted February 19, 2007 I have a Spam checker in The PRS script, in hash, however it should work okish in an ini, i havent tested this, but it should be ok. alias spamcheck { if ($readini(spamtemp,id,$1 $+ $2) == spam) { mta.pm $1 $2 WARNING - DO NO SPAM!!! (30 sec mute) mta.mute $1 $2 .timerunmute $+ $2 1 30 mta.unmute $1 $2 } !writeini spamtemp id $1 $+ $2 spam .timerspam $+ $1 $+ $2 -m 1 900 !remini spamtemp id $1 $+ $2 } also, add to ur first line of mta.text and mta.command, spamcheck $1- the 900 is the delay in miliseconds, if ur not happy with the time, u can change this number, but i tested it in my script and it seemed ok. Ah, thats nice so i dont have to type in all commands again. Does this work in mtavc version to? There is no mta.mute in VC so it wont work, however, u could change it slightly to make it kick the player. by changing: mta.pm $1 $2 WARNING - DO NO SPAM!!! (30 sec mute) mta.mute $1 $2 .timerunmute $+ $2 1 30 mta.unmute $1 $2 to: mta.msg $1 $2 Warning - Do Not Spam In This Server! mta.kick $1 $2 this should work. Really? I think mute is in every MTA version... Well, im not playing VC, so thats clearly i dont know anything about it. lol. Link to comment
2paq Posted April 16, 2007 Share Posted April 16, 2007 Yesterady to idiot had been spaming on my serwer and I wrote this: on *:SIGNAL:mta.command: { spam.check $1 $2 } on *:SIGNAL:mta.text: { spam.check $1 $2 } alias spam.check { var %spam = $iif($readini($scriptdir $+ spamtemp.ini,SPAM,$mta.nick($1,$2)),$v1,0) if (%spam > 10) { mta.mute $1 $2 $+(!.timer.spam.pm,$2) 1 5 mta.pm $1 $2 WARNING - DO NO SPAM (MUTE 180s) $+(!.timer.spam.attack,$2) 1 180 spam.errase $1 $2 } !writeini -n " $+ $scriptdir $+ spamtemp.ini" SPAM $mta.nick($1,$2) $iif($readini($scriptdir $+ spamtemp.ini,SPAM,$mta.nick($1,$2)),$calc($v1 + 1),1) $+(!.timer.spam.check,$2) 1 2 !writeini -n " $+ $scriptdir $+ spamtemp.ini" SPAM $mta.nick($1,$2) $iif($readini($scriptdir $+ spamtemp.ini,SPAM,$mta.nick($1,$2)),$calc($v1 - 1),0) } alias spam.errase { mta.unmute $1 $2 !writeini -n " $+ $scriptdir $+ spamtemp.ini" SPAM $mta.nick($1,$2) $iif($readini($scriptdir $+ spamtemp.ini,SPAM,$mta.nick($1,$2)),0,0) } It work similary as Sc00bY script but a litle difrent Edit: This works better but sometime in mIRC say: * /writeini: insufficient parameters (line 25, spamattack.mrc) This is the line (midle): alias spam.dec { !writeini -n " $+ $scriptdir $+ spamtemp.ini" SPAM $mta.nick($1,$2) $iif($readini($scriptdir $+ spamtemp.ini,SPAM,$mta.nick($1,$2)),$calc($v1 - 1),0) } This is all code: on *:SIGNAL:mta.command: { spam.check $1 $2 } on *:SIGNAL:mta.text: { spam.check $1 $2 } on *:SIGNAL:mta.part: { !writeini -n " $+ $scriptdir $+ spamtemp.ini" SPAM $mta.nick($1,$2) 0 } alias spam.check { var %spam = $iif($readini($scriptdir $+ spamtemp.ini,SPAM,$mta.nick($1,$2)),$v1,0) if (%spam > 10) { mta.mute $1 $2 $+(!.timer.spam.pm,$2) 1 5 mta.pm $1 $2 WARNING - DO NO SPAM (MUTE 180s) $+(!.timer.spam.attack,$2) 1 180 spam.errase $1 $2 } !writeini -n " $+ $scriptdir $+ spamtemp.ini" SPAM $mta.nick($1,$2) $iif($readini($scriptdir $+ spamtemp.ini,SPAM,$mta.nick($1,$2)),$calc($v1 + 1),1) $+(!.timer.spam.check,$2,$rand(1,99)) 1 2 spam.dec $1 $2 } alias spam.errase { mta.unmute $1 $2 !writeini -n " $+ $scriptdir $+ spamtemp.ini" SPAM $mta.nick($1,$2) $iif($readini($scriptdir $+ spamtemp.ini,SPAM,$mta.nick($1,$2)),0,0) } alias spam.dec { !writeini -n " $+ $scriptdir $+ spamtemp.ini" SPAM $mta.nick($1,$2) $iif($readini($scriptdir $+ spamtemp.ini,SPAM,$mta.nick($1,$2)),$calc($v1 - 1),0) } Link to comment
Recommended Posts