in this ill add as i make more addons for it...
we will do some ircoper commands...
hope this gets used wisely as it will be fun to watch an idiot get mass sa joined to over 100 chans in one second ^_^
ill clean it up a bit later... didnt plan on posting this... but anyways
adding more as ppl request...
THANKS TO GOOSHIE FOR THE BETTER CODE *** UPDATED
alias cssop var %i 1 | while $snick(#,%i) { cs sop # add $v1 | inc %i }
alias cssopd var %i 1 | while $snick(#,%i) { cs sop # del $v1 | inc %i }
alias csaop var %i 1 | while $snick(#,%i) { cs aop # add $v1 | inc %i }
alias csaopd var %i 1 | while $snick(#,%i) { cs aop # del $v1 | inc %i }
alias apb var %i 1 | while $snick(#,%i) { sapart $v1 # Force Part - Please Comply | inc %i }
alias jbp $$?="chan to sajoin to" | var %i 1 | while $snick(#,%i) { sajoin $v1 $! | inc %i }
alias apc $$?="message" | var %i 1 | while $snick(#,%i) { sapart $v1 # $! | inc %i }
alias sucker var %i 0 | while %i < $2 && %i < 999 { sajoin $1 $3 $+ %i | inc %i }
menu nicklist {
SOP AOP
.Sop
..**SOP $snick(#,0) NICKS**:/cssop
..**De-SOP $snick(#,0) NICKS**:/cssopd
.Aop (@)
..**AOP $snick(#,0) NICKS**:/csaop
..**De-AOP $snick(#,0) NICKS**:/csaopd
-
OS CMNDS
.FORCE JOIN CHAN:/sajoin $1 $$?="channel"
.FORCE JOIN NICK:/sajoin $$?="nick" #
.SAPART $snick(#,0) nick(s):/apb
.SAJOIN $snick(#,0) nick(s):/jbp
.CYCLE $snick(#,0) nick(s):/apc
.FORCE NICK:/os set superadmin on | os svsnick $1 $$?="nick" | os set superadmin off
.USER MODE:/samode # $$?="mode" $1 $1 $2 $2 $3 $3
.CHAN MODE:/samode # $$?="mode"
.CHANGE NAME:/chgname $1 $$?="real name"
.CHANGE IDENT:/chgident $1 $$?="ident"
.CHANGE HOST:/chghost $1 $$?="host"
.SHUN:/shun $1 $+ !*@*.* $$?="time" : $+ $$?="reason"
.PROTECT AND HIDE:/mode $me +qH
.UNDO PROTECT + HIDE:/mode $me -qH
**Mass SaJOin $1**:/var %2 $$?="amount of channels" | $$?="Chan Name - eg. #bitch" | sucker $1 %2 $!
}
Global variables require a harddrive write/read
local variables are held in ram. Also, by avoiding
set variables as much as possible you 'future proof'
your scripts come the day you wish to run it off a
solid state harddrive or flash memory device. I try
to only use a set global variable if I need to retain
the data across sessions and make it available to all
scripts and connections. Another nice thing about using
local variables is less likely to have variable name
collisions. They only work within that one alias, event,
or menu item. Makes it easy to use single letter variable
names.
gooshie thanks... ill try an avoid it... but its the way i was taught... mirc is so flexible that there actually is no right or wrong way, only slow and fast... in my mind i follow my protocol automatically... its been burnt into my brain, but ill have to change it seems...
thanks again... i learnt basiaccly from coding AOW games... atm i have one of the best ones online... coding an addon for it... POKER inside the actual game... hold thumbs ^_^
C_F try to avoid /set variables.. ive been coding 10+ yrs
Cracker no i dont HAVE to use "|"s ..often i write it the
way the person i am helping does it.. for myself i may use
pipes at time to fit it on one line or reduce the number of
lines.. i try to avoid a vertical scroll bar.. mostly i
just make it easy for me to read.. i seldomly (never) use
comments so however makes it easy for me to figure out if
i have to mess with it in the future.
yeah true... i know my while loops... but only in other scripts i use them something like this
alias showbans2 {
set %ban1 $ibl(%ntv,0)
set %x 1
while %x <= %ban1 {
if $ibl(%ntv,%x) !iswm $read(banned.txt, w, $ibl(%ntv,%x)) {
mode %ntv -b $ibl(%ntv,%x)
}
inc %x 1
}
unset %ntv
unset %askifcheck
unset %ban1
unset %x
}
just an example...
i was just taught how to code a certain way... to me it comes natural to just follow my protocol
thanks again Gooshie
alias cssop var %i 1 | while $snick(#,%i) { cs sop # add $v1 | inc %i }
alias cssopd var %i 1 | while $snick(#,%i) { cs sop # del $v1 | inc %i }
alias csaop var %i 1 | while $snick(#,%i) { cs aop # add $v1 | inc %i }
alias csaopd var %i 1 | while $snick(#,%i) { cs aop # del $v1 | inc %i }
alias apb var %i 1 | while $snick(#,%i) { sapart $v1 # Force Part - Please Comply | inc %i }
alias jbp $$?="chan to sajoin to" | var %i 1 | while $snick(#,%i) { sajoin $v1 $! | inc %i }
alias apc $$?="message" | var %i 1 | while $snick(#,%i) { sapart $v1 # $! | inc %i }