Sign in to follow this  

Whois to custom window

Whois to custom window


This mirc scripting tutorial describes a simple way to show your whois reply to a custom window.

This code uses raw and custom windows. The whois reply can only be obtained using raw scripting.

The raw number to use in this script is: 301, 311, 312, 313, 317, 318, 319.

If you want to read more about raw nummerics download Jeepsters nummerics help file.

The information we want to display is filtered out with $1 identifiers.


Lets start, if we for example take the raw 312 reply wich is used to get the server the user is on.

The reply from the server when you do /whois NudeDude is :.

Example: magic NudeDude RockHill.SC.US.Undernet.Org CETLink.Net

magic is your nick. This is obtained by $1 (first word)

NudeDude is the nick you did a whois on. This is obtained by $2 (second word)

RockHill.SC.US.Undernet.Org is the server the other user is on. This is obtained by $3 (third word).

CETLink.Net is the server info. This is obtained by $4- (fourth and the words after that).

We want the server name so we use $3. :o)


But how do we get it to a @whois window? Look at the first lines after raw 311:*:

window @whois 0 0 450 160 arial 14 will open a custom window named @whois

it will be opened at location 0 0 wich is the top left corner. the size will be 450*160 pixels

and the font will be arial with size 14. easy eh?

read more by typing /help custom windows in mIRC :o)


The aline is command to add a line in the custom window. lets take raw 312 as an example again. raw 312:*:aline @whois Server: $3 | halt

The raw 312:*: makes it get the raw reply about the server.

The aline @whois makes it add a line in the custom window named @whois

The text that is added is the text after the @whois.

We add the word Server: so we know it is the server the user is on that is shown and then we use our identifier $3 that shows the server name, in this case RockHill.SC.US.Undernet.Org. We also add | halt after the line, that is so it wont show anything in your status window :o)

This is how everything will look when you add all the code below in your script.





This maybe isn't the best looking @whois whindow, but it's made to show you an easy way to use raw and custom windows together without a lot of variables, This is the finished code, add it in to your remote (alt+r), enjoy!


>raw 311:*:{  window @whois 0 0 450 160 arial 14  aline @whois Nick: $2  aline @whois Host: $3 $+ @ $+ $4  aline @whois Real name: $6-  halt}raw 312:*:aline @whois Server: $3 | haltraw 319:*:aline @whois Channels: $3- | haltraw 317:*:aline @whois Idle: $duration($3) | haltraw 313:*:aline @whois $2- | haltraw 301:*:aline @whois Away: $3- | haltraw 318:*:halt  

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this