mIRC Home    About    Download    Register    News    Help

Print Thread
#22478 05/05/03 01:05 PM
Joined: Apr 2003
Posts: 30
D
Ameglian cow
OP Offline
Ameglian cow
D
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:

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

#22479 05/05/03 01:20 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
on *:TEXT:whatever*:?: {
echo -d Whatever you want.
}

#22480 05/05/03 01:27 PM
Joined: Apr 2003
Posts: 30
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Apr 2003
Posts: 30
Thanks very much smile

#22481 05/05/03 02:39 PM
Joined: Apr 2003
Posts: 30
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Apr 2003
Posts: 30
Okies, one last thing smile 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:

#22482 05/05/03 02:45 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
When someone private messages you there is no value in $chan. Try this:
Code:
on *:TEXT:.voiceme *:?:{
  mode $2 +v $nick
}
And ask someone to message you with ".voiceme #channel".

#22483 05/05/03 02:51 PM
Joined: Apr 2003
Posts: 30
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Apr 2003
Posts: 30
Thanks, didn't think of that lol

#22484 05/05/03 02:59 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
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
#22485 05/05/03 03:05 PM
Joined: Apr 2003
Posts: 30
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Apr 2003
Posts: 30
Thanks soo much guys, KingTomato, that's a lil confusing so I've just hardcoded it smile

on *:TEXT:.VoiceMe *:?:{
mode #S-Challenge +v $nick
}

Works fine for Kick but strangley not Voice...Ideas anyone? wink

#22486 05/05/03 03:37 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
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
#22487 05/05/03 04:06 PM
Joined: Apr 2003
Posts: 30
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Apr 2003
Posts: 30
Ahh, well spotted. Thanks grin

#22488 05/05/03 04:34 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
No problem, glad to have helped. >:D


-KingTomato
#22489 05/05/03 04:59 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
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.

#22490 06/05/03 08:10 AM
Joined: Apr 2003
Posts: 55
T
Babel fish
Offline
Babel fish
T
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

#22491 07/05/03 03:41 PM
Joined: Apr 2003
Posts: 30
D
Ameglian cow
OP Offline
Ameglian cow
D
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 smile - Dont worry, there IS a prefectly good reason for it smile


Link Copied to Clipboard