Ford Posted November 6, 2007 Share Posted November 6, 2007 Hi! I was wondering if I manage to make admins ping-kick proof (scripts don't kick them for high ping). I found a block of text responsible for kicking players for high ping, and made few changes: alias gus.pingkick { var %a = 0,%b = 0 while (%a < $mta.server($1).cmax) { if ($mta.nick($1,%a) != -1 && $gus.maxping($1) isnum) { if ($mta.ping($1,%a) >= $gus.maxping($1) && $mta.ping($1,%a) != 0) { if ($gus.level($1,$2) < 1) { mta.text $1 Kicking $mta.nick($1,%a) - Ping: $mta.ping($1,%a) - Max Ping: $gus.maxping($1) $mta.kick($1,%a) } !inc %b } } !inc %a } } It seems like it almost work, it doesn't show message "Kicking Ford - Ping 350 - Max Ping 300" but kicks player anyway What's wrong? Link to comment
Ford Posted November 6, 2007 Author Share Posted November 6, 2007 And one more thing: here is a script my friend found somewhere, I belive it was on this forum, a changed it a bit, but one thing doesn't work: alias gus.warns !return $iif($readini(gus.warns.ini,WARNS,$mta.nick($1,$2)),$v1,0)alias gus.getid { var %a = 0 while (%a <= $mta.server($1).cmax) { if ($+(*,$2,*) iswm $mta.nick($1,%a)) !return %a !inc %a } !return -1 } on *:SIGNAL:mta.command:{ var %a = $iif($4,$iif($mta.nick($1,$4) != $null,$4,$gus.getid($1,$4)),$2) if ($3 == !warn) { if ($gus.level($1,$2) < 7) Error - Level Needed 7 else { !writeini -n gus.warns.ini WARNS $mta.nick($1,%a) $calc($gus.warns($1,%a) + 1) if ($gus.warns($1,%a) = 1) { mta.text $1 Admin $mta.nick($1,$2) warned $mta.nick($1,%a) $+ , total warnings: $gus.warns($1,%a) $+ /3 ! } else { if ($gus.warns($1,%a) = 2) { mta.text $1 Admin $mta.nick($1,$2) warned $mta.nick($1,%a) $+ , total warnings: $gus.warns($1,%a) $+ /3 ! .timer 1 1 mta.kick $1 %a } else ( if ($gus.warns($1,%a) => 3) { mta.text $1 Admin $mta.nick($1,$2) warned $mta.nick($1,%a) $+ , total warnings: $gus.warns($1,%a) $+ /3 ! .timer 1 1 mta.ban $1 %a } } } } elseif ($3 == !unwarn) { if ($gus.level($1,$2) < 7) Error - Level Needed 7 else { !writeini -n gus.warns.ini WARNS $mta.nick($1,%a) 0 mta.text $1 Admin $mta.nick($1,$2) removed all warnings for $mta.nick($1,%a) $+ ! } } } } on *:SIGNAL:mta.join:{ if ($gus.warns($1,%a) => 3) { mta.text $1 $mta.nick($1,%a) has more than 3 warnings. .timer 1 1 mta.ban $1 %a } } Bold part of scripts doesn't work, why? Link to comment
[UVA]Bart Posted November 7, 2007 Share Posted November 7, 2007 Hi!I was wondering if I manage to make admins ping-kick proof (scripts don't kick them for high ping). I found a block of text responsible for kicking players for high ping, and made few changes: alias gus.pingkick { var %a = 0,%b = 0 while (%a < $mta.server($1).cmax) { if ($mta.nick($1,%a) != -1 && $gus.maxping($1) isnum) { if ($mta.ping($1,%a) >= $gus.maxping($1) && $mta.ping($1,%a) != 0) { if ($gus.level($1,$2) < 1) { mta.text $1 Kicking $mta.nick($1,%a) - Ping: $mta.ping($1,%a) - Max Ping: $gus.maxping($1) $mta.kick($1,%a) } !inc %b } } !inc %a } } It seems like it almost work, it doesn't show message "Kicking Ford - Ping 350 - Max Ping 300" but kicks player anyway What's wrong? ping kicker think it will work. alias gus.pingkick { var %a = 0 while (%a < $mta.server($1).cmax) { if ($mta.nick($1,%a) != -1 && $gus.maxping($1) isnum) { if ($mta.ping($1,%a) >= $gus.maxping($1) && $mta.ping($1,%a) != 0) && ($gus.level($1,%a) < 1) { mta.text $1 Kicking $mta.nick($1,%a) - Ping: $mta.ping($1,%a) - Max Ping: $gus.maxping($1) $mta.kick($1,%a) } !inc %a } } } the warn one there wasnt a space between the signal and the bracket causing a bracket mismatch alias gus.warns !return $iif($readini(gus.warns.ini,WARNS,$mta.nick($1,$2)),$v1,0) alias gus.getid { var %a = 0 while (%a <= $mta.server($1).cmax) { if ($+(*,$2,*) iswm $mta.nick($1,%a)) !return %a !inc %a } !return -1 } on *:SIGNAL:mta.command:{ var %a = $iif($4,$iif($mta.nick($1,$4) != $null,$4,$gus.getid($1,$4)),$2) if ($3 == !warn) { if ($gus.level($1,$2) < 7) Error - Level Needed 7 else { !writeini -n gus.warns.ini WARNS $mta.nick($1,%a) $calc($gus.warns($1,%a) + 1) if ($gus.warns($1,%a) = 1) { mta.text $1 Admin $mta.nick($1,$2) warned $mta.nick($1,%a) $+ , total warnings: $gus.warns($1,%a) $+ /3 ! } else { if ($gus.warns($1,%a) = 2) { mta.text $1 Admin $mta.nick($1,$2) warned $mta.nick($1,%a) $+ , total warnings: $gus.warns($1,%a) $+ /3 ! .timer 1 1 mta.kick $1 %a } else ( if ($gus.warns($1,%a) => 3) { mta.text $1 Admin $mta.nick($1,$2) warned $mta.nick($1,%a) $+ , total warnings: $gus.warns($1,%a) $+ /3 ! .timer 1 1 mta.ban $1 %a } } } } elseif ($3 == !unwarn) { if ($gus.level($1,$2) < 7) Error - Level Needed 7 else { !writeini -n gus.warns.ini WARNS $mta.nick($1,%a) 0 mta.text $1 Admin $mta.nick($1,$2) removed all warnings for $mta.nick($1,%a) $+ ! } } } } on *:SIGNAL:mta.join: { if ($gus.warns($1,%a) => 3) { mta.text $1 $mta.nick($1,%a) has more than 3 warnings. .timer 1 1 mta.ban $1 %a } } Link to comment
Ford Posted November 8, 2007 Author Share Posted November 8, 2007 Of course it is so simple.. ($gus.level($1,$2) should be: ($gus.level($1,%a) and on *:SIGNAL:mta.join:{ should be: on *:SIGNAL:mta.join: { Thx Link to comment
[UVA]Bart Posted November 8, 2007 Share Posted November 8, 2007 lol np, you can use $gus.level($1,$2) or $gus,level($1,%a). $gus.level($1,%a) means if some racer types !lol bart, it will say "racer is laughing out loud at [uva]bart" i usually it as ($1,%a) for other players nicks and ($1,$2) for returning the who initiated the commands nick Link to comment
Recommended Posts