Displays displays the Name, IP, Port, Status - Bytes sent/received & last Sent/recieved
Has options to refresh the status, close a socket and close all sockets.
Copy and paste this code below into your remotes (alt + r)
To run the dialog u can simply type /sockstats or u can add a popup to your menubar or wherever to open it.
ie. &Socket Status:/sockstats in your status popup section (alt + p)
**IF you have no active sockets it wont open the dialog, it will just return no open sockets in your active window.
CODE
alias sockstats { if ($sock(*,1)) {
if ($dialog(sockstats) == $null) {
dialog -m sockstats sockstats
}
}
else echo -a 12¯ There is currently no Active mIRC sockets
}
dialog sockstats {
title "(D)Socket Status"
size -1 -1 182 84
option dbu
box "", 1, -5 -3 200 4
box "", 2, -3 -2 200 4
box "", 3, -3 68 200 4
list 4, 0 3 41 67, sort size
box "", 100, 42 1 139 44
text "Name :", 5, 45 7 19 8
text "IP :", 6, 45 16 19 8
text "Port :", 7, 45 25 19 8
text "Status :", 8, 45 34 19 8
text "", 9, 68 7 109 8
text "", 10, 68 16 109 8
text "", 11, 68 25 109 8
text "", 12, 68 34 109 8
box "", 13, 42 41 70 28
text "Bytes Sent :", 14, 45 47 30 8
text "Last Sent :", 15, 45 56 30 8
box "", 16, 111 41 70 28
text "Bytes Rcvd:", 17, 114 47 30 8
text "Last Rcvd:", 18, 114 56 27 8
text "", 19, 76 47 33 8
text "", 20, 76 56 33 8
text "", 21, 145 47 33 8
text "", 22, 145 56 33 8
button "&Refresh", 23, 1 73 25 8
button "&Close", 24, 27 73 25 8
button "&Close All", 25, 53 73 25 8
button "&Exit", 26, 156 73 25 8, ok cancel
box "", 27, -3 79 200 4
box "", 28, -3 80 200 4
}
on *:DIALOG:sockstats:init:*: {
sockload
}
on *:DIALOG:sockstats:sclick:*: {
var %dsn = $did(4).seltext
did -r sockstats 9,10,11,12,19,20,21,22
if ($did == 4) {
if ($sock(%dsn) == $null) sockload
did -ra sockstats 9 %dsn
did -ra sockstats 10 $sock(%dsn).ip
did -ra sockstats 11 $sock(%dsn).port
did -ra sockstats 12 $sock(%dsn).status
did -ra sockstats 19 $sock(%dsn).sent byte(s)
did -ra sockstats 21 $sock(%dsn).rcvd byte(s)
did -ra sockstats 20 $sock(%dsn).ls sec(s)
did -ra sockstats 22 $sock(%dsn).lr sec(s)
}
if ($did == 23) {
sockload
}
if ($did == 24) {
if ($sock(%dsn)) sockclose $sock(%dsn)
sockload
}
if ($did == 25) {
.timer 1 0 closealls
}
}
alias closealls {
if (($sock(*,0)) && ($?!="This will close all active mIRC sockets. $+ $crlf $+ Are you sure?")) {
sockclose *
dialog -k sockstats
echo -a 4» All mIRC sockets are closed
}
}
alias sockload {
did -r sockstats 4
if ($sock(*,0)) { var %sckstats.tmp = 1
while ($sock(*,%sckstats.tmp)) {
did -a sockstats 4 $sock(*,%sckstats.tmp)
inc %sckstats.tmp
}
}
}
if ($dialog(sockstats) == $null) {
dialog -m sockstats sockstats
}
}
else echo -a 12¯ There is currently no Active mIRC sockets
}
dialog sockstats {
title "(D)Socket Status"
size -1 -1 182 84
option dbu
box "", 1, -5 -3 200 4
box "", 2, -3 -2 200 4
box "", 3, -3 68 200 4
list 4, 0 3 41 67, sort size
box "", 100, 42 1 139 44
text "Name :", 5, 45 7 19 8
text "IP :", 6, 45 16 19 8
text "Port :", 7, 45 25 19 8
text "Status :", 8, 45 34 19 8
text "", 9, 68 7 109 8
text "", 10, 68 16 109 8
text "", 11, 68 25 109 8
text "", 12, 68 34 109 8
box "", 13, 42 41 70 28
text "Bytes Sent :", 14, 45 47 30 8
text "Last Sent :", 15, 45 56 30 8
box "", 16, 111 41 70 28
text "Bytes Rcvd:", 17, 114 47 30 8
text "Last Rcvd:", 18, 114 56 27 8
text "", 19, 76 47 33 8
text "", 20, 76 56 33 8
text "", 21, 145 47 33 8
text "", 22, 145 56 33 8
button "&Refresh", 23, 1 73 25 8
button "&Close", 24, 27 73 25 8
button "&Close All", 25, 53 73 25 8
button "&Exit", 26, 156 73 25 8, ok cancel
box "", 27, -3 79 200 4
box "", 28, -3 80 200 4
}
on *:DIALOG:sockstats:init:*: {
sockload
}
on *:DIALOG:sockstats:sclick:*: {
var %dsn = $did(4).seltext
did -r sockstats 9,10,11,12,19,20,21,22
if ($did == 4) {
if ($sock(%dsn) == $null) sockload
did -ra sockstats 9 %dsn
did -ra sockstats 10 $sock(%dsn).ip
did -ra sockstats 11 $sock(%dsn).port
did -ra sockstats 12 $sock(%dsn).status
did -ra sockstats 19 $sock(%dsn).sent byte(s)
did -ra sockstats 21 $sock(%dsn).rcvd byte(s)
did -ra sockstats 20 $sock(%dsn).ls sec(s)
did -ra sockstats 22 $sock(%dsn).lr sec(s)
}
if ($did == 23) {
sockload
}
if ($did == 24) {
if ($sock(%dsn)) sockclose $sock(%dsn)
sockload
}
if ($did == 25) {
.timer 1 0 closealls
}
}
alias closealls {
if (($sock(*,0)) && ($?!="This will close all active mIRC sockets. $+ $crlf $+ Are you sure?")) {
sockclose *
dialog -k sockstats
echo -a 4» All mIRC sockets are closed
}
}
alias sockload {
did -r sockstats 4
if ($sock(*,0)) { var %sckstats.tmp = 1
while ($sock(*,%sckstats.tmp)) {
did -a sockstats 4 $sock(*,%sckstats.tmp)
inc %sckstats.tmp
}
}
}
Any feedback would be great thankyou, any questions,suggestions,bugs,comments will be greatly appreciated
thankyou and enjoy

