mIRC Home    About    Download    Register    News    Help

Print Thread
#6315 13/01/03 02:42 AM
Joined: Jan 2003
Posts: 6
D
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Jan 2003
Posts: 6
i had done this a while ago, but dont remember.

need to take a remote command
!bot-vote test vote

and take that test vote and make it so that $2- will be what ever text is after !bot-vote

i know its something like

on text: !bot-vote <vote topic>

i dont remember how to get the ending to the $2-

anyone able to help?

#6316 13/01/03 02:54 AM
Joined: Jan 2003
Posts: 20
H
Ameglian cow
Offline
Ameglian cow
H
Joined: Jan 2003
Posts: 20
Iif I understand you right, you want everything after "!bot-vote". In an on TEXT event you are ready to use $2-, e.g.:

on 1:TEXT:!bot-vote*:#:echo $2-

So if anyone says "!bot-vote test etc." to any channel, the above code would echo "test etc.".

--hatch


__________________
"Who cares. Out of sight, out of mind."
#6317 13/01/03 05:49 AM
Joined: Dec 2002
Posts: 208
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 208
your question is unclear .. please try to be more specific if the following doesnt answer it..

you said
Quote:
and take that test vote and make it so that $2- will be what ever text is after !bot-vote


if i take that literaly u want to asigne $2- the value of the text following !bot-vote .. the thing here is that $2- will already have that value asuming that !bot-vote is $1 .. however to set $2- (although its already set in this case)
you would use the tokenize command

tokenize C text
where C is the ascii value of the token seperator in this case a space, and therefore 32

tokenize 32 $1 this is a test

in this example $2- will then return 'this is a test'

although i dont think thats what u ment to ask, thats what u literaly asked.

i'd be happy to help u further if u could perhaps explain the question a bit beter.

as far as the event and conditional checking

on 1:TEXT:*:?: { if ($1 == !whatever) { commands } }

asuming u want it to work for privmsg
replace ? with # to make it work for channels insted .. obviously u need to replace !whatever with your !bot-vote and replace 'commands' with whatever u want it to do when that happens (which has yet to be determined)

Cobra^


Link Copied to Clipboard