mIRC Homepage
Posted By: sas22 An alias to find me as op in the chans I'm in - 12/07/06 11:51 PM
Code:
on *:nick:if (Guest* iswm $newnick) { kick #channel $newnick No guest's allowed | msg $newnick Either Identify or change nick by using /nick newnick }
I need an alias that will use this when I'm an Op and I need this to work for all the chans Im in
No alias required, just a slight modification to the code you already have.

Code:
 on @*:nick:if (Guest* iswm $newnick) { kick #channel $newnick No guest's allowed | msg $newnick Either Identify or change nick by using /nick newnick } 
I need that to work on every channel Im oped at..And thanks but I got a code..
on @*:

This makes YOUR code work in any channel you're oped in (as RusselB so kindly told you .. a slight modification to the code you already have).
Quote:
on @*:

This makes YOUR code work in any channel you're oped in (as RusselB so kindly told you .. a slight modification to the code you already have).
And then what would I put for the #channel?$chan? smirk Maybe I didn't explain it clearly I need the on nick to work for all the chans Im op in..I know what @*: does..Russle thanks for the tip
You'll have to loop to get the correct channels, since a nick change isn't channel specific.

Here's a complete re-write of your code
Code:
 on @*:nick:{
  if (Guest* iswm $newnick) {
    while $comchan($newnick,0) {
      kick $comchan($newnick,1) $newnick No guest's allowed
      msg $newnick Either Identify or change nick by using /nick newnick
    }
  }
} 
Thanks smile
Correct me if im wrong...

on @*:nick: ...

That triggers when an OP changes the nick... Doesnt make sense. I changed it, and also implented some other functions.

Code:
on *:nick: {
   if ($me isop $chan) {
      if (guest isin $newnick) ||  (unknown isin $newnick)
         inc %nickkick
          kick $newnick Identify your own nickname, or change to another by typing /nick [NEWNICK] ! [Guests pwnt: %nickkick $+ ]
          }
      }
  }
Quote:
Correct me if im wrong...

on @*:nick: ...

That triggers when an OP changes the nick... Doesnt make sense. I changed it, and also implented some other functions.
<snip>


The @ prefix
You can limit events to being executed only when you have Ops on a channel by using the @ prefix.

i dont know if it will still trigger with no $chan being associated with a nickchange though, probably not...

/help levels

blush
It would trigger in any and all channels that the person running the script is in and has ops.

The event isn't channel specific, in comparison to being channel irrelevant. Because the event isn't channel specific, $chan would return $null
© mIRC Discussion Forums