mIRC Homepage
Posted By: Thermal Question - 02/01/06 10:57 PM
how would i get this to kick after 60 seconds if they dont change their nick to something shorter?

on !*:NICK: {
var %c = #channel
var %nnick $newnick
if ($len(%nnick) >= 20) && (%nnick ison %c) && ($me isop %c) {
msg $chan %c $+(%nnick,!*@*) You nick is too long (max of 20 characters is only allowed) Please change it, or you will be kicked
timer 1 60 kick #channel %nnick Come Back With A Shorter Nick
}
if ($len(%nnick) <= 20) && (%nnick ison %c) && ($me isop %c) { halt }
}

thanks in advance smile
Posted By: Hitchhiker Re: Question - 02/01/06 11:03 PM
Could just set a ban like ????????????????????*!*@*

Or name the timer by their nick and the channel, maybe the connection ID too.

When they change to something shorter than 20 chars turn the timer off.

Remember and rename the timer if they change to another invalid nick. Turn it off if they part, quit or get kicked.
Posted By: RusselB Re: Question - 03/01/06 12:22 AM
Code:
 on !@*:nick:{
var %chan = &lt;#channel&gt;
if $len($newnick) &gt; 20 {
.msg %chan $newnick 20 characters or less in your nick
$+(.timer,$address) 1 60 .kick %chan $newnick
}
elseif $timer($address) {
$+(.timer,$address) off
}
}
 
Posted By: Thermal Re: Question - 03/01/06 12:52 AM
still kicks them , if they change their nicks to something shorter
Posted By: RusselB Re: Question - 03/01/06 01:00 AM
Ooops...sorry...code has been edited.
Posted By: Thermal Re: Question - 03/01/06 01:09 AM
thanks alot smile
© mIRC Discussion Forums