mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2006
Posts: 58
S
sas22 Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Jun 2006
Posts: 58
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

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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 } 

Joined: Jun 2006
Posts: 58
S
sas22 Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Jun 2006
Posts: 58
I need that to work on every channel Im oped at..And thanks but I got a code..

Joined: Jun 2003
Posts: 994
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Jun 2003
Posts: 994
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).


I refuse to engage in a battle of wits with an unarmed person. wink
Joined: Jun 2006
Posts: 58
S
sas22 Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Jun 2006
Posts: 58
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

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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
    }
  }
} 

Joined: Jun 2006
Posts: 58
S
sas22 Offline OP
Babel fish
OP Offline
Babel fish
S
Joined: Jun 2006
Posts: 58
Thanks smile

Joined: Jul 2006
Posts: 13
M
Pikka bird
Offline
Pikka bird
M
Joined: Jul 2006
Posts: 13
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 $+ ]
          }
      }
  }

Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
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

Last edited by billythekid; 13/07/06 01:59 PM.

billythekid
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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


Link Copied to Clipboard