| 0 comments ]

Re-Share This Post: Technorati Digg This Stumble Stumble Facebook Twitter
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 <nick><server> :<server info>.
Example: magic NudeDude RockHill.SC.US.Undernet.Org CETLink.Net www.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 www.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 | halt
raw 319:*:aline @whois Channels: $3- | halt
raw 317:*:aline @whois Idle: $duration($3) | halt
raw 313:*:aline @whois $2- | halt
raw 301:*:aline @whois Away: $3- | halt
raw 318:*:halt

0 comments

Post a Comment

 
http://www.tsfaenterprise.com TSFA ENTERPRISE TSFA GAS OVEN AND HOME APPLIANCE IN PAKISTAN GAS OVEN GAS OVEN in pakistan Pakistan Home Appliance http://gasovenandhomeappliancesinpakistan.com/ TSFA ENTERPRISE TSFA GAS OVEN AND HOME APPLIANCE IN PAKISTAN GAS OVEN GAS OVEN in pakistan Pakistan Home Appliance