|
Joined: Dec 2002
Posts: 173
Vogon poet
|
OP
Vogon poet
Joined: Dec 2002
Posts: 173 |
Hello i have a code here that says thanks for ops if opped, some channels can't stand that sort of thing as it can appear to be lame, but was wondering how do i go about making a %var so i can set in the popup menu what channels i would want it to go in.
Here's what i got so far, i would imagine i would need to have somesort of /set command to choose what channels i want
#op.thanker off on *:OP:#: { if ($opnick == $me) && ($nick != $me) /msg # 12,8 Thanks for the @4 $nick 12!¡!¡!¡! } #op.thanker end
|
|
|
|
Hauxi
|
Hauxi
|
#op.thanker off on *:OP:#mirc,#help,#something: { if ($opnick == $me) && ($nick != $me) /msg # 12,8 Thanks for the @4 $nick 12!¡!¡!¡! } #op.thanker end
|
|
|
|
Joined: Dec 2002
Posts: 173
Vogon poet
|
OP
Vogon poet
Joined: Dec 2002
Posts: 173 |
Thanks but i'm looking for something that you can add via popup menu as some newbies won't know how to add channels via going into remotes, basically looking for something that uses a possible
on *:OP:%:
then something in the popup for it to add a channel with a %var that tells the script to what channel it is, if that makes any sense lol.
I knew some auto join scripts which can't remember where they are now, which has 1 to 10 preset channels and you just add them and it saves.
|
|
|
|
Joined: Dec 2002
Posts: 332
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 332 |
how about using $read and /write ?
on *:OP:*: {
if ($chan isin $read(opchan.txt,s,$chan)) && ( $opnick == $me) {
msg thx etc ..
then just do a /write popup to add to the .txt file sorry its sloppy but i only had a few mins
|
|
|
|
Hauxi
|
Hauxi
|
#op.thanker on on ^*:OP:#:{ if ($chan isin %op.chans) && ($opnick == $me) { msg $chan Thanks for the op $nick } } #op.thanker end
alias addchan { if ($1 isin %op.chans) { echo -a * $1 is already in thanks list } | else { set %op.chans %op.chans $1- } } alias remchan { if ($1 isin %op.chans) { set %op.chans $remove(%op.chans,$1) } | else { /echo -a * $1 isn't in thanks list } }
something like that...
|
|
|
|
Joined: Dec 2002
Posts: 173
Vogon poet
|
OP
Vogon poet
Joined: Dec 2002
Posts: 173 |
Hmm that sounds that it could be but is that code for only the rooms i'm opped in, as i'm trying to make it so i can add it manually via popup menu, but not sure what format to do it in
|
|
|
|
Joined: Jan 2003
Posts: 149
Vogon poet
|
Vogon poet
Joined: Jan 2003
Posts: 149 |
try smth like this 
on ^*:OP:%thxch:{ if ($opnick == $me) { msg $chan Thanks for the op $nick } }
menu channel {
-
$iif($chan isin %thxch,$style(1)) Thank 4 op:{
$iif($chan isin %thxch,set %thxch $remtok(%thxch,$chan,1,44),set %thxch $addtok(%thxch,$chan,44))
}
}
just a quickedit =]
|
|
|
|
Joined: Dec 2002
Posts: 173
Vogon poet
|
OP
Vogon poet
Joined: Dec 2002
Posts: 173 |
No luck on that one, the %var seems to add them on the same line and not a different one, making it conflict and only allowing to paste the text on whatever first channel it was set too.
|
|
|
|
Joined: Dec 2002
Posts: 173
Vogon poet
|
OP
Vogon poet
Joined: Dec 2002
Posts: 173 |
This didn't work as it only added the %op.chans to the %var and not the actual channel
|
|
|
|
Joined: Jan 2003
Posts: 2,973
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,973 |
Try this  :
on !*:OP:#: { if (($opnick == $me) && (!$istok(%opthanks.exceptions, $chan, 44))) /msg $chan Thanks for op, $nick $+ ! }
menu channel {
Op Exception
.Add Channel $active: /opthnx_Add $active
.Add Channel ???: /opthnx_Add $$?="Enter Channel Name:"
.-
.$submenu($opthnx_e($$1))
}
alias opthnx_e {
if ($1 isin begin,end) return -
else if ($gettok(%opthanks.exceptions, $1, 44)) {
var %chan = $gettok(%opthanks.exceptions, $1, 44)
return Remove %chan : /opthnx_rem %chan
}
}
alias opthnx_add {
/set %opthanks.exceptions $addtok(%opthanks.exceptions, $1, 44)
}
alias opthnx_rem {
/set %opthanks.exceptions $remtok(%opthanks.exceptions, $1, 1, 44)
}
|
|
|
|
Joined: Dec 2002
Posts: 173
Vogon poet
|
OP
Vogon poet
Joined: Dec 2002
Posts: 173 |
Wow that worked pretty cool, although is it possible you could make it so that you add the channels that you want to op to work in rather then adding the channel you don't want op in, seems easily for me to work out
|
|
|
|
Joined: Jan 2003
Posts: 2,973
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,973 |
remove the ! from the $istok check on the op event. And viola!
|
|
|
|
Joined: Dec 2002
Posts: 173
Vogon poet
|
OP
Vogon poet
Joined: Dec 2002
Posts: 173 |
Woohoo thanks that worked great, also, how do i go about making that list in alphabetical order?
|
|
|
|
EVH
|
EVH
|
alias opthnx_add {
/set %opthanks.exceptions $sorttok($addtok(%opthanks.exceptions,$1,44),44)
}
|
|
|
|
|