|
|
|
Joined: Aug 2004
Posts: 6
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Aug 2004
Posts: 6 |
I need some help with an auto response. I want to responed to people after I auto op them, but only if I op them. This is what i have so far On *:Text:*Thanks for the*:#mar-ops:{ /msg $chan Not a problem $nick } any suggestions? Thanks
|
|
|
|
Joined: Dec 2002
Posts: 774
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 774 |
on @*:Text:*Thanks for the*:#mar-ops:{ if ( $istok(%opped,$nick,32) ) { /msg $chan Not a problem $nick set %opped $remtok(%opped,$nick,1,32) } }
on @:op:#mar-ops: { if ( $nick == $me ) { set %opped %opped $opnick } }
try something like that...
//if ( khaled isgod ) echo yes | else echo no
|
|
|
|
Joined: Aug 2004
Posts: 6
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Aug 2004
Posts: 6 |
Thanks, but that doesnt seem to be working.
Whats : %opped
thanks for ya help
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
in mode changes like op deop and so on the person making the change is held in $nick
on *:op:#:if ($nick == $me) { msg $chan $nick has opped $opnick }
|
|
|
|
Joined: Dec 2002
Posts: 1,541
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,541 |
and if you're making the change you can do this:
on me:*:op:#:msg $chan $nick has opped $opnick
That will only trigger when YOU do it. If you're planning on using things for others and you, use what MikeChat showed you as it'll be easier to integrate
Those who fail history are doomed to repeat it
|
|
|
|
Joined: Aug 2004
Posts: 6
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Aug 2004
Posts: 6 |
This is what i have ------------------------------------------------ on @*:Text:*Thanks for the*:#mar-ops:{ if ( $istok(%opped,$nick,32) ) { /say Not a problem $nick set %opped $remtok(%opped,$nick,1,32) } }
on *:op:#:if ($nick == $me) { msg $chan $nick gave ops to $opnick } on me:*:op:#:msg $chan $nick gave ops to $opnick --------------------------------------------------------------- Only the last line of code works. Can you help me fix the top part?
|
|
|
|
Joined: Dec 2002
Posts: 1,541
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,541 |
on me:*:op:#:msg $chan $nick gave ops to $opnickreplaces: on *:op:#:if ($nick == $me) { msg $chan $nick gave ops to $opnick }So you dont need both of them.
on @*:Text:*Thanks for the*:#mar-ops:{
if ( $istok(%opped,$nick,32) ) {
say Not a problem $nick
set %opped $remtok(%opped,$nick,1,32)
}
}
As for the above, does it even trigger? Maybe try this to test to see if it even triggers:
on @*:Text:*Thanks for the*:#mar-ops:{
echo -s THIS IS A TEST
if ( $istok(%opped,$nick,32) ) {
say Not a problem $nick
set %opped $remtok(%opped,$nick,1,32)
}
}
If the "this is a test" does not even fire, that would be a place to start figuring out why it wont (like multiple on text events etc)
Those who fail history are doomed to repeat it
|
|
|
|
Joined: Aug 2004
Posts: 6
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Aug 2004
Posts: 6 |
This is a test showed up...but the rest doesnt.
|
|
|
|
Joined: Dec 2002
Posts: 1,541
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,541 |
This might sound stupid but why not use:
if ($nick isin %opped) {
say Not a problem $nick
set %opped $remtok(%opped,$nick,1,32)
} I understand you are trying to see if the token (which is actually the nickname firing the event) exists in that variable, but would my above example work for you? Tokens arent my thing and while I understand them, I feel like Im missing something important but it could just be me.
Those who fail history are doomed to repeat it
|
|
|
|
Joined: Dec 2002
Posts: 788
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 788 |
One usually doesnt use "isin" when searching for specific set of characters in a phrase, because:
%var being; testingabc this is a test
if (abc isin %var) would return true, because, it appears in the string, however it is NOT a "word" on its own.. whereas $istok checked if it was a "word" by looking to see if there was a space either side..
If you are still looking for a working solution, with the same effect as the first lot of coding.. On *:Text:*Thanks for the*:[color:red]#channel:{ if (!$hget(opr,$nick)) { msg $chan Not a problem $nick hadd -mu60 opr $nick 1 } } [/color] Eamonn.
|
|
|
|
Joined: Dec 2002
Posts: 1,541
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,541 |
I agree for that exact reason, but I just couldnt (for some stupid reason) figure out that simple token code - it just wasnt happening lol Im sure you know what I mean
Those who fail history are doomed to repeat it
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
Then you're probably not adding the nick to the var when you op them. - on me:@*:op:#mar-ops:set %opped $addtok(%opped,$opnick,32)
|
|
|
|
Joined: Aug 2004
Posts: 6
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Aug 2004
Posts: 6 |
that works but it does it even when Im not the one doing the opping
[01:30] * murda-- sets mode: +v T-MaC [01:30] <T-MaC> • Thanks for the +v • [01:30] > Not a problem T-MaC
I want it to do it just for opping when i do it. I figured out how to get it to do it in any chan im in but I cant figure out how to do it just for ops by me. Any Suggestions?
|
|
|
|
Joined: Dec 2002
Posts: 1,541
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,541 |
so then do something as simple as
if ($nick == $me) { stuff }
the above means if YOU op the person.
if ($opnick == $me) { stuff }
the above means if you're the one being opped
if (($opnick == $me) && ($nick == $me)) { stuff }
the above means if you're the one opping and you're the one being opped (thought Id throw this in anyhow jsut to illustrate is all). Do any of those help you out at all??
Those who fail history are doomed to repeat it
|
|
|
|
Joined: Aug 2004
Posts: 6
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Aug 2004
Posts: 6 |
I tried what you posted , but it doesnt work? what goes where "stuff" is?
if ($nick == $me) { stuff }
|
|
|
|
Joined: Dec 2002
Posts: 1,541
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,541 |
referrencing therat's example: on @:op:#mar-ops: {
if ($nick == $me) { set %opped %opped $opnick }
} See how it all fits together? if you have more if statements that you want to fire when you're the one who opped somebody you'd use (totally made up code): on @:op:#mar-ops: {
if ($nick == $me) {
if ($nick == hello-there) { command1 }
if ($me == Bossman) { msg # Bossman says know your role }
}
}
Those who fail history are doomed to repeat it
|
|
|
|
|
|
|
|