Here's my nameban script that I use:
on *:signal:mta.join:{
if ($read(nameban.txt, w, $mta.name($1,$2)) == $mta.name($1,$2)) {
mta.say $1 $mta.name($1,$2) auto-banned (Name-ban system)
mta.ban $1 $2 Name-ban
}
}
on *:signal:mta.command:{
var %a = $readini(%dir $+ $1.ini,ID $+ $2,level),%b = $iif($4 == $null,$2,$mta.findid($1,$4)))
if (%a > -1) {
if (%a >= 5) {
if ($3 == !nameban) {
var %n = $iif($5 isnum,$5,$mta.getid($1,$5))
if ($4 == in) {
if ($mta.name($1,%n) != Unknown) {
!write nameban.txt $mta.name($1,%n)
mta.say $1 Nameban successful on: " $+ $mta.name($1,%n) $+ "
mta.ban $1 %n Name-ban
}
else mta.say $1 Failed ID/Name
}
elseif ($4 == out) {
if ($5 !isnum) {
!write nameban.txt $5
mta.say $1 Nameban successful on: " $+ $5 $+ "
}
else mta.msg $1 $2 Incorrect syntax; !nameban out
}
else mta.msg $1 $2 Incorrect syntax; !nameban in/out
}
if (($3 == !unnameban) && ($4 != $null)) {
!write -dw $+ $4 nameban.txt
mta.say $1 Un-name-ban successful on " $+ $4 $+ "
}
}
}
}
on *:signal:mta.admin:{
if (($2 == !unnameban) && ($3 != $null)) {
!write -dw $+ $3 nameban.txt
mta.say $1 Un-name-ban successful on " $+ $3 $+ "
}
}
Commands:
!nameban
!unnameban
in/out is whether they are in the server or not - if they are it will ban them.