mIRC Home    About    Download    Register    News    Help

Print Thread
Mass op script? #196017 07/03/08 10:39 PM
Joined: Mar 2008
Posts: 6
P
pilsken Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Mar 2008
Posts: 6
Hey lads!

Im wondering if there is a simple mass op script out there?
Something like,

Php Code:
on owner:TEXT:*:#:{
if ($1 == ?op) && ($2 == *) { commands goes here... (need help) }
} 


Can someone please tell me how to do? Thx.

Re: Mass op script? [Re: pilsken] #196019 07/03/08 11:31 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
on owner:TEXT:*:#:{
  if ($1 == ?op) && ($2 == *) {
    if ($me !isop #) echo -ac info * You're not opped on $+(#,.)
    else {
      var %i = 1,%m
      while ($nick(#,%i)) {
        var %n = $v1
        if ((!$istok($1-,%n,32)) && (%n !isop #)) {
          var %m = %m %n
          if ($numtok(%m,32) == $modespl) {
            .timer 1 0 mode # $+(+,$str(o,$v1)) %m
            var %m
          }
        }
        inc %i
      }
      if (%m) mode # $+(+,$str(o,$numtok($v1,32))) %m
    }
  }
}

Re: Mass op script? [Re: SladeKraven] #196030 08/03/08 03:08 AM
Joined: Mar 2008
Posts: 6
P
pilsken Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Mar 2008
Posts: 6
That doesn't work. frown

Well i want to use the "*" as a wildcard for op everyone who has not got op. Someone?

Best regards.

Re: Mass op script? [Re: pilsken] #196038 08/03/08 10:57 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
We don't help with mass scripts, simplue due they can be used to abuse other users and channels.. so i don't think you will get much help here


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: Mass op script? [Re: sparta] #196045 08/03/08 02:20 PM
Joined: Dec 2002
Posts: 2,025
R
RoCk Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,025

Originally Posted By: sparta

We don't help with mass scripts...


Says who?

Re: Mass op script? [Re: SladeKraven] #196049 08/03/08 05:47 PM
Joined: Apr 2007
Posts: 228
M
Mpot Offline
Fjord artisan
Offline
Fjord artisan
M
Joined: Apr 2007
Posts: 228
Code:
on owner:TEXT:*:#:{
  if ($1 == ?op) && ($2 == *) {
    if ($me !isop #) echo -ac info * You're not opped on $+(#,.)
    else {
      var %i = 1,%m
      while ($nick(#,%i)) {
        var %n = $v1
        if ((!$istok($1-,%n,32)) && (%n !isop #)) {
          var %m = %m %n
          if ($numtok(%m,32) == $modespl) {
            .timer 1 0 mode # $+(+,$str(o,$v1)) %m
            var %m
          }
        }
        inc %i
      }
      if (%m) mode # $+(+,$str(o,$numtok($v1,32))) %m
    }
  }
}


That is really complicated looking. ._.

Re: Mass op script? [Re: Mpot] #196081 09/03/08 03:03 AM
Joined: Mar 2008
Posts: 6
P
pilsken Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Mar 2008
Posts: 6
Well, don't go offtopic please. Anyone have a better solution? Thx.

Re: Mass op script? [Re: pilsken] #196083 09/03/08 03:44 AM
Joined: Oct 2007
Posts: 51
T
Trashlord_ Offline
Babel fish
Offline
Babel fish
T
Joined: Oct 2007
Posts: 51
So you're looking to op people by matching address.

Code:
on @*:TEXT:?op*:#:{
var %i = 1
while ($nick($chan,%i)) {
var %nick = $v1
;loopon2-
var %2 = $numtok($2-,32)
while ($gettok($2-,%2,32)) {
if ($address(%nick,5) iswm $v1) { var %op = %op %nick }
dec %2
}
inc %i
}
;now, op them.
var %x = 0, %l = $numtok(%op,32), %do
while (%x < %l) {
inc %x
var %do = $addtok(%do,$gettok(%op,%x,32),32)
if ($numtok(%do,32) == $modespl) { mode $chan $str(o,$numtok(%do,32)) %do | var %do = $null }
}
if (%do) { mode $chan $str(o,$numtok(%do,32)) %do }
}


Note that I no longer use mIRC, and therefore this code remains untested.