mIRC Homepage
Posted By: CWO /who stored in a variable? - 18/10/03 08:56 AM
I dont know if I'm missing something or not. I've been searching all through the help file and the forums for this but havent found an answer. Is there a way to store a /who in a variable? Or at least have it returned in a $ command? I know there is $address but I would much rather have the whole /who or the first line of a /whois stored in a variable for my bot project.
Posted By: landonsandor Re: /who stored in a variable? - 18/10/03 09:04 AM
used on dalnet:

raw 352:*: {
var %who.info $+($6,!,$3,@,$4) $5 $9-
}

this would give the info during a /who #channel (for example) looking like this:

landonsandor!you@me.you.com full-server-name-here my-custom-name-field-message

The above code is part of my who displayer, but that will work fine as an example. In my displayer I have it color all different kinds of nicks for different reasons, but that variable works awesome for me


EDITED

A good thing to do would be to /debug on before you do a /who to find the exact raw. Also, the below code is good for finding out the raw number PLUS the first 10 values. This should be of great help to you

raw *:*://echo -s $numeric $1 1 $2 2 $3 3 $4 4 $5 5 $6 6 $7 7 $8 8 $9 9 $10- $10- | halt
Posted By: CWO Re: /who stored in a variable? - 18/10/03 10:07 AM
I must be using these wrong.
I tried both and its giving me
352:*: Unknown command
*:*: Unknown command
I looked in the debug.log /who seems to be 315 but when I put raw 315:*: ... It says the same.. Unknown command.

and /raw on. Raw is on.
Posted By: landonsandor Re: /who stored in a variable? - 18/10/03 10:10 AM
the line I used I tested before I pasted it here so I know it works. Can you please paste the EXACT line you copied into your mirc?
Posted By: CWO Re: /who stored in a variable? - 18/10/03 10:17 AM
/raw 315:*: //echo -s $numeric $1 1 $2 2 $3 3 $4 4 $5 5 $6 6 $7 7 $8 8 $9 9 $10- $10- | halt


I get in my window
[05:16] -> Server: 315:*://echo -s $numeric $1 1 $2 2 $3 3 $4 4 $5 5 $6 6 $7 7 $8 8 $9 9 $10- $10- | halt

I get in the system window
315:*://echo Unknown command

I'm using this on GamesNET
Posted By: Collective Re: /who stored in a variable? - 18/10/03 10:20 AM
You are meant to put it in your remotes, not the command line.
Posted By: CWO Re: /who stored in a variable? - 18/10/03 10:25 AM
on *:text:!command:? {
raw 315:*://echo -s $numeric $1 1 $2 2 $3 3 $4 4 $5 5 $6 6 $7 7 $8 8 $9 9 $10- $10- | halt
}

thats the remote script I have for it. When I get someone to say !command in a PM to me it gives me the same thing. I dont mean to keep bothering you. It just doesnt seem to be working right.
Posted By: Collective Re: /who stored in a variable? - 18/10/03 10:28 AM
What landon gave you is called a "Raw event", just like the on Events (on JOIN, on QUIT, etc.) these cannot be used inside other events.

Code:
on *:text:!command:?: {
  who $me
}
raw 315:*://echo -s $numeric $1 1 $2 2 $3 3 $4 4 $5 5 $6 6 $7 7 $8 8 $9 9 $10- $10- | halt
Posted By: CWO Re: /who stored in a variable? - 18/10/03 10:39 AM
Ahh it works now. Thanks to both of you for your help. grin
Posted By: landonsandor Re: /who stored in a variable? - 18/10/03 10:43 AM
I prolly shoulda clarified that earlier smile You're welcome none-the-less
© mIRC Discussion Forums