Jump to content

How to make admins ping-kick proof?


Ford

Recommended Posts

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 :P

What's wrong?

Link to comment

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
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 :P

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...