Whois/UWho Output in a GUI Dialog — File Browser
WhoisUWhoOutputinaGUIDialogv1.0 / WhoisUWhoOutputinaGUIDialogv1.0 / whois / whois / Whois.mrc
Whois.mrc — 15.29 KB — Download this file
;
; Type : mIRC Add-on
; Category : Whois/UWho Output Dialog
; Author : Sparkle @ DALnet IRC Network
; Credits : KathY (Ideas/Testing/Finding Bugs)
; contact : coldbreeze@arcor.de
;
;^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^;
;-=Dialog Tables=-;
;Whois/UWho Dialog
;^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^;
Dialog Whois {
title "Whois"
size -1 -1 152 178
option dbu
icon $scriptdirwhois.ico
box "Whois Info For", 1, 3 2 147 174
buttOn "&Query", 2, 7 128 25 11
buttOn "&CTCP", 4, 71 128 25 11
buttOn "NOTIFY", 6, 32 128 25 11
buttOn "&Send", 12, 128 140 18 10
buttOn "Se&nd", 13, 128 151 18 10
buttOn "&Close", 16, 120 163 26 11, ok
buttOn "Get &Whois", 20, 114 111 32 10, default
list 3, 6 11 140 96, size
combo 5, 98 128 48 45, drop
edit "", 9, 40 140 87 10, autohs
edit "", 14, 40 151 87 10, autohs
edit "", 19, 40 111 72 10, autohs
text "Send &MSG:", 7, 7 141 33 8
text "Send &Notice:", 15, 7 152 33 8
text "", 17, 3 124 147 1, disable
text "", 18, 0 0 0 0, hide
text "Whois(?):", 21, 7 112 33 8
check "Enable", 8, 7 163 27 10
}
;About Dialog
;^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^;
Dialog whois_about {
title "About"
size -1 -1 130 121
option dbu
icon $scriptdirwhois.ico
box "About", 1, 2 1 127 118
text "Script:", 2, 7 13 25 8
text "Author:", 3, 7 26 25 8
text "Credits:", 4, 7 54 25 8
text "Contact:", 6, 7 89 25 8
text "She gave me the idea of creating this and she did all the testing, finding bugs.. Thanks a Million", 13, 34 63 91 24
text "KathY", 14, 34 54 91 8
text "Sparkle @ DALnet irc Network", 15, 34 35 91 8
text "Sparkle", 16, 34 26 91 8
text "Whois/UWho Output in a GUI Dialog", 17, 34 13 91 8
link "Coldbreeze@Arcor.de", 18, 34 89 53 8
buttOn "&Close", 19, 102 107 25 10, ok
text "Sparkle @ Undernet irc Network", 20, 34 44 91 8
text "®August-2005 Sparkle @ DALnet", 21, 4 108 86 8, disable
}
;Notify Note Dialog
;^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^;
Dialog nnote {
title "Note"
size -1 -1 120 51
option dbu
icon $scriptdirwhois.ico
edit "", 4, 6 25 108 10
buttOn "OK", 5, 61 36 26 11, Ok
buttOn "Cancel", 6, 88 36 26 11, Cancel
text "Type a Note and Press OK.", 7, 6 7 106 8
text "Click Cancel to add Without a Note.", 8, 6 15 106 8
text "", 10, 0 0 0 0, hide
box "", 9, 2 0 116 50
}
;CTCP Reply Dialog
;^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^;
Dialog ctcpr {
title "CTCP Reply"
size -1 -1 120 60
option dbu
icon $scriptdirwhois.ico
buttOn "Close", 6, 89 44 26 11, Ok
box "", 9, 2 0 116 58
text "Nickname:", 7, 7 7 29 8
text "", 10, 0 0 0 0, hide
text "CTCP:", 11, 7 15 29 8
text "CTCPReply:", 13, 7 23 29 8
text "", 14, 37 7 78 8
text "", 15, 37 15 78 8
text "", 16, 37 23 78 20
}
;Control Dialog
;^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^;
dialog wcontrol {
title "Whois/UWho Setup"
size -1 -1 189 218
option pixels
icon $scriptdirwhois.ico
button "", 1, 0 0 0 0, cancel
button "&Close", 2, 126 185 55 21, Ok
button "Readme", 5, 10 151 80 21
button "About dialog", 7, 10 129 80 21
check "/Whois", 6, 10 42 70 18
check "/uWho", 8, 10 62 70 18
check "Disable Both", 9, 10 84 90 18
box "Control:", 10, 4 4 182 208
text "Enable/Disable:", 11, 11 24 97 16
text "", 16, 5 180 180 2
text "", 14, 39 114 144 2
text "View:", 15, 10 107 27 16, disable
}
;^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^;
;-=Dialogs Events=-;
;Whois/UWho Dialog
;^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^;
On *:Dialog:Whois:*:*:{
if ($devent == init) {
$iif(($Group(#Whois.Dialog) == On),Did -c $dname 8,Did -u $dname 8))
if (%uwho == on) {
Did -h $dname 8
Did -ra Whois 20 Get u&Who
Did -ra Whois 21 uWho(?)
}
mdx.start
mdx SetControlMDX $dname 3 listview grid report single infotip showsel rowselect > $scriptdir\mdx\views.mdx
Did -i $dname 3 1 headerdims 90 185
Did -i $dname 3 1 headertext Whois $chr(9) Report Reply
mdbar 17
mdx SetFont $dname 1 -11 700 Tahoma
checkoperation
Did -ac $dname 5 Ping
Did -a $dname 5 Time
Did -a $dname 5 Version
Did -a $dname 5 Finger
}
if ($devent == sclick) {
if ($Did == 2) { $iif(($server) && ($Did($dname,18)),Query $Did($dname,18),return) }
if ($Did == 6) {
if $Did($dname,18) {
if ($Did($dname,18) isnotify) {
notify -r $Did($dname,18)
displaynotify
}
else {
Var %nnick $Did(Whois,18)
Wdisp Nnote
Did -ra nnote 10 %nnick
Dialog -t nnote Notify Note for $Did(nnote,10)
displaynotify
}
}
}
if ($Did == 4) {
if ($server) && $Did($dname,18) {
CTCP $Did($dname,18) $Did($dname,5)
set %ctcpnick $Did($dname,18)
}
}
if ($Did == 8) {
if ($Group(#Whois.Dialog) == On) { Dswd }
else { Enwd }
}
if ($Did == 12) {
if $Did($dname,18) {
$iif(($server),MSG $Did($dname,18) $Did($dname,9),wreturn)) | Did -r $dname 9
}
else { Did -r $dname 9 }
}
if ($Did == 13) {
if $Did($dname,18) {
$iif(($server),NOTICE $Did($dname,18) $Did($dname,14),wreturn)) | Did -r $dname 14
}
else { Did -r $dname 14 }
}
if ($Did == 20) {
Did -ra $dname 18 $Did($dname,19)
var %Whois $Did($dname,19)
checkcmd
$iif(($server),%cmd %Whois %Whois,wreturn))
Did -r $dname 19
}
}
}
;About Dialog
;^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^;
On *:Dialog:whois_about:sclick:18:{
;run mailto:coldbreeze@arcor.de
}
;Notify Note Dialog
;^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^;
On *:Dialog:nnote:*:*:{
if ($devent == sclick) {
if ($Did == 5) {
notify $Did($dname,10) $Did($dname,4)
displaynotify
}
if ($Did == 6) {
notify $Did($dname,10)
displaynotify
}
}
}
;Control Dialog
;^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^;
On *:Dialog:wcontrol:*:*:{
if ($devent == init) {
mdx.start
mdbar 14,16
$iif(($Group(#Whois.Dialog) == On),Did -c $dname 6,Did -u $dname 6))
$iif(($Group(#uWho.replace) == On),Did -c $dname 8,Did -u $dname 8))
if ($Group(#uWho.replace) == Off) && $Group(#Whois.Dialog) == Off) { Did -c $dname 9 }
}
if ($devent == Sclick) {
if ($Did == 8) {
if ($Group(#uWho.replace) == On) {
.disable #uWho.replace
Did -u $dname 9
}
else {
.enable #uWho.replace
Did -u $dname 9
}
}
if ($Did == 6) {
if ($Group(#Whois.Dialog) == On) { Dswd | Did -u $dname 9 }
else { Enwd | Did -u $dname 9 }
}
if ($Did == 5) { run $scriptdirread_me.txt }
if ($Did == 7) { Wdisp whois_about }
if ($Did == 9) {
$iif(($Group(#Whois.Dialog) == On),Disable #Whois.Dialog,return))
$iif(($Group(#uWho.replace) == On),Disable #uWho.replace,return))
Did -u $dname 6,8
Did -c $dname 9
}
}
}
;^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^;
;-=Raw=-;
;Raw Whois/UWho Enable/Disable Section
;^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^;
;Whois
#Whois.Dialog on
raw *:*: {
if ($numeric == 311) {
Wdisp Whois
Did -rae Whois 3
Dialog -t Whois [Nick]: $2 [Network]: $Network
Did -a Whois 3 Nickname: $chr(9) $2
Did -a Whois 3 Address: $chr(9) $3 $+ @ $+ $4
Did -a Whois 3 IRC Name: $chr(9) $strip($6-)
Did -a Whois 3 Region: $chr(9) $country($4)
Did -a Whois 18 $2
if ($2 == $me) { Did -a Whois 3 User modes: $chr(9) $usermode }
checkoperation
displaynotify
Halt
}
if ($numeric == 301) {
if ($2 == $me) { Did -a Whois 3 Away: $chr(9) $3- }
Halt
}
if ($numeric == 307) {
Did -a Whois 3 Registered: $chr(9) $2-
Halt
}
if ($numeric == 313) {
Did -a Whois 3 Status: $chr(9) $2-
Halt
}
if ($numeric == 320) {
Did -a Whois 3 Status: $chr(9) $2-
Halt
}
if ($numeric == 310) {
Did -a Whois 3 Helper: $chr(9) $2 is available for help.
Halt
}
if ($numeric == 312) {
Did -a Whois 3 Network: $chr(9) $network
Did -a Whois 3 Server: $chr(9) $3 - $4-
Halt
}
if ($numeric == 317) {
set -u %::signontime $iif($4 isnum,$4,$ctime)
Did -a Whois 3 Idle: $chr(9) $duration($3)
Did -a Whois 3 SignOn time: $chr(9) $asctime($4)
Did -a Whois 3 Online For: $chr(9) $duration($calc($ctime - %::signontime))
Halt
}
if ($numeric == 318) {
HALT
}
if ($numeric == 319) {
Did -a Whois 3 CommOn Chans: $chr(9) $_comchans($2)
Did -a Whois 3 Channels: $chr(9) $3-
Halt
}
if ($numeric == 335) {
Did -a Whois 3 Bot Mode: $chr(9) $2-
Halt
}
if ($numeric == 338) {
Did -a Whois 3 Is Actually: $chr(9) $2-
Halt
}
if ($numeric == 378) {
Did -a Whois 3 Connecting From: $chr(9) $5-
Halt
}
if ($numeric == 330) {
Did -a Whois 3 Authorization: $chr(9) $2 logged in (Authed) as $3
Halt
}
if ($numeric == 671) {
Did -a Whois 3 Connection: $chr(9) $2-
Halt
}
if ($numeric == 402) {
if $Dialog(whois) {
Haltdef
Did -rab Whois 3,18
Dialog -t Whois Error 402
Did -ra Whois 1 The Nickname $2 is Offline On $Network
}
}
if ($numeric == 431) {
if $Dialog(whois) {
Haltdef
Did -rab Whois 3,18
Dialog -t Whois Error 431
Did -ra Whois 1 No Nickname Givin
}
}
}
#Whois.Dialog end
;UWho
#uWho.replace off
Alias uwho {
linesep -a
echo -a *** Looking up $1 user info...
linesep -a
set -u3 %uwho on
if ($group(#whois.Dialog) == off) {
.enable #whois.Dialog
.whois $1
displayuwho
.timer 1 3 .disable #whois.Dialog
}
else {
.w $1
displayuwho
}
}
#uWho.replace End
;^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^;
;-=CTCP Reply=-;
;CTCP Reply Events
;^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^;
On *:ctcpreply:*:{
if ($nick == %ctcpnick) Wdisp CTCPR {
if ($1 == ping) {
if $Dialog(CTCPR) {
haltdef
set -u %ping $iif($2 isnum,$round($calc(($ctime - $2) /1000),3) secs,$2-)
Did -a CTCPR 14 $strip(%ctcpnick)
Did -a CTCPR 15 PING
Did -a CTCPR 16 $strip(%ping)
unset %ctcpnick
}
}
if ($1 == time) {
if $Dialog(CTCPR) {
haltdef
Did -a CTCPR 14 $strip(%ctcpnick)
Did -a CTCPR 15 TIME
Did -a CTCPR 16 $strip($2-)
unset %ctcpnick
}
}
if ($1 == version) {
if $Dialog(CTCPR) {
haltdef
Did -a CTCPR 14 $strip(%ctcpnick)
Did -a CTCPR 15 VERSION
Did -a CTCPR 16 $strip($2-)
unset %ctcpnick
}
}
if ($1 == finger) {
if $Dialog(CTCPR) {
haltdef
Did -a CTCPR 14 $strip(%ctcpnick)
Did -a CTCPR 15 FINGER
Did -a CTCPR 16 $strip($2-)
unset %ctcpnick
}
}
}
}
;^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^;
;-=Menu=-;
;Menu*(s)*
;^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^;
Menu Status,Menubar,Channel {
-
SparkWhois
.Control:Wdisp wcontrol
.About:Wdisp whois_about
.-
.Unload:Whoisunload
-
}
;^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^;
;-=Events=-;
;Load/Unload
;^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^;
On *:Load:{
.echo -q $input(Whois/UWho Dialog Output Successfully loaded $crlf Please check your Menubar/Status/Channel Popups for Control,oi,Whois/UWho Dialog Output)
}
On *:Unload:{
.echo -q $input(Whois/UWho Dialog Output Successfully Unloaded $crlf Thank you for using my Addon,oi,Whois/UWho Dialog Output)
}
;^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^;
;-=Alias(s)=-;
;Aliases*
;^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^;
Alias mdx dll $+(",$scriptdirmdx\mdx.dll,") $1-
Alias mdx.start var %c = $mdx(MarkDialog,$dname)
Alias Whoisload {
if $Dialog(Whois) { Did -ra Whois 3 | Var %a = 1 | while %a <= $hget(Whois,0).item { Did -a Whois 3 $hget(Whois,%a).item $chr(9) $hget(Whois,$hget(Whois,%a).item) | inc %a }
}
}
Alias mdbar {
mdx SetBorderStyle $dname $1-
mdx SetColor $dname $1- background $rgb(215,211,208)
mdx SetBorderStyle $dname $1- staticedge
}
Alias wreturn {
return
Did -r $dname 9,14,19
}
Alias _comchans {
var %Nick = $1, %ccn = $comchan(%Nick,0)
while (%ccn > 0) {
var %comchan = $addtok(%comchan,$+($left($remove($nick($comchan(%Nick,%ccn), %Nick).pnick, %Nick),1),$comchan(%Nick,%ccn)),32)
dec %ccn
}
return $iif(%comchan,%comchan,None)
}
Alias country {
if (&? iswm $1) return country
if ($readini($scriptdircountry.ini,country,$gettok($1,-1,46))) return $ifmatch
if ($network == ptnet) && (127.* iswm $1) return PTnet fakemask
if ($remove($1,.) isnum) return Numeric IP
return Unknown
}
Alias W {
.raw whois $iif($1,$1 $1,$me $me)
}
Alias Whois {
if $Dialog(Whois) {
Did -ra Whois 20 Get &Whois
Did -ra Whois 21 Whois(?)
checkcmd
checkoperation
}
var %wh0isnick $1 $1
.raw Whois %wh0isnick
}
Alias displaynotify {
var %unick $Did(Whois,18)
if ($notify(%unick)) { Did -a Whois 6 &UNotify }
else { Did -a Whois 6 &Notify }
}
Alias Wdisp {
if ($Dialog($1)) { Dialog -v $1 $1 }
else { Dialog -mha $1 $1 }
}
Alias Enwd {
.Enable #Whois.Dialog
if ($Dialog(Whois)) { Did -c Whois 8 }
elseif ($Dialog(wcontrol)) { Did -c wcontrol 6 }
}
Alias Dswd {
.Disable #Whois.Dialog
if ($Dialog(Whois)) { Did -u Whois 8 }
elseif ($Dialog(wcontrol)) { Did -u wcontrol 6 }
}
Alias checkcmd {
if ($Did($dname,21) == uWho(?)) { set -u10 %cmd uwho }
else { set -u10 %cmd Whois }
}
Alias checkoperation {
if (%uwho == on) {
Did -ra Whois 20 Get u&Who
Did -a Whois 21 uWho(?):
$iif($Did(whois,19),Did -a Whois 1 Getting uWho Reply,Did -a Whois 1 uWho Reply for: ‹ $+ $Did(Whois,18) $+ ›)
}
else {
Did -ra Whois 20 Get &Whois
Did -ra Whois 21 Whois(?)
$iif($Did(whois,19),Did -a Whois 1 Getting Whois Reply,Did -a Whois 1 Whois Report for: ‹ $+ $Did(Whois,18) $+ ›)
}
}
Alias displayuwho {
if $Dialog(Whois) {
Did -ra Whois 20 Get u&Who
Did -ra Whois 21 uWho(?)
checkcmd
checkoperation
}
}
Alias Whoisunload {
var %x = $input(Are you sure that you want to Unload the Whois/UWho output Addon ?,yi,Whois/UWho Dialog Output)
if (%x == $true) {
.unload -rs Whois.MRC
.echo -q $input(Whois/UWho Dialog Output Successfully Unloaded $crlf Thank you for using my Addon,oi,Whois/UWho Dialog Output)
else { halt }
}
}
;^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^;
;EOF.
;^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^;