mIRC Home    About    Download    Register    News    Help

Print Thread
OP thanker #66194 01/01/04 06:31 PM
Joined: Dec 2002
Posts: 174
K
Kev_Uk Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2002
Posts: 174
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

Re: OP thanker #66195 01/01/04 07:05 PM
Joined: Jan 2004
Posts: 6
H
Hauxi Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
H
Joined: Jan 2004
Posts: 6
#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


Hauxi beyp, smile
Re: OP thanker #66196 01/01/04 08:47 PM
Joined: Dec 2002
Posts: 174
K
Kev_Uk Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2002
Posts: 174
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.

Re: OP thanker #66197 01/01/04 09:33 PM
Joined: Dec 2002
Posts: 332
C
Cheech Offline
Fjord artisan
Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
how about using $read and /write ?

Code:
  
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

Re: OP thanker #66198 01/01/04 09:42 PM
Joined: Jan 2004
Posts: 6
H
Hauxi Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
H
Joined: Jan 2004
Posts: 6
#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...


Hauxi beyp, smile
Re: OP thanker #66199 01/01/04 09:43 PM
Joined: Dec 2002
Posts: 174
K
Kev_Uk Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2002
Posts: 174
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

Re: OP thanker #66200 01/01/04 11:23 PM
Joined: Jan 2003
Posts: 150
J
J0ke Offline
Vogon poet
Offline
Vogon poet
J
Joined: Jan 2003
Posts: 150
try smth like this laugh
Code:
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 =]


Go ahead, jump. 100,000 lemmings can't be wrong.
Re: OP thanker #66201 02/01/04 12:01 AM
Joined: Dec 2002
Posts: 174
K
Kev_Uk Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2002
Posts: 174
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.

Re: OP thanker #66202 02/01/04 12:02 AM
Joined: Dec 2002
Posts: 174
K
Kev_Uk Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2002
Posts: 174
This didn't work as it only added the %op.chans to the %var and not the actual channel

Re: OP thanker #66203 02/01/04 01:11 AM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Try this grin:

Code:
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)
}


-KingTomato
Re: OP thanker #66204 02/01/04 02:25 AM
Joined: Dec 2002
Posts: 174
K
Kev_Uk Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2002
Posts: 174
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

Re: OP thanker #66205 02/01/04 04:41 AM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
remove the ! from the $istok check on the op event. And viola!


-KingTomato
Re: OP thanker #66206 02/01/04 01:12 PM
Joined: Dec 2002
Posts: 174
K
Kev_Uk Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2002
Posts: 174
Woohoo thanks that worked great, also, how do i go about making that list in alphabetical order?

Re: OP thanker #66207 02/01/04 02:35 PM
Joined: Oct 2003
Posts: 273
E
EVH Offline
Fjord artisan
Offline
Fjord artisan
E
Joined: Oct 2003
Posts: 273
Code:
alias opthnx_add {
  /set %opthanks.exceptions $sorttok($addtok(%opthanks.exceptions,$1,44),44)
}