Jump to content

Automatic ban nick


Au{R}oN

Recommended Posts

on *:SIGNAL:mta.join:{ ;the join signal that is triggered when a player enters the server
 if ($mta.name($1,$2) == Cheater) { ;checking if their name is Cheater
   mta.say $1 Banning $mta.name($1,$2) - Reason: Banned nickname ;sending message to server
   mta.ban $1 $2 ;bans the player
 }
 elseif ($mta.name($1,$2) == Cheater2) { ;checking if their name is Cheater2
   mta.say $1 Banning $mta.name($1,$2) - Reason: Banned nickname ;sending message to server
   mta.ban $1 $2 ;bans the player
 }
 elseif (cheat* iswm $mta.name($1,$2)) { ;checking if cheat onwards is in their name
   mta.say $1 Banning $mta.name($1,$2) - Reason: Banned nickname ;sending message to server
   mta.ban $1 $2 ;bans the player
 }
}

tokens can also be used..

Link to comment

on *:SIGNAL:mta.join:{
if ($mta.name($1,$2) == $readini(Bans.ini,bannned,names)) {
mta.say $1 Banning $mta.name($1,$2) $chr(124) Reason: Blacklisted.
mta.ban $1 $2
}
}
on *:SIGNAL:mta.command:{
if $3 == !addban && $findtok(ADMIN NAMES HERE!!!,$mta.name($1,$2),1,32) { 
if $4 == $null mta.say $1 say !addban 
else {
mta.say $1 added ban name: $4
!writeini bans.ini banned names $readini(bans.ini,banned,names) $+($4,$chr(44))
}
}
if $3 == !remban && $findtok(ADMIN NAMES HERE!!!,$mta.name($1,$2),1,32) { 
if $4 == $null mta.say $1 say !remban 
elseif ($readini(bans.ini,banned,names,$4) == $null) mta.say $1 $4 isn't banned.
else {
mta.say $1 added ban name: $4
!writeini bans.ini banned names $remtok($readini(bans.ini,banned,names),$4,1,44)
}
}
}

use !addban to add bans

use !remban to remove bans

You must edit "ADMINS NAMES HERE!!!" to your name!!!

Link to comment

on *:SIGNAL:mta.join:{
 if ($findtok($readini(bans.ini,bannned,names),$mta.name($1,$2),44)) {
   mta.say $1 Banning $mta.name($1,$2) $chr(124) Reason: Blacklisted.
   mta.ban $1 $2
 }
}
on *:SIGNAL:mta.command:{
 if ($3 == !addban && $findtok(admin-names,$mta.name($1,$2),1,32)) {
   if ($4 == $null) mta.say $1 say !addban 
   else {
     mta.say $1 added ban name: $4
     !writeini bans.ini banned names $addtok($readini(bans.ini,banned,names),$4,44)
   }
 }
 elseif ($3 == !remban && $findtok(admin-names,$mta.name($1,$2),1,32)) {
   if ($4 == $null) mta.say $1 say !remban 
   elseif (!$readini(bans.ini,banned,names,$4)) mta.say $1 $4 isn't banned.
   else {
     mta.say $1 added ban name: $4
     !writeini bans.ini banned names $remtok($readini(bans.ini,banned,names),$4,1,44)
   }
 }
}

There's many easier ways to do this, but i thought i'd just fix this one :)

Link to comment

Please guys, I not understood what's the parameters of the precision of the script.

I think is this the area to modify, but where?

elseif (cheat* iswm $mta.name($1,$2)) { ;checking if cheat onwards is in their name

mta.say $1 Banning $mta.name($1,$2) - Reason: Banned nickname ;sending message to server

mta.ban $1 $2 ;bans the player

}

}

I'd like to have the max precision :oops:

Link to comment
Please guys, I not understood what's the parameters of the precision of the script.

I think is this the area to modify, but where?

elseif (cheat* iswm $mta.name($1,$2)) { ;checking if cheat onwards is in their name

mta.say $1 Banning $mta.name($1,$2) - Reason: Banned nickname ;sending message to server

mta.ban $1 $2 ;bans the player

}

}

I'd like to have the max precision :oops:

What the hell you on about boy :P , this line here,

  elseif (cheat* iswm $mta.name($1,$2)) { 

just change the the word "cheat" to what ever you want. so say if you wanted to ban someone who keeps joining the server with "bob1" & "bob2" & "bob3" so you change the word from "cheat" to "bob". ok?????

on *:SIGNAL:mta.join:{
 if ($findtok($readini(bans.ini,bannned,names),$mta.name($1,$2),44)) {
   mta.say $1 Banning $mta.name($1,$2) $chr(124) Reason: Blacklisted.
   mta.ban $1 $2
 }
}
on *:SIGNAL:mta.command:{
 if ($3 == !addban && $findtok(admin-names,$mta.name($1,$2),1,32)) {
   if ($4 == $null) mta.say $1 say !addban 
   else {
     mta.say $1 added ban name: $4
     !writeini bans.ini banned names $addtok($readini(bans.ini,banned,names),$4,44)
   }
 }
 elseif ($3 == !remban && $findtok(admin-names,$mta.name($1,$2),1,32)) {
   if ($4 == $null) mta.say $1 say !remban 
   elseif (!$readini(bans.ini,banned,names,$4)) mta.say $1 $4 isn't banned.
   else {
     mta.say $1 added ban name: $4
     !writeini bans.ini banned names $remtok($readini(bans.ini,banned,names),$4,1,44)
   }
 }
}

There's many easier ways to do this, but i thought i'd just fix this one :)

pfffff i wrote that in couple of mins in text box, i couldn't be arsed checking what i wrote Because i knew for fact you jax or oli would soon correct me anyway :wink:

Link to comment
  • Recently Browsing   0 members

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