mIRC Homepage
Posted By: BanJirian ON NICK - 29/06/06 10:29 AM
Again and again I need your help grin

Code:
 
on @*:NICK: {
  if ($newnick isreg #) {
    if ($level($newnick) == badnick ) { .signal -n d $1 $newnick  }
    Haltdef
  }
}
on *:signal:*: { 
  if ($signal == d) {  
    !.quote -q kick $1 $newnick $3
  }
}
user ..
badnick:*abc*
 


If someone change their nick to *abc* I still cant kick
Posted By: evolish Re: ON NICK - 29/06/06 10:35 AM
On on nick event doesn't have a #/$chan. Something like that would return $Null. you will have to use $comchan. the simplest script you can use is $comchan($newnick,1). However i would suggest a loop:

var %x = 1
while ($comchan($newnick,%x)) {
ban -k $v1 $newnick badnick
inc %x
}
Posted By: Lpfix5 Re: ON NICK - 29/06/06 05:06 PM
Quote:
On on nick event doesn't have a #/$chan. Something like that would return $Null. you will have to use $comchan. the simplest script you can use is $comchan($newnick,1). However i would suggest a loop:

var %x = 1
while ($comchan($newnick,%x)) {
ban -k $v1 $newnick badnick
inc %x
}


Actually # is evulated as the current channel being in the reason why his script might not work is because he has set where ON NICK change he has a IF statement that starts immediately for the check, now if the newnick is not identified immediately that string is useless.

A simple 5-10 second timer in between should do you wonders.

also to note that your ON NICK is set if OP + so do note that when testing that the testing nick is an operator.

Code:
on @*:NICK: {
[color:red]timer 1 5 {[/color]
  if ($newnick isreg #) {
    if ($level($newnick) == badnick ) { .signal -n d $1 $newnick  }
    Haltdef
  }
}
[color:red]}[/color]

on *:signal:*: { 
  if ($signal == d) {  
    !.quote -q kick $1 $newnick $3
  }
}
user ..
badnick:*abc*
Posted By: DaveC Re: ON NICK - 29/06/06 08:09 PM
Quote:
Code:
on @*:NICK: {
  [color:red]timer 1 5 {[/color]
    if ($newnick isreg #) {
      if ($level($newnick) == badnick ) { .signal -n d $1 $newnick  }
      Haltdef
    }
  [color:red]}[/color]
}


Hmmm its to bad timers cant have multiple lines of code layed out like that now eh ?
And what would the point of haltdefing the timer its the ON NICK that needed halting.
© mIRC Discussion Forums