mIRC Home    About    Download    Register    News    Help

Print Thread
opping everyone with the tag `ownz ... help ! ;s #136049 22/11/05 09:39 AM
Joined: Oct 2005
Posts: 126
PhyxiuS Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Oct 2005
Posts: 126
Well, i already tried some codes... But none of them worked.

What i want is a script in my alias / nicklist that op all ppl with the tag "`ownz" ... also possible with other tags plz ! ...

Thankx...


If you mess with the best, u will die like the rest !
Re: opping everyone with the tag `ownz ... help ! ;s #136050 22/11/05 10:05 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
How are these tags being placed? start of the person's nick, end of the person's nick, as a user level, as a note for a user level, start of their ident, end of their ident, or some other way? The one's I listed here are the most common ways of tagging a user, but I need to know just how you're doing it.

Re: opping everyone with the tag `ownz ... help ! #136051 22/11/05 11:20 AM
Joined: Aug 2005
Posts: 525
S
schaefer31 Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
From my experience, tags beginning with a ` are usually placed at the end of a nick. So this code is based on that assumption.

Code:
on @*:join:#:{
  if ($len($nick) > 5 && $right($nick,5) == `ownz) {
      mode # +o $nick
  }
}


This will check that the last 5 characters of a nick are "`ownz". It also prevents someone using just "`ownz" as the nick from being opped. There has to be something in front of it. This isn't really the safest way to op users, but it does what you asked.

Re: opping everyone with the tag `ownz ... help ! #136052 22/11/05 11:59 AM
Joined: Feb 2005
Posts: 342
R
Rand Offline
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
You can replace your if statement with an easy:
if (*`ownz iswm $nick) { }

If you wanted to op everyone that doesn't have an op, but is a regular or voiced user, that has those tags at the end of the nick, with an alias. You could do something like this:

Code:
alias opallownz {
  var %c = $iif($1,$1,$active) , %i = 1
  if ($me isop %c) {
    while ($nick(%c,%i)) {
      var %n = $v1
      if (*`ownz iswm %n && (%n isreg %c || %n isvoice %c)) {
        .timer 1 $calc(%i * 3) mode %c +o %n
      } 
      inc %i 
    } 
  }
}


As schaefer mentioned, this will op a person if they use just the nick "`ownz".

If you wish to prevent this, you can change the if statement to this:

if (*?`ownz iswm %n && (%n isreg %c || %n isvoice %c)) {

Note: This works in two ways, you type: /opallownz, in your active channel, or you type: /opallownz #channelname.

Last edited by Rand; 22/11/05 12:06 PM.