AutoOpScript

By DragonFlare on Nov 19, 2009

I was bored and decided to make this if.
if you would like to change the %var
edit

 Writeini AutoOpScript.ini $chan active yes 

and

 Writeini AutoOpScript.ini $chan active no 

you also want to edit

 if %var = yes { mode $chan +o $nick } 

otherwise just load it.

on *:Load:{
  echo -a Ty For Loading AutoOpScript By Eternal/DragonFlare
  echo -a An Eternal-Networking Script
  echo -a To activate in a channel right click in the channel highlight AutoOpScript and click on/off
}
;AutoOpScript
Menu Channel {
  -
  AutoOpScript ( $+ $Active $+ ):
  .on: .Enable #AutoOpScript | Writeini AutoOpScript.ini $chan active yes | msg $chan 14,1 AutoOpScript Has Been Activated in $active 
  .off: .Disable #AutoOpScript | Writeini AutoOpScript.ini $chan active no | msg $chan 14,1 AutoOpScript has been Disabled in $active
}
#AutoOpScript on
on *:join:#:{
  %var = $readini(AutoOpScript.ini,$chan,active)
  if %var = yes { mode $chan +o $nick }
  else { halt }
}

Comments

Sign in to comment.
Jethro   -  Nov 23, 2009

If you think that's the case, then knock yourself out.

 Respond  
Master-Of-Death   -  Nov 23, 2009

couldn't /op affect server commands? not all servers use the same syntax's...it'd be better if it was /autoop

 Respond  
DragonFlare   -  Nov 20, 2009

i know i couldive done it those ways but it works just fine the way it is lmao i got bored lmao

 Respond  
Jethro   -  Nov 20, 2009

I'm a big believer in "gooshielism" now!

p.S. YoOo, ghOsT-wRiTeR..i'ma tUrn u uPsIde dOwN.....

 Respond  
gooshie   -  Nov 20, 2009

Jethro,
LOL.. be yourself and Jetify it!..
just a couple tweeks..
no need for ! on join the @ takes care of that..
when you do on/off things.. if you use 1/0 then
you can do as follows.. also if its shorter and
doesnt matter rearrange it for positive logic to
make it easier to read..

on @*:JOIN:#:if (%op) .mode # +o $nick
alias op {
  set -e %op $iif(%op,0,1)
  echo -a * $iif(%op,AutoOp has been turned on.,AutoOp has been turned off.) 
}

Another way to go would be to script the aop
function in the control tab of the address book
something like this:

Menu Nicklist {
  -
  AutoOpScript is $+([,$iif($aop,on,off),]):$iif($aop,aop off,aop on)
  $iif($aop($+($gettok($address($1,5),1,64),@*)),Remove $1 From AutoOp,Add $1 To AutoOp):$iif($aop($+($gettok($address($1,5),1,64),@*)),aop -r $+($gettok($address($1,5),1,64),@*) # $network,aop $+($gettok($address($1,5),1,64),@*) # $network)
} 

Sorry for the long folded line

 Respond  
Jonesy44   -  Nov 20, 2009

/op # nick

lazy bastards..

 Respond  
Ghost-writer   -  Nov 20, 2009

Jethro_ To many typos to be like gooshie :| truned? trned?

 Respond  
Jethro   -  Nov 20, 2009

Just using one command to turn it on or off: /op

on !@*:JOIN:#:if (%op == on) .mode # +o $nick
alias op { set -e %op $iif(!%op,on,$iif(%op != on,on,off)) $&
    | echo -a * $iif(%op == on,AutoOp has been trned on.,AutoOp has been truned off.) 
}

/me tries to act like gooshie. lol

 Respond  
Master-Of-Death   -  Nov 20, 2009

errm why add rediculous amounts of code, one you could use the server commands and two that code is way to excessive.

this would be better:

alias opon {
.set %op on
}
alias opoff {
.unset %op 
}
on *:JOIN:#:{ if (%op == on) {
.mode # +o $nick
}
}

Simple usually = better oh and does not involve stupid %var changes.

 Respond  
Jethro   -  Nov 20, 2009

Testor, I think you missed the point:> I made this for an #MircScripting room so i didnt have to worry about adding anyone

 Respond  
Testor   -  Nov 20, 2009

/Aop <Name/Address> ?

 Respond  
Ghost-writer   -  Nov 20, 2009

woah, ever heard of levels?

To change base levels or to give auto voice on join. you type /cs levels channel set type level Example. /cs levels #help set autovoice -1. Here is a list of levels.

autodeop autohalfop autoop autoprotectect autovoice autojoin signkick Acc-list acc-change akick set ban banme clear getkey halfop halfopme info kick kickme invite opdeop opdeopme protect protectme topic Unban Voice Voiceme memo assign badwords fantasia greet nokick say.

Just set autoop to -1.

 Respond  
Jethro   -  Nov 20, 2009

Also, using ini is a bit excessive per your code when you could've used a global variable to set for yes or no.

 Respond  
Jethro   -  Nov 20, 2009

I don't get why you needed to make a variable for %var when you could simply do:

#AutoOpScript on
on @*:join:#:{
  if $readini(AutoOpScript.ini,$chan,active) = yes { mode $chan +o $nick }
}
#AutoOpScript end

You should check if you're opped in channel by adding a @ prefix to your join event. Your else is redundant and can be omitted.

 Respond  
DragonFlare   -  Nov 19, 2009

I made this for an #MircScripting room so i didnt have to worry about adding anyone but scriptors to the accesslist and people could test scripts that require op to test.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.