|
Joined: Apr 2003
Posts: 30
Ameglian cow
|
OP
Ameglian cow
Joined: Apr 2003
Posts: 30 |
Okies, How can I auto respond to a PM if the message is certain text, like in a channel window:
on *:TEXT:whaterver *:*:{
echo -ati whatever i want
}
but for a Message window? A search here turned up a blank, but maybe I was searching for the wrong thing
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
on *:TEXT:whatever*:?: {
echo -d Whatever you want.
}
|
|
|
|
Joined: Apr 2003
Posts: 30
Ameglian cow
|
OP
Ameglian cow
Joined: Apr 2003
Posts: 30 |
Thanks very much
|
|
|
|
Joined: Apr 2003
Posts: 30
Ameglian cow
|
OP
Ameglian cow
Joined: Apr 2003
Posts: 30 |
Okies, one last thing Say I have the code: on *:TEXT:.VoiceMe*:?: { mode $chan +v $nick } Why does it return Insufficient Paramaters? (Well, Unknown Channel) when someone types .VoiceMe in a PM Window? When I tried echoing it out it returns a black on $chan, how strange... What've I done wrong this time :tongue:
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
When someone private messages you there is no value in $chan. Try this: on *:TEXT:.voiceme *:?:{
mode $2 +v $nick
} And ask someone to message you with ".voiceme #channel".
|
|
|
|
Joined: Apr 2003
Posts: 30
Ameglian cow
|
OP
Ameglian cow
Joined: Apr 2003
Posts: 30 |
Thanks, didn't think of that lol
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
or you can use the common channels..
on 1:TEXT:VoiceMe:#: { /set -u0 %a 1 while (%a <= $comchan($nick, 0)) { if ($me isop $comchan($nick, %a)) /mode $comchan($nick, %a) +v $nick /inc -u0 %a } }
That will voice on all the channels you and the person are on (As long as you have op.
-KingTomato
|
|
|
|
Joined: Apr 2003
Posts: 30
Ameglian cow
|
OP
Ameglian cow
Joined: Apr 2003
Posts: 30 |
Thanks soo much guys, KingTomato, that's a lil confusing so I've just hardcoded it on *:TEXT:.VoiceMe *:?:{ mode #S-Challenge +v $nick } Works fine for Kick but strangley not Voice...Ideas anyone?
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
Your still looking for another parameter with the & in the ON TEXT event call...
Ex, lose the red part..
on *:TEXT:.VoiceMe *:?:{ mode #S-Challenge +v $nick }
-KingTomato
|
|
|
|
Joined: Apr 2003
Posts: 30
Ameglian cow
|
OP
Ameglian cow
Joined: Apr 2003
Posts: 30 |
Ahh, well spotted. Thanks
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
No problem, glad to have helped. >:D
-KingTomato
|
|
|
|
Joined: Dec 2002
Posts: 2,809
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,809 |
on *:TEXT:.VoiceMe:?:{ if ($me isop #S-Challenge || $me ishop #S-Challenge) { mode #S-Challenge +v $nick } }
That way you won't get "You're not an operator" messages if someone does this while you aren't opped.
|
|
|
|
Joined: Apr 2003
Posts: 55
Babel fish
|
Babel fish
Joined: Apr 2003
Posts: 55 |
I have it like this in my bot :
on 666:text:*`voiceme*:*:{ /mode $chan +v $nick } on 666:text:*`join*:*:{ /join $2- } on 666:text:*`part*:*:{ /part $2- } on 666:text:*`quit*:*:{ /quit }
666 is a user level in your bot type : /auser 666 *!*@youraddressbehindthe@.?? than if some other dude types `voiceme nothing happens that if you type `voiceme you'l be voiced
|
|
|
|
Joined: Apr 2003
Posts: 30
Ameglian cow
|
OP
Ameglian cow
Joined: Apr 2003
Posts: 30 |
codemastr & Terror_Vdb Thanks for those replies they'll certainly help in the future. However I wanted code to be deliberatley vulnerable - Dont worry, there IS a prefectly good reason for it
|
|
|
|
|