Jump to content

A auto-nickban (like a MTAPlayer nick)


field33

Recommended Posts

best thing to do is set up a list of names you don't want people to use, and save it into a file. then get a script to read the file and check if the name's banned on join. something like:

on *:SIGNAL:mta.join:{
if $readini($rpg.dir $+ badnicks.ini,illegal,$mta.name($1,$2)) == 1 {
mta.msg $1 $2 $mta.name($1,$2) is a forbidden name on this server, please change it via the options tab!
mta.kick $1 $2
}
}
...

and then make a file called badnicks.ini and keep this as the content:

[illegal]

MTAPlayer=1

(other names)=1

...

the reason i put the =1 bit in was so that you could use the file for other stuff as well like if you made a script to allow/disallow the nickname etc. :P

Link to comment
best thing to do is set up a list of names you don't want people to use, and save it into a file. then get a script to read the file and check if the name's banned on join. something like:

on *:SIGNAL:mta.join:{
if $readini($rpg.dir $+ badnicks.ini,illegal,$mta.name($1,$2)) == 1 {
mta.msg $1 $2 $mta.name($1,$2) is a forbidden name on this server, please change it via the options tab!
mta.kick $1 $2
}
}
...

and then make a file called badnicks.ini and keep this as the content:

[illegal]

MTAPlayer=1

(other names)=1

...

the reason i put the =1 bit in was so that you could use the file for other stuff as well like if you made a script to allow/disallow the nickname etc. :P

could you add a 30 second timer to that then it will be great

Link to comment
isnt ban a little over the top? , you could give them a message to change there name and just kick em

Quite the same result, if you scriptban the name MTAPlayer only then they would get kicked(+namebanned) from the server if they have that nick, if you kick them with a message its the same result.

Link to comment

He thought he wanted to actually ban people with a certain nick, as did I.

Easiest way is to list the names in a text file and use:

on *:SIGNAL:mta.join:{
 if ($read(bannednames.txt, s, $mta.name($1,$2))) {
   mta.msg $1 $2 
   $+(!.timerbannedname,$1,$2) 1 15 mta.kick $1 $2
 }
}
on *:SIGNAL:mta.part:{
 if ($timer($+(bannedname,$1,$2))) $+(!.timerbannedname,$1,$2) off
}

Link to comment

Don't start the flaming with me retard.

I was testing something on the account, that's why I posted something small.

You can't exactly criticize how I post, when you're the one who confuses people into thinking that you're speaking arabic.

I've only been posting on this forum for about a week or so now, for the first time in quite a while. So god knows how you made up that bullshit that you posted. And also, if that's so, quote something that seems bs to you...

[/end]

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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