mIRC Socket Central

By Dark-Master on May 04, 2008

mIRC Socket Central by Dark-Master
This addon can be helpful with mIRC sockets
Type /sockctrl to start this addon
Enjoy :)

############################### 
# Sock Central By Dark-Master # 
# Type /sockctrl To Start     # 
# Enjoy :))))))))))           # 
############################### 

alias sockctrl { dialog -m sstats sstats } 
dialog sstats { 
  title "mIRC Socket Central [ /sockctrl ]" 
  size -1 -1 156 174 
  option dbu 
  box "Active Sockets", 2, 4 4 59 81 
  list 1, 8 13 50 67, size 
  box "Socket Info", 17, 62 4 91 81, hsbar 
  button "Sock Close", 41, 50 94 37 12 
  button "Close All", 42, 50 109 37 12 
  button "Sock Open", 6, 9 94 37 12 
  button "Sock Write", 7, 9 109 37 12 
  button "Sock Listen", 8, 9 154 37 12 
  button "Sock Rename", 9, 9 139 37 12 
  button "Sock Accept", 10, 9 124 37 12 
  box "Socket Options", 11, 4 85 89 86 
  button "Close Dialog", 12, 94 159 59 12, ok 
  text "mIRC Socket Central", 13, 95 88 58 8, center 
  text "Powered By", 14, 95 98 58 8, center 
  text "Dark-Master", 15, 95 108 58 8, center 
  text "#samo-vip @ Krstarica", 16, 95 118 58 8, center 
  text "", 3, 66 12 84 68 
  button "Help", 18, 95 144 58 12 
  button "Sock Mark", 19, 50 124 37 12 
  button "Sock Pause", 20, 50 139 37 12 
} 
alias -l _slrefresh if (!$dialog(sstats)) { .timersstats off | return } | if ($did(sstats,1).seltext) var %c = $ifmatch | did -r sstats 1 | if ($sock(*,0)) { var %s = 1 | while ($sock(*,%s)) { did -a sstats 1 $sock(*,%s) | inc %s } } | did -z sstats 1 | if ($didwm(sstats,1,%c)) { did -c sstats 1 $ifmatch | _srefresh %c } | else did -r sstats 3 | if ($sock(*,0) == 0) { } 
alias -l _srefresh did -ra sstats 3 IP: $sock($1).ip $lf $+ Port: $sock($1).port $lf $+ Status: $sock($1).status $lf $+ Type: $upper($sock($1).type) $lf $+ Mark: $left($sock($1).mark,25) $lf $lf $+ Bytes Sent: $sock($1).sent bytes $lf $+ LastSent: $sock($1).ls secs $lf $+ Bytes Rcvd: $sock($1).rcvd bytes $lf $+ LastRcvd: $sock($1).lr secs 
on 1:dialog:sstats:*:* { 
  if ($devent == init) { _slrefresh | .timersstats 0 1 _slrefresh } 
  if ($devent == sclick) { 
    var %s = $did(1).seltext 
    if ($did == 1) { if (!$sock(%s)) _slrefresh | _srefresh %s } 
    if ($did == 41) { if ($sock(%s)) sockclose $sock(%s) | _slrefresh } 
    if ($did == 42) { if (($sock(*,0)) && ($input(This will close all active mIRC sockets. $+ $crlf $+ Are you sure?,8))) sockclose * } 
    if ($did == 6) { /sockopen $$?="Enter Sockets Name & Address & Port: (abc www.abc.com 80)" }  
    if ($did == 7) { //sockwrite $$?="Enter Sockets Name & Text: (abc hello)" } 
    if ($did == 8) { //socklisten -d $$?="Enter Bindip & Name & Port: (127.0.0.1 abc 80)" } 
    if ($did == 9) { //sockrename $$?="Enter Old Name & New Name: (abc lol)" } 
    if ($did == 10) { //sockaccept $$?="Enter Name: (abc)" } 
    if ($did == 18) {  /dialog -m sockhelp sockhelp | /dialog -x sstats sstats } 
    if ($did == 20) {  /sockpause $$?="[-r] Name (name , -r name) -r Restarts Socket)" } 
    if ($did == 19)  { /sockmark $$?="Enter Name & Text (abc text)" } 
  } 
} 

dialog sockhelp { 
  title "mIRC Socket Central Help" 
  size -1 -1 244 171 
  option dbu 
  text " Sock Open : The /sockopen command initiates a connection to the specified address and port.       You can specify either an ip address or named address (which will be resolved to an ip address).", 1, 4 5 234 16 
  text " Sock Write : The /sockwrite command queues info to be sent on the specified connection. mIRC    will then try to send that info as quickly as it can. Once it has finished sending the info, it triggers  the on sockwrite event so you can send more  info if you need to.", 2, 4 23 234 22 
  text " Sock Accept : The /sockaccept command accepts the current connection to your listening port        and assigns it a name to identify it.", 3, 4 47 235 16 
  text " Sock Rename : The /sockrename command assigns a new name to an existing connection.", 4, 4 65 234 8 
  text " Sock Listen : The /socklisten command listens on the specified  port for connections to that port. If a port isn't specified, the  port is selected randomly from the range specified in the DCC  Options dcc ports section.", 5, 4 75 235 22 
  text " Sock Close : The /sockclose command closes the connection with the specified name. If you specify a wildcard name, all connections that match the wildcard are closed.", 6, 4 99 235 16 
  text " Sock Pause : The /sockpause command pauses/restarts a socket when reading incoming data.", 7, 4 117 235 9 
  text " Sock Mark : The /sockmark command fills the .mark attribute of a socket with the specified info for later reference via the $sock().mark property. If you do not specify any text, the mark is cleared. The mark can hold up to 512 bytes.", 8, 4 128 235 24 
  button "Go Back", 9, 4 156 235 12 
} 
on 1:dialog:sockhelp:sclick:* { 
  if ($did == 9) { //dialog -m sstats sstats | //dialog -x sockhelp sockhelp } 
} 

on *:LOAD: { 
  echo -a $chr(91) $+ 12 $+ $chr(248) $+  $+ $chr(93) $+ You have loaded Socket Central 
  echo -a $chr(91) $+ 12 $+ $chr(248) $+  $+ $chr(93) $+ Author : Dark-Master 
  echo -a $chr(91) $+ 12 $+ $chr(248) $+  $+ $chr(93) $+ Enjoy :)))))))) 
} 
on *:UNLOAD: { 
  echo -a $chr(91) $+ 12 $+ $chr(248) $+  $+ $chr(93) $+ You have unloaded Socket Central 
  echo -a $chr(91) $+ 12 $+ $chr(248) $+  $+ $chr(93) $+ Thanks For Using 
  echo -a $chr(91) $+ 12 $+ $chr(248) $+  $+ $chr(93) $+ Goodbye :))) 
} 

################################ 
# Copyright @ 2008 Dark-Master # 
################################ 

Comments

Sign in to comment.
Sorasyn   -  Apr 24, 2010

awesome!

 Respond  
X   -  Aug 01, 2008

THANK YOU THIS IS AWESOME:D

 Respond  
MeduSce   -  May 24, 2008

DarkMaster ... this dialog have a BUG .. Look:

  • /hload: no such table \'Channel\' (line 47, script.ini)
  • /sockopen: insufficient parameters (line 42, script1.ini)
  • Lol ...

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.