mIRC Home    About    Download    Register    News    Help

Print Thread
/who stored in a variable? #55731 18/10/03 08:56 AM
Joined: Oct 2003
Posts: 9
C
CWO Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Oct 2003
Posts: 9
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.

Re: /who stored in a variable? #55732 18/10/03 09:04 AM
Joined: Dec 2002
Posts: 1,527
L
landonsandor Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,527
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

Last edited by landonsandor; 18/10/03 09:11 AM.

Those who fail history are doomed to repeat it
Re: /who stored in a variable? #55733 18/10/03 10:07 AM
Joined: Oct 2003
Posts: 9
C
CWO Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Oct 2003
Posts: 9
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.

Re: /who stored in a variable? #55734 18/10/03 10:10 AM
Joined: Dec 2002
Posts: 1,527
L
landonsandor Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,527
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?


Those who fail history are doomed to repeat it
Re: /who stored in a variable? #55735 18/10/03 10:17 AM
Joined: Oct 2003
Posts: 9
C
CWO Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Oct 2003
Posts: 9
/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

Last edited by CWO; 18/10/03 10:17 AM.
Re: /who stored in a variable? #55736 18/10/03 10:20 AM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
You are meant to put it in your remotes, not the command line.

Re: /who stored in a variable? #55737 18/10/03 10:25 AM
Joined: Oct 2003
Posts: 9
C
CWO Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Oct 2003
Posts: 9
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.

Re: /who stored in a variable? #55738 18/10/03 10:28 AM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
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

Re: /who stored in a variable? #55739 18/10/03 10:39 AM
Joined: Oct 2003
Posts: 9
C
CWO Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Oct 2003
Posts: 9
Ahh it works now. Thanks to both of you for your help. grin

Re: /who stored in a variable? #55740 18/10/03 10:43 AM
Joined: Dec 2002
Posts: 1,527
L
landonsandor Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,527
I prolly shoulda clarified that earlier smile You're welcome none-the-less


Those who fail history are doomed to repeat it