mIRC Homepage
Posted By: Doctor_Souza raw 301 - 14/11/18 05:19 AM
hi, is possible get info of raw 301 without giving whois, tankyou!
Posted By: Raccoon Re: raw 301 - 14/11/18 09:14 AM
301 is only ever received from /whois. You can gather the same info of this whois line from the /who command. You can generally gather this same information, without sending a server command, with mIRC's built-in Internal Address List (IAL), which remembers the information it sees about people. When someone joins a channel or speaks, their address is recorded to the IAL. Sending the command /who #channel or /ialfill #channel will populate the IAL with everyone's information, whether they have spoken or not.

$ial(nick|address) .nick .user .host .addr .mark .account .away .gecos .id
Posted By: Doctor_Souza Re: raw 301 - 14/11/18 01:38 PM
nice man, but when i use $ial(nick/address).away return $true or $false and i wish it would come back away reason, has as?
Posted By: Wims Re: raw 301 - 14/11/18 02:37 PM
The ial does not provide a way to access the away message, you can suggest it.
Posted By: Raccoon Re: raw 301 - 14/11/18 03:00 PM
Away Message is not a readily accessible message and it has a tenancy to change. By readily accessible, it's not available in WHO, NAMES, nor other recent IRCx3 extensions. You will have to /whois or /msg the user.
Posted By: Doctor_Souza Re: raw 301 - 14/11/18 04:46 PM
al right, so no way to get away reason if not with whois?
Posted By: Wims Re: raw 301 - 14/11/18 05:06 PM
It has a tendency to change but it would *change* whenever the away status change, yet this one is available via the prop.
Possibly the away status is available for mIRC without asking it to the server, which may not be true for the away message, but that could still be wanted by user, for example ircv3 might improve this in the future. $ial().awaymsg can always be a thing, even if it wouldn't return something until you whois the user (at least for now)
Posted By: KindOne Re: raw 301 - 15/11/18 09:41 AM
If the network supports away-notify (it can be found in the "Caps supported:" line in your server/status window when connecting to a network) you could get the away message.

It will only work if they set /away while in the same channel(s) with you or they join a channel you are in while they are /away.

Code:
raw AWAY:*:{
  if ($1 != $null) { 
    echo -ag Nick: $nick
    echo -ag Away Message: $1-
  }
  else { echo -ag $nick is no longer away. } 
}


Quote:

<- :wat!wat@127.0.0.1 PRIVMSG #foo :mIRC RULES!
<- :wat!wat@127.0.0.1 AWAY :I AM AWAY!

Quote:

Nick: wat
Away Message: I AM AWAY!


Quote:

15/04/2017 - mIRC v7.48
...
18.Added CAP support for away-notify. This is automatically enabled if
available and makes the server send AWAY events to the client
indicating the away state of users on the same channels as you. AWAY
events are not shown but are used to set $ial().away. They trigger as
RAW events.



https://ircv3.net/specs/extensions/away-notify-3.1.html
Posted By: Raccoon Re: raw 301 - 15/11/18 07:24 PM
I stand corrected. Was not aware that the message was included in this event. So it would make a good IAL candidate in theory.

It could be tacked onto the IAL as an IALmark property.
/ialmark -n $nick awaymsg $1-
$ialmark($nick,awaymsg).mark
Posted By: Wims Re: raw 301 - 15/11/18 07:45 PM
That's for scripting, what's wrong with $ial().awaymsg, just like $ial().away ?
Posted By: Raccoon Re: raw 301 - 16/11/18 07:37 AM
Nothing is wrong if that's going to become a feature suggestion. But you can get started and rolling today with scripting.
© mIRC Discussion Forums