mIRC Home    About    Download    Register    News    Help

Print Thread
#12998 25/02/03 10:31 AM
Joined: Jan 2003
Posts: 44
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Jan 2003
Posts: 44
Please can you show me s simple script for mass actions ? For example I am in channel #Channel and I have @. I select 6 nicks for example and hit in the menu "Mass OP". And it gives them op but not one by one on every mode by 4 by 4. Like this:
Nicks: Nick1, Nick2, Nick3, Nick4, Nick5, Nick6
Mass OP:
Someone sets mode: +oooo Nick1 Nick2 Nick3 Nick4
Someone sets mode: +oo Nick5 Nick6
....

Please help !
Thank you...


Regards, ThE_mASk.
#12999 25/02/03 10:58 AM
Joined: Feb 2003
Posts: 23
C
Ameglian cow
Offline
Ameglian cow
C
Joined: Feb 2003
Posts: 23
It's maybe slow but it works with me laugh
Code:
menu nicklist { Selected Mass Op:/mo } 
alias mo { 
 var %a = $snick(#)
 var %b = 1
 while (%b <= %a) {
    mode $chan +o $$snick(#,%b) 
    inc %b 
 }
} 

#13000 25/02/03 11:03 AM
Joined: Jan 2003
Posts: 44
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Jan 2003
Posts: 44
Well yes I thought about this one but it is doing it one by one and this is what I DO NOT want...

So somebody else who can help me ?


Regards, ThE_mASk.
#13001 25/02/03 12:13 PM
Joined: Jan 2003
Posts: 44
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Jan 2003
Posts: 44
I tried this one but... it is not working and I don't know why
Code:
 mass {  
  var %i = $snick(#,0) 
  var %j = 0
  while (%j <= %i) {    
   .mode # -oooo $$snick(#,$calc(%j + 1)) $$snick(#,$calc(%j + 2)) $$snick(#,$calc(%j + 3)) $$snick(#,$calc(%j + 4))
    inc %j 4
  }
}  


Regards, ThE_mASk.
#13002 25/02/03 01:41 PM
Joined: Dec 2002
Posts: 191
N
Vogon poet
Offline
Vogon poet
N
Joined: Dec 2002
Posts: 191
Search on mircsripts.org for a snippet by blue-elf "Popup nicklist /mode"

#13003 25/02/03 02:25 PM
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
To popups:
Code:
Op: massmode # + o $$1 $2-
DeOp: massmode # - o $$1 $2-
Voice: massmode # + v $$1 $2-
DeVoice: massmode # - v $$1 $2-
 


To aliases:
Code:
massmode {
  if ( $me isop $1 ) {
    var %i = 4
    while ( [ [ $+($,%i) ] ] ) { 
      mode $1 $+($2,$str($3,$modespl)) [ [ $+($,%i,-,$calc( %i - 1 + $modespl )) ] ]
      inc %i $modespl
    }
  }
}
 


should work... (made it a bit simpler than the one I use, which works)



Code:
//if ( khaled isgod ) echo yes | else echo no
#13004 25/02/03 02:52 PM
Joined: Jan 2003
Posts: 44
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Jan 2003
Posts: 44
10x you helped me a lot ! grin


Regards, ThE_mASk.
#13005 29/03/03 06:09 AM
Joined: Mar 2003
Posts: 2
Q
Bowl of petunias
Offline
Bowl of petunias
Q
Joined: Mar 2003
Posts: 2
OK.....firstly this is a proof of concept code..... u will have to first remove there old /op alias.....if you have any problems to mail me fcastle@good1.com



;op script by fcastle - fcastle@good1.com
;example op script
;usage /op <<channel>> nick1 nick2 nick3 nick4 nick5 nick6 nick7 nick8 <-- etc etc etc
;it should just stack them up and push them to the server when it meets the max modes per line


;example op alias
op {
var %C $iif($1 ischan,$1,$active)
;channel declaration
var %X 0
;counter for the loop
var %Y $iif($1 ischan,$numtok($2-,32),$numtok($1-,32))
;top for the counter
set %nick $null
;null the nicks var to build on
while (%X <= %Y) {
;lets start looping
;btw i start at 0 for safetys sake
inc %X
;inc it by 1
if ($gettok($iif($1 ischan,$2-,$1-),%X,32) != $null) {
;check if the nickname is not null
set %nick $addtok(%nick,$gettok($iif($1 ischan,$2-,$1-),%X,32),32)
;fill the nick var with the nickname
}
if ($numtok(%nick,32) >= $netwrk($network).modes) {
;ok number of nicks is more than the modes per line as defined by the network
mode %C $str(+o,$numtok(%nick,32)) %nick
;flush the modes to the server
unset %nick
;unset the nickname var
}
}
mode %C $str(+o,$numtok(%nick,32)) %nick
;final flush to push the overflowed nicks
unset %nick
;unset the var again to maintain clean exit
}
;the raw bit to make thee network.ini file and fill it with the stuff we can use

RAW 005:*: {
var %X 0
;counter for the loop
var %Y $numtok($2-,32)
;top of counter for the loop
while (%X <= %Y) {
;lets start looping
;btw i start at 0 for safetys sake
inc %X
;inc it by 1
if ($gettok($2-,%X,32) == are) { return }
;take evereything after are
elseif ($chr(61) isin $gettok($2-,%X,32)) {
;add all the stuff with a = in it to the ini file
writeini network.ini $iif($network != $null,$network,$server) $gettok($gettok($2-,%X,32),1,61) $gettok($gettok($2-,%X,32),2,61)
}
else {
;add all the other stuff to the ini with 1 to mean enabled
writeini network.ini $network $gettok($2-,%X,32) 1
}
}
}

;netwrk alias
;usage $network(network).property
;propertys dependent on the network
;common propertys are be MODES MAXCHANNELS NICKLEN TOPICLEN MAXBANS MAXTARGETS
alias netwrk {
if (($isid == $true) && ($prop != $null)) {
;make sure were being called as a identifer and we have a property to read
return $iif($readini(network.ini,$1,$prop) != $null,$readini(network.ini,$1,$prop),$null)
;return the asked for property
}
}


I guess i didnt mean it...But man, ya shoulda seen it...his flesh explode.
#13006 29/03/03 06:20 AM
Joined: Mar 2003
Posts: 2
Q
Bowl of petunias
Offline
Bowl of petunias
Q
Joined: Mar 2003
Posts: 2
That script uses raw 005.....if you load it before connecting to irc you will need to /quote version.....If you use this script dont forget to say hello to fcastle on bsd.good1.com in #Good1....or mail him at [email]fcastle@good1.com!!![/email]


I guess i didnt mean it...But man, ya shoulda seen it...his flesh explode.

Link Copied to Clipboard