Guest Posted June 28, 2006 Share Posted June 28, 2006 I created this kick script with a some help from a post below on *:SIGNAL:mta.join: { if $readini(badnicks.ini,BAD,$mta.nick($1,$2) == 1) { mta.text $1,$2 The nickname $mta.nick($1,$2) is not allowed. please change it by going into settings or typing /nick in the next 30 seconds. !.timerkick 1 30 mta.kick $1 $2 elseif on *SIGNAL:mta.nick: { !.timerkick off $1 $2 } } } It gets as far as the kick timer the everything after doesn't work, I know it's probably wrong, all I need to know is how to cancel the timer out if the player changes their nick to a nickname not in the badnicks.ini well I figured out how to stop the timer, with a little more trial and error and delving thru loads of pages in the forums I came up with this. on *:SIGNAL:mta.join: { if $readini(badnicks.ini,BAD,$mta.nick($1,$2) == 1) { The nickname $mta.nick($1,$2) is not allowed on this server.......... $+ !.timerNK,$1,$2 1 30 mta.kick $1 $2 } } on *:SIGNAL:mta.nick: { if $readini(badnicks.ini,BAD,$mta.nick($1,$2) != 1) { $+ !.timerNK,$1,$2 off } } this works fine for me the only thing missing is if a player changes an allowed nick back to player, but if I needed it I think I could manage it now. hope this helps other people. Link to comment
[FMJ]ParadoX Posted July 2, 2006 Share Posted July 2, 2006 Yes, that code you created there should work as you said. And Im sure it will help other people who are beginners to scripting. Link to comment
Jeremy Posted July 2, 2006 Share Posted July 2, 2006 You're missing mta.text. Also why do you need a timer.. Should be. on *:SIGNAL:mta.join: { if $readini(badnicks.ini,BAD,$mta.nick($1,$2) == 1) { mta.text $1 The nickname $mta.nick($1,$2) is not allowed on this server.......... mta.kick $1 $2 } } Link to comment
Guest Posted July 6, 2006 Share Posted July 6, 2006 the timer is there to give them a chace to change the nick also if you read my code carefully i didn't miss the mta.text on *:SIGNAL:mta.join: { if $readini(badnicks.ini,BAD,$mta.nick($1,$2) == 1) { mta.text $1,$2 The nickname $mta.nick($1,$2) is not allowed. please change it by going into settings or typing /nick in the next 30 seconds. edit : my bad lol just lloked at it twice myself it's not in the post but it is in the script i have running. sorry about that Link to comment
Jeremy Posted July 7, 2006 Share Posted July 7, 2006 mta.text $1,$2 needs to be changed to mta.text $1. Link to comment
Recommended Posts