Advertisement
wollux

mIRC Stats

Sep 20th, 2011
470
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 146.17 KB | None | 0 0
  1. ;==========================================
  2. ; mIRC Stats v4.61 (13/06/2004)
  3. ; by Voice_of_Power
  4. ;==========================================
  5. ; Comments:
  6. ; Read the readme file to prevent problems.
  7. ; The pop-ups are all the way at the bottom (for if you want to place em somewhere else...)
  8. ; I've put everything under a header (in between #'s) to ease up reviewing the code a bit..
  9. ;==========================================
  10.  
  11.  
  12. ;############# loading/unloading... you know the deal :) ##############
  13.  
  14. on *:LOAD:{
  15.   if ($version < 6.03) { echo -a 10(4!10) You need atleast mIRC v6.03 or higher for this addon. www.mirc.com | .unload -rs $script }
  16.   else {
  17.     echo -a 10(9!10) Creating hash table...
  18.     if (!$isfile($scriptdirstats.src)) { resetstats all }
  19.     ha ctcp 1 | ha checklag 1 | ha grids 0 | ha autoupdate 1 | ha saveevery 0 | ha saveeverynum 30 | ha desktop 0 | ha ontop 0 | ha menu.menubar 1 | ha menu.channel 1 | ha menu.query 1 | ha menu.commands 1
  20.     ha echo public | ha color 1 | ha colorctcp on | ha echo.parentext1 10[7<text>10] | ha echo.parentext2 6[ <text> 6] | ha echo.custom 10[7Custom Line10] blaat
  21.     ha disp.color $color($color(back)) $color($color(normal text)) $color($color(action text)) | ha disp.servers new | ha positionc default | ha pos.apply stats config been have seen
  22.     ha init server events cpu cache os hdd gfx con misc
  23.     echo -a 10(9!10) mIRC Stats $msver loaded - by Voice_of_Power (no further advertising :))
  24.     echo -a 10(9!10) To view your stats type /stats or open the dialog from the menu-bar/channel/query pop-ups.
  25.     echo -a 10(9!10) Type /stats config for the configuration dialog - /statsweb to start the webpage.
  26.     echo -a 10(9!10) Read the help file to find out all about mIRC Stats.
  27.   }
  28. }
  29. on *:UNLOAD:{
  30.   if ($script($hg(webcurscript))) { unload -rs $nopath($hg(webcurscript)) }
  31.   if ($dialog(stats2)) { dialog -x stats2 stats2 }
  32.   if ($dialog(statsconf)) { dialog -x statsconf statsconf }
  33.   if ($dialog(been)) { dialog -x been been }
  34.   if ($dialog(have)) { dialog -x have have }
  35.   if ($dialog(seen)) { dialog -x seen seen }
  36.   if ($timer(totalonline)) { .timertotalonline off }
  37.   if ($timer(savestats)) { .timersavestats off }
  38.   var %a = $input(Do you want to remove the settings file?,yq,Unloading...)
  39.   if (%a) { .remove $shortfn($scriptdir) $+ stats.src | echo -a 10(9!10) Settings file removed. }
  40.   else { hsave -o stats $shortfn($scriptdir) $+ stats.src }
  41.   hfree stats
  42.   echo -a 10(9!10) Succesfully unloaded mIRC Stats $msver $+ .
  43. }
  44.  
  45.  
  46. ;##################### aliases ####################
  47.  
  48. alias mstats {
  49.   if ($1) {
  50.     if ($1 == config) { sdia statsconf }
  51.     elseif ($1 == been) { sdia been }
  52.     elseif ($1 == have) { sdia have }
  53.     elseif ($1 == seen) { sdia seen }
  54.     elseif ($1 == icons) { sdia stats.icons }
  55.     elseif ($1 == color) { sdia stats.color }
  56.     elseif ($1 == help) { run $shortfn($scriptdir) $+ readme.html }
  57.     else { echo -a 10(9!10) Specify one of these parameters: config $chr(124) been $chr(124) have $chr(124) seen $chr(124) icons $chr(124) color $chr(124) help $chr(124) or nothing to get the main dialog }
  58.   }
  59.   else { sdia stats2 }
  60. }
  61.  
  62. alias statsweb {
  63.   statswebend
  64.   if ($isfile($hg(webcurscript))) { .load -rs $shortfn($nofile($hg(webcurscript))) $+ $nopath($hg(webcurscript)) }
  65.   else { echo -a 10(4!10) No webpage specified, or file doesn't exist, please try another webpage file. | return }
  66.   if ($1) {
  67.     if ($1 isnum 1-65535) {
  68.       if ($portfree($1)) { $iif($show,echo -a 10(9!10) Webpage online at http:// $+ $ip $+ : $+ $1) | socklisten stats $1 | ha webonline http:// $+ $ip $+ : $+ $1 }
  69.       else { echo -a 10(4!10) Port $1 is already in use, please try another one. }
  70.     }
  71.     else { echo -a 10(4!10) Port $1 is invalid, it must be in the range of 1 and 65535. }
  72.   }
  73.   else {
  74.     if ($portfree(80)) { $iif($show,echo -a 10(9!10) Webpage online at http:// $+ $ip $+ :80) | socklisten stats 80 | ha webonline http:// $+ $ip $+ :80 }
  75.     else { echo -a 10(4!10) Port 80 is already in use, please try another one. }
  76.   }
  77. }
  78. alias statswebend { if ($sock(stats)) { $iif($show,echo -a 10(9!10) Webpage offline.) } | sockclose stats | hdel stats webonline }
  79.  
  80. alias secho {
  81.   if (!$1) { echo -a 10(9!10) Specify one of these parameters: servers $chr(124) power $chr(124) time $chr(124) uptime $chr(124) events $chr(124) texts $chr(124) own $chr(124) been $chr(124) have $chr(124) seen $chr(124) cpu $chr(124) os $chr(124) cache $chr(124) hdd $chr(124) gfx $chr(124) con $chr(124) eth $chr(124) misc $chr(124) custom | halt }
  82.   if ($1 ischan) || ($query($1)) { var %a = $1,%b = $2 }
  83.   else { var %a = $active,%b = $1 }
  84.   var %e = $stats.echo(%b)
  85.  
  86.   if (%e) {
  87.     var %i = 1
  88.     while ($gettok(%e,%i,9)) {
  89.       if ($hg(echo) == personal) || (!$server) { echo -a $gettok(%e,%i,9) }
  90.       else { msg %a $gettok(%e,%i,9) }
  91.       inc %i
  92.     }
  93.     hi echo.total 1
  94.     if ($dialog(stats2)) && ($hg(autoupdate)) { stats.update e 5 echo }
  95.   }
  96.   else { echo -a 10(9!10) Specify one of these parameters: servers $chr(124) power $chr(124) time $chr(124) uptime $chr(124) events $chr(124) texts $chr(124) own $chr(124) been $chr(124) have $chr(124) seen $chr(124) cpu $chr(124) os $chr(124) cache $chr(124) hdd $chr(124) gfx $chr(124) con $chr(124) eth $chr(124) misc $chr(124) custom }
  97. }
  98.  
  99.  
  100. alias resetstats {
  101.   if (!$hget(stats)) { hmake stats 20 }
  102.   if ($1 == all) {
  103.     if ($event != load) { var %c = $input(Are you sure you wish to reset all of your statistics?,qy,mIRC Stats) }
  104.     else { var %c = 1 }
  105.     if (%c) {
  106.       ha firstdate $mdate | ha firsttime $ctime | ha viewed 0 | ha echo.total 0 | ha ctcps 0 | ha started 0 | ha totalonline 0 | ha pagehits 0 | ha dccsend 0 | ha dccget 0 | ha dccsendsize 0 | ha dccgetsize 0 | ha chars 0 | ha words 0 | ha lines 0 | ha puncs 0 | ha smilies 0 | ha echo public | ha color 1
  107.       ha been.date $mdate | ha been.time $ctime | ha been.oped 0 | ha been.deoped 0 | ha been.halfoped 0 | ha been.dehalfoped 0 | ha been.voiced 0 | ha been.devoiced 0 | ha been.kicked 0 | ha been.banned 0
  108.       ha have.date $mdate | ha have.time $ctime | ha have.oped 0 | ha have.deoped 0 | ha have.halfoped 0 | ha have.dehalfoped 0 | ha have.voiced 0 | ha have.devoiced 0 | ha have.kicked 0 | ha have.banned 0 | ha have.nick 0 | ha have.topic 0 | ha have.joined 0 | ha have.parted 0 | ha have.query 0 | ha have.connected 0 | ha have.quit 0 | ha have.connected 0
  109.       ha seen.date $mdate | ha seen.time $ctime | ha seen.oped 0 | ha seen.deoped 0 | ha seen.halfoped 0 | ha seen.dehalfoped 0 | ha seen.voiced 0 | ha seen.devoiced 0 | ha seen.kicked 0 | ha seen.banned 0 | ha seen.nick 0 | ha seen.topic 0 | ha seen.joined 0 | ha seen.parted 0 | ha seen.quit 0
  110.     }
  111.   }
  112.   if ($1 == events) {
  113.     var %c = $input(Are you sure you wish to reset your events statistics?,qy,mIRC Stats)
  114.     if (%c) { ha started 0 | ha totalonline 0 | ha dccsend 0 | ha dccget 0 | ha dccsendsize 0 | ha dccgetsize 0 | ha chars 0 | ha words 0 | ha lines 0 | ha puncs 0 | ha smilies 0 | ha echo public | ha color 1 }
  115.   }
  116.   if ($1 == been) {
  117.     var %c = $input(Are you sure you wish to reset your been statistics?,qy,mIRC Stats)
  118.     if (%c) { ha been.date $mdate | ha been.time $ctime | ha been.oped 0 | ha been.deoped 0 | ha been.halfoped 0 | ha been.dehalfoped 0 | ha been.voiced 0 | ha been.devoiced 0 | ha been.kicked 0 | ha been.banned 0 }
  119.   }
  120.   if ($1 == have) {
  121.     var %c = $input(Are you sure you wish to reset your have statistics?,qy,mIRC Stats)
  122.     if (%c) { ha have.date $mdate | ha have.time $ctime | ha have.oped 0 | ha have.deoped 0 | ha have.halfoped 0 | ha have.dehalfoped 0 | ha have.voiced 0 | ha have.devoiced 0 | ha have.kicked 0 | ha have.banned 0 | ha have.nick 0 | ha have.topic 0 | ha have.joined 0 | ha have.parted 0 | ha have.query 0 | ha have.quit 0 | ha have.connected 0 }
  123.   }
  124.   if ($1 == seen) {
  125.     var %c = $input(Are you sure you wish to reset your seen statistics?,qy,mIRC Stats)
  126.     if (%c) { ha seen.date $mdate | ha seen.time $ctime | ha seen.oped 0 | ha seen.deoped 0 | ha seen.halfoped 0 | ha seen.dehalfoped 0 | ha seen.voiced 0 | ha seen.devoiced 0 | ha seen.kicked 0 | ha seen.banned 0 | ha seen.nick 0 | ha seen.topic 0 | ha seen.joined 0 | ha seen.parted 0 | ha seen.quit 0 }
  127.   }
  128. }
  129.  
  130. alias sinfo {
  131.   if (!$2) { return }
  132.   var %s
  133.   if ($1 == p) {
  134.     if ($2 == gender) { return $hg(websex) }
  135.     elseif ($2 == version) { return $msver }
  136.     return $hg(web $+ $2)
  137.   }
  138.   elseif ($1 == t) {
  139.     if ($2 == time) { return $time ( $+ $time(z) GMT) }
  140.     elseif ($2 == date) { return $day $mdate }
  141.     elseif ($2 == totalonline) { return $totalonline }
  142.     elseif ($2 == mirc) { return $uptime(mirc,1) }
  143.     elseif ($2 == system) { return $uptime(system,1) }
  144.   }
  145.   elseif ($1 == y) {
  146.     if ($2 == cpu) || ($2 == mhz) || ($2 == cache) {
  147.       if ($regex(cpu,$moo(cpuinfo),^(\d+)-(.+). (\d+MHz). (\d+KB) \((\d+)% Load\)$)) {
  148.         if ($2 == cpu) { return $iif($stats.cputm,$ifmatch,$regml(cpu,2)) }
  149.         elseif ($2 == mhz) { return $regml(cpu,3) }
  150.         elseif ($2 == cache) { return $regml(cpu,4) }
  151.       }
  152.     }
  153.     elseif ($2 == man) { return $procinfo(GetCpuVendor) }
  154.     elseif ($2 == load) { return $mid($procinfo(GetCpuUsage),1,2) $+ % }
  155.     elseif ($2 == ram) || ($2 == ramuse) {
  156.       if ($regex(ram,$moo(meminfo),^Usage: (\d+)/(\d+MB) \((\d+)\.\d+%\)$)) {
  157.         if ($2 == ram) { return $regml(ram,2) }
  158.         elseif ($2 == ramuse) { return $regml(ram,3) $+ % ( $+ $regml(ram,1) $+ MB) }
  159.       }
  160.     }
  161.     elseif (os* iswm $2) {
  162.       if ($regex(os,$moo(osinfo),^(.+) \(([\d\.]+) - ([\d\.]+)\)$)) {
  163.         if ($2 == os) { return $regml(os,1) }
  164.         elseif ($2 == osver) { return $regml(os,2) }
  165.         elseif ($2 == osbuild) { return $regml(os,3) }
  166.         elseif ($2 == osinst) { return $replace($duration($calc($ctime - $file($mbminfo(sysdir,0)).ctime)),days,d,day,d,hrs,h,hr,h,mins,m,min,m,secs,s,sec,s) }
  167.         elseif ($2 == osup) { return $uptime(system,1) }
  168.       }
  169.     }
  170.     elseif (cache* iswm $2) {
  171.       if ($2 == cachesize) { return $procinfo(CacheL1Info,DCACHESIZE) $+ KB }
  172.       if ($2 == cacheassoc) { return $procinfo(CacheL1Info,DCACHEASSOC) }
  173.       if ($2 == cachelines) { return $procinfo(CacheL1Info,DCACHELINES) }
  174.       if ($2 == cachelinesize) { return $procinfo(CacheL1Info,DCACHELSIZE) bytes }
  175.       if ($2 == cacheinstrsize) { return $procinfo(CacheL1Info,ICACHESIZE) $+ KB }
  176.       if ($2 == cacheinstrassoc) { return $procinfo(CacheL1Info,ICACHEASSOC) }
  177.       if ($2 == cacheinstrlines) { return $procinfo(CacheL1Info,ICACHELINES) }
  178.       if ($2 == cacheinstrlinesize) { return $procinfo(CacheL1Info,ICACHELSIZE) bytes }
  179.     }
  180.     elseif (gfx* iswm $2) {
  181.       if ($2 == gfx) { return $moo(gfxinfo) }
  182.       elseif ($2 == gfxres) { return $gettok($moo(screeninfo),1,32) }
  183.       elseif ($2 == gfxref) { return $gettok($moo(screeninfo),3,32) }
  184.       elseif ($2 == gfxdepth) { return $gettok($moo(screeninfo),2,32) }
  185.     }
  186.     elseif (con* iswm $2) {
  187.       if ($regex(con,$moo(connection),^(.+) @ (.+) for (.+) \((.+MB) up. (.+MB) down\)$)) {
  188.         if ($2 == con) { return $regml(con,1) }
  189.         elseif ($2 == conspeed) { return $regml(con,2) }
  190.         elseif ($2 == condown) { return $regml(con,3) }
  191.         elseif ($2 == conup) { return $regml(con,4) }
  192.         elseif ($2 == conactive) { return $regml(con,5) }
  193.       }
  194.     }
  195.     elseif (eth* iswm $2) {
  196.       var %2 = $2
  197.       tokenize 32 $moo(interfaceinfo)
  198.       if ($chr(35) isin $1-) { var %c = $1 $+ $2-,%i = 1,%x = 1 | while (%i <= $numtok(%c,32)) { var %n = $+($chr(35),%x,$chr(40),*) | if (%n iswm $gettok(%c,%i,32)) { var %s. $+ %x %i | inc %x } | inc %i } }
  199.       while ($var(%s.*,0)) {
  200.         var %t = $gettok(%c,$+($eval($var(%s.*,1),2),-,$iif($calc($eval($var(%s.*,2),2) -1) > 0,$ifmatch)),32)
  201.         if (%2 == eth) { return $+($deltok($mid(%t,4,-1),-1,40)) }
  202.         elseif (%2 == ethspeed) { return $mid($gettok(%t,-5,32),2,-1) }
  203.         elseif (%2 == ethget) { return $gettok(%t,-4,32) }
  204.         elseif (%2 == ethsent) { return $gettok(%t,-2,32) }
  205.         unset $var(%s.*,1)
  206.       }
  207.     }
  208.     elseif ($2 == ip) { return $ip }
  209.     elseif ($2 == upstream) { return $bytes($gettok($bdll(band,_),2,32),3).suf }
  210.     elseif ($2 == downstream) { return $bytes($gettok($bdll(band,_),3,32),3).suf }
  211.   }
  212.   elseif ($1 == m) { return $procinfo(is $+ $2) }
  213.  
  214.   elseif ($1 == e) {
  215.     if ($2 == total) { %s = $sinfo.total(e) }
  216.     elseif ($2 == cwords) {
  217.       if ($3 == 0) { %s = $hfind(stats,custom.*,0,w) }
  218.       elseif ($3 isnum) { %s = $hfind(stats,custom.*,$3,w) }
  219.     }
  220.     elseif ($2 == date) { %s = $hg(firstdate) }
  221.     elseif ($2 == time) { %s = $hg(firsttime) }
  222.     elseif ($2 == echo) { %s = $hg(echo.total) }
  223.     else { %s = $hg($2) }
  224.   }
  225.   elseif ($1 == b) {
  226.     if ($2 == total) { %s = $sinfo.total(b) }
  227.     else { %s = $hg(been. $+ $2) }
  228.   }
  229.   elseif ($1 == h) {
  230.     if ($2 == total) { %s = $sinfo.total(h) }
  231.     else { %s = $hg(have. $+ $2) }
  232.   }
  233.   elseif ($1 == s) {
  234.     if ($2 == total) { %s = $sinfo.total(s) }
  235.     else { %s = $hg(seen. $+ $2) }
  236.   }
  237.  
  238.   if (%s) || (%s == 0) {
  239.     if ($prop) {
  240.       var %t = $calc($ctime - $iif($1 == e,$hg(firsttime),$hg($sinfo.bhs($1)))),%t2,%prop,%p
  241.  
  242.       if ($left($prop,1) == p) { %prop = $right($prop,-1) | %p = p }
  243.       else { %prop = $prop }
  244.       if (%prop == mil) { %t2 = $iif(%t < 31536000000,%t,31536000000) }
  245.       if (%prop == cen) { %t2 = $iif(%t < 3153600000,%t,3153600000) }
  246.       if (%prop == dec) { %t2 = $iif(%t < 315360000,%t,315360000) }
  247.       if (%prop == year) { %t2 = $iif(%t < 31536000,%t,31536000) }
  248.       if (%prop == month) { %t2 = $iif(%t < 2592000,%t,2592000) }
  249.       if (%prop == week) { %t2 = $iif(%t < 604800,%t,604800) }
  250.       if (%prop == day) { %t2 = $iif(%t < 86400,%t,86400) }
  251.       if (%prop == hour) { %t2 = $iif(%t < 3600,%t,3600) }
  252.       if (%prop == min) { %t2 = $iif(%t < 60,%t,60) }
  253.       if (%prop == sec) { %t2 = 1 }
  254.  
  255.       var %n = $calc((%t2 * %s) / %t)
  256.       if (%p) {
  257.         if (%prop) { return $iif($round($calc((%n * 100) / %s),$iif($3 isnum,$3,1)),$ifmatch,0) $+ % }
  258.         return $iif($round($calc((%s * 100) / $sinfo.total($1)),$iif($3 isnum,$3,1)),$ifmatch,0) $+ %
  259.       }
  260.       return $round(%n,$iif($3 isnum,$3,1))
  261.     }
  262.     return %s
  263.   }
  264.   return
  265. }
  266.  
  267. alias sw { sockwrite -n $sockname $1- }
  268.  
  269. ;################### local aliases #####################
  270.  
  271. alias -l ha { hadd -m stats $1- }
  272. alias -l hg { return $hget(stats,$1) }
  273. alias -l hi { hinc -m stats $1- }
  274. alias -l hd { hdec -m stats $1- }
  275. alias -l sdia {
  276.   var %d = -m
  277.   if ($hg(desktop)) { var %d %d $+ d }
  278.   if ($hg(ontop)) { var %d %d $+ o }
  279.   if (!$dialog($1)) { dialog %d $1 $1 }
  280.   else { dialog -v $1 $1 }
  281. }
  282.  
  283. alias -l msver { return 4.61 }
  284.  
  285. alias -l moo { return $dll($shortfn($scriptdirdll\) $+ moo.dll,$1-,_) }
  286. alias -l procinfo { return $dll($shortfn($scriptdirdll\) $+ ProcInfo.dll,$1,$iif($2,$2,.)) }
  287. alias -l mbminfo { return $dll($shortfn($scriptdirdll\) $+ mbminfo.dll,$$1,$$2) }
  288. alias -l colordll { return $dll($shortfn($scriptdirdll\) $+ color.dll,Color,$$1) }
  289. alias -l bdll { return $dll($shortfn($scriptdirdll\) $+ band.dll,$1,$2-) }
  290. alias -l smdx { return $dll($shortfn($scriptdirdll\) $+ mdx.dll,$1,$2-) }
  291. alias -l mdx { return $dll($shortfn($scriptdirdll\) $+ mdx.dll,$1,$2-) }
  292. alias -l sviews { return $shortfn($scriptdirdll\) $+ views.mdx }
  293. alias -l sdialog { return $shortfn($scriptdirdll\) $+ dialog.mdx }
  294. alias -l sctl { return $shortfn($scriptdirdll\) $+ ctl_gen.mdx }
  295. alias -l sbars { return $shortfn($scriptdirdll\) $+ bars.mdx }
  296.  
  297. alias -l mdate {
  298.   if ($hg(usdate)) { return $adate }
  299.   return $date
  300. }
  301. alias -l icons { if (!$dialog(stats.icon)) { dialog -m stats.icon stats.icon } | set %icontype $1 }
  302. alias -l totalonline { return $duration($hg(totalonline)) }
  303. alias -l suptime { return $uptime(server,1) }
  304. alias -l position {
  305.   if ($1 isin $hg(pos.apply)) {
  306.     if ($hg(positionc) == default) { return -1 -1 }
  307.     elseif ($hg(positionc) == derive) { return $iif($hg(pos. $+ $1),$ifmatch,-1 -1) }
  308.     else { return $iif($hg(position),$ifmatch,-1 -1) }
  309.   }
  310.   return -1 -1
  311. }
  312.  
  313. alias -l sinfo.total {
  314.   if ($1 == e) {
  315.     if ($hfind(stats,custom.*,0,w)) {
  316.       var %c = 1,%h
  317.       while (%c <= $hfind(stats,custom.*,0,w)) {
  318.         inc %h $hg($hfind(stats,custom.*,%c,w))
  319.         inc %c
  320.       }
  321.     }
  322.     return $calc($hg(started) + $hg(viewed) + $hg(echo.total) + $hg(ctcps) + $hg(pagehits) + $hg(dccsend) + $hg(dccget) + $hg(lines) + $hg(words) + $hg(chars) + $hg(puncs) + $hg(smilies) + %h)
  323.   }
  324.   elseif ($1 == b) { return $calc($hg(been.oped) + $hg(been.deoped) + $hg(been.halfoped) + $hg(been.dehalfoped) + $hg(been.voiced) + $hg(been.devoiced) + $hg(been.kicked) + $hg(been.banned)) }
  325.   elseif ($1 == h) { return $calc($hg(have.oped) + $hg(have.deoped) + $hg(have.halfoped) + $hg(have.dehalfoped) + $hg(have.voiced) + $hg(have.devoiced) + $hg(have.kicked) + $hg(have.banned) + $hg(have.nick) + $hg(have.topic) + $hg(have.quit) + $hg(have.joined) + $hg(have.parted) + $hg(have.query) + $hg(have.connected)) }
  326.   elseif ($1 == s) { return $calc($hg(seen.oped) + $hg(seen.deoped) + $hg(seen.halfoped) + $hg(seen.dehalfoped) + $hg(seen.voiced) + $hg(seen.devoiced) + $hg(seen.kicked) + $hg(seen.banned) + $hg(seen.nick) + $hg(seen.topic) + $hg(seen.quit) + $hg(seen.joined) + $hg(seen.parted)) }
  327. }
  328. alias -l sinfo.bhs {
  329.   if (b isin $1) { return been.time }
  330.   if (h isin $1) { return have.time }
  331.   if (s isin $1) { return seen.time }
  332. }
  333.  
  334. alias -l stats.update {
  335.   if ($1 == e) { var %d = stats2,%c = 52 }
  336.   elseif ($1 == b) { var %d = been,%c = 2 }
  337.   elseif ($1 == h) { var %d = have,%c = 2 }
  338.   elseif ($1 == s) { var %d = seen,%c = 2 }
  339.   else { return }
  340.  
  341.   if ($dialog(%d)) && ($hg(autoupdate)) {
  342.     did -o %d %c $2 0 0 0 0 $cell(%d,%c,$2,1)   0 0 0 $sinfo($1,$3)     0 0 0 $sinfo($1,$3).year    0 0 0 $sinfo($1,$3).month   0 0 0 $sinfo($1,$3).week    0 0 0 $sinfo($1,$3).day     0 0 0 $sinfo($1,$3).p
  343.   }
  344. }
  345.  
  346. alias -l stats.read {
  347.   var %f = $findfile($scriptdirwebpages\,* $+ $1,1)
  348.   if ($read($shortfn(%f),ns,$2)) { return $ifmatch }
  349. }
  350.  
  351. alias -l spage {
  352.   var %d, %i
  353.   if ($0 = 1) {
  354.     set %d $dname
  355.     set %i $1
  356.   }
  357.   else {
  358.     set %d $1
  359.     set %i $2
  360.   }
  361.   did -i %d %i 1 page $prop
  362.   return $gettok($did(%d, %i, 1), 3-, 32)
  363. }
  364.  
  365. ;#### $branch and $cell - by morphy ###
  366. alias -l sbranch {
  367.   var %d = $1
  368.   var %i = $2
  369.   if ($dialog(%d)) {
  370.     var %b = $gettok($did(%d,%i,1),4-,32)
  371.     var %n = $calc($numtok(%b,32) -1)
  372.     if (%n = 0) did -i %d %i 1 cb root
  373.     else { did -i %d %i 1 cb root $gettok(%b,1- $+ %n,32) }
  374.     did -i %d %i 1 cb root $gettok(%b,1- $+ %n,32)
  375.     return $gettok($gettok($did(%d,%i,$gettok(%b,-1,32)),7-,32),1,9)
  376.   }
  377. }
  378. alias -l cell { return $gettok($gettok($gettok($did($1,$2,$3),$4,9),$iif($4 = 1,6,5) $+ -,32),1,4) }
  379. ;##############
  380.  
  381. alias -l ptext1 {
  382.   if ($hg(echo.parentext1)) { return $replace($ifmatch,<text>,$1) }
  383.   else { return $1 }
  384. }
  385. alias -l ptext {
  386.   if ($hg(echo.parentext2)) { return $replace($ifmatch,<text>,$1) }
  387.   else { return $1 }
  388. }
  389.  
  390. alias -l icon {
  391.   if ($1 == serv) {
  392.     if ($isfile($gettok($hg(icon.serv),2,44))) { return $hg(icon.serv) }
  393.     return 0, $+ $shortfn($scriptdiricons\) $+ serv.ico
  394.   }
  395.   if ($1 == chan) {
  396.     if ($isfile($gettok($hg(icon.chan),2,44))) { return $hg(icon.chan) }
  397.     return 0, $+ $shortfn($scriptdiricons\) $+ chan.ico
  398.   }
  399.   if ($1 == query) {
  400.     if ($isfile($gettok($hg(icon.query),2,44))) { return $hg(icon.query) }
  401.     return 0, $+ $shortfn($scriptdiricons\) $+ query.ico
  402.   }
  403.   if ($1 == hd) {
  404.     if ($isfile($gettok($hg(icon.hd),2,44))) { return $hg(icon.hd) }
  405.     return 0, $+ $shortfn($scriptdiricons\) $+ hd.ico
  406.   }
  407.   if ($1 == cd) {
  408.     if ($isfile($gettok($hg(icon.cd),2,44))) { return $hg(icon.cd) }
  409.     return 0, $+ $shortfn($scriptdiricons\) $+ cd.ico
  410.   }
  411.   if ($1 == rm) {
  412.     if ($isfile($gettok($hg(icon.rm),2,44))) { return $hg(icon.rm) }
  413.     return 0, $+ $shortfn($scriptdiricons\) $+ rm.ico
  414.   }
  415. }
  416. alias -l stats.servers.chans {
  417.   var %c 1
  418.   while (%c <= $chan(0)) {
  419.     did -a stats2 12,162 2 2 $chan(%c)
  420.     inc %c
  421.   }
  422.   var %q 1
  423.   while (%q <= $query(0)) {
  424.     did -a stats2 12,162 3 3 $query(%q)
  425.     inc %q
  426.   }
  427.   did -i stats2 12,162 1 cb root
  428. }
  429.  
  430. alias -l stats.servers.new {
  431.   did -r stats2 22,24,26
  432.   if ($scon(0) == 1) && ($scon(1).status == disconnected) {
  433.     did -a stats2 22 0 0 0 0 -  -   -   -   -   -   -   -   -   -   -   -   -   -
  434.   }
  435.   else {
  436.     var %s = 1
  437.     while (%s <= $scon(0)) {
  438.       did -a stats2 22 0 1 0 0 $scon(%s).server     0 0 0 $iif($scon(%s).network,$ifmatch,-)    0 0 0 $iif($scon(%s).serverip,$ifmatch,-)   0 0 0 $iif($scon(%s).port,$ifmatch,-)   0 0 0 $iif($scon(%s).chantypes,$ifmatch,-)  0 0 0 $iif($scon(%s).chanmodes,$ifmatch,-)  0 0 0 $iif($scon(%s).prefix,$ifmatch,-)     0 0 0 $iif($scon(%s).modespl,$ifmatch,-)    0 0 0 $scon(%s).me  0 0 0 $iif($scon(%s).usermode != $chr(43),$left($scon(%s).usermode,1) $right($scon(%s).usermode,-1),-)  0 0 0 $scon(%s).suptime     0 0 0 $duration($scon(%s).idle)     0 0 0 $iif($hg(checklag),checking...,-)     0 0 0 $iif($scon(%s).away == $true,yes,no)
  439.       inc %s
  440.     }
  441.     if ($scon(1).status == connected) { stats.chans.new 1 }
  442.   }
  443. }
  444. alias -l stats.chans.new {
  445.   did -r stats2 24,26
  446.   scon $1
  447.   if ($scon($1).status == connected) {
  448.     var %c = 1
  449.     while (%c <= $chan(0)) {
  450.       did -a stats2 24 0 1 0 0 $chan(%c)    0 0 0 $nick($chan(%c),0,a)  0 0 0 $nick($chan(%c),0,o)  0 0 0 $nick($chan(%c),0,h)  0 0 0  $nick($chan(%c),0,v)     0 0 0 $nick($chan(%c),0,r)  0 0 0 $iif($chan(%c).topic,$strip($ifmatch),-)  0 0 0 $iif($chan($chan(%c)).mode,$left($chan($chan(%c)).mode,1) $right($chan($chan(%c)).mode,-1),-)     0 0 0 $iif($chan(%c).key,$ifmatch,-)    0 0 0 $iif($chan(%c).limit,$ifmatch,-)  0 0 0 $chan(%c).logfile     0 0 0 $chan(%c).wid     0 0 0 $chan(%c).cid
  451.       inc %c
  452.     }
  453.     var %q = 1
  454.     while (%q <= $query(0)) {
  455.       did -a stats2 26 0 1 0 0 $query(%q)   0 0 0 $query(%q).addr   0 0 0 $comchan($query(%q),0)    0 0 0 $query(%q).logfile    0 0 0 $query(%q).wid    0 0 0 $query(%q).cid
  456.       inc %q
  457.     }
  458.   }
  459. }
  460.  
  461. alias -l stats.serverinfo {
  462.   if ($scon($1).status == connected) {
  463.     if ($hg(checklag)) { checklag $1 }
  464.     did -a stats2 17 1 1 0 0 Server:    0 0 0 $scon($1).server
  465.     did -a stats2 17 1 1 0 0 Network:   0 0 0 $iif($scon($1).network,$ifmatch,-)
  466.     did -a stats2 17 1 1 0 0 IP address     0 0 0 $iif($scon($1).serverip,$ifmatch,-)
  467.     did -a stats2 17 1 1 0 0 Port:  0 0 0 $iif($scon($1).port,$ifmatch,-)
  468.     did -a stats2 17 1 1 0 0
  469.     did -a stats2 17 1 1 0 0 Chan types:    0 0 0 $iif($scon($1).chantypes,$ifmatch,-)
  470.     did -a stats2 17 1 1 0 0 Chan modes:    0 0 0 $iif($scon($1).chanmodes,$ifmatch,-)
  471.     did -a stats2 17 1 1 0 0 Mode prefix:   0 0 0 $iif($scon($1).prefix,$ifmatch,-)
  472.     did -a stats2 17 1 1 0 0 Mode params:   0 0 0 $iif($scon($1).modespl,$ifmatch,-)
  473.     did -a stats2 17 1 1 0 0
  474.     did -a stats2 17 1 1 0 0 Nickname:  0 0 0 $scon($1).me
  475.     did -a stats2 17 1 1 0 0 Usermodes:     0 0 0 $iif($scon($1).usermode != $chr(43),$left($scon($1).usermode,1) $right($scon($1).usermode,-1),-)
  476.     did -a stats2 17 1 1 0 0
  477.     did -a stats2 17 1 1 0 0 Connected:     0 0 0 $scon($1).suptime
  478.     did -a stats2 17 1 1 0 0 Idle time:     0 0 0 $duration($scon($1).idle)
  479.     did -a stats2 17 1 1 0 0 Lag:   0 0 0 $iif($hg(checklag),checking...,-)
  480.     did -a stats2 17 1 1 0 0
  481.     did -a stats2 17 1 1 0 0 Away:  0 0 0 $iif($scon($1).away == $true,yes,no)
  482.   }
  483.   else {
  484.     did -a stats2 17 1 1 0 0 Server:    + 0 0 0 -
  485.     did -a stats2 17 1 1 0 0 Network:   + 0 0 0 -
  486.     did -a stats2 17 1 1 0 0 IP address     + 0 0 0 -
  487.     did -a stats2 17 1 1 0 0 Port:  + 0 0 0 -
  488.     did -a stats2 17 1 1 0 0    + 0 0 0
  489.     did -a stats2 17 1 1 0 0 Chan types:    + 0 0 0 -
  490.     did -a stats2 17 1 1 0 0 Chan modes:    + 0 0 0 -
  491.     did -a stats2 17 1 1 0 0 Mode prefix:   + 0 0 0 -
  492.     did -a stats2 17 1 1 0 0 Mode params:   + 0 0 0 -
  493.     did -a stats2 17 1 1 0 0    + 0 0 0
  494.     did -a stats2 17 1 1 0 0 Nickname:  + 0 0 0 -
  495.     did -a stats2 17 1 1 0 0 Usermodes:     + 0 0 0 -
  496.     did -a stats2 17 1 1 0 0
  497.     did -a stats2 17 1 1 0 0 Connected:     + 0 0 0 -
  498.     did -a stats2 17 1 1 0 0 Idle time:     + 0 0 0 -
  499.     did -a stats2 17 1 1 0 0 Lag:   + 0 0 0 -
  500.     did -a stats2 17 1 1 0 0
  501.     did -a stats2 17 1 1 0 0 Away:  + 0 0 0 -
  502.   }
  503. }
  504.  
  505. alias -l checklag { scon $1 .ctcpreply $!me LAGSTATS $ticks }
  506. on *:CTCPREPLY:LAGSTATS*:{
  507.   haltdef
  508.   if ($nick != $me) { halt }
  509.   if ($dialog(stats2)) { did -o stats2 17 17 1 0 0 Lag:     + 0 0 0 $calc(($ticks - $2) / 1000) secs }
  510. }
  511.  
  512.  
  513. alias -l stats.channelinfo {
  514.   if ($scon($1).status == connected) {
  515.     did -a stats2 17 1 1 0 0 Channel:   + 0 0 0 $chan($2)
  516.     did -a stats2 17 1 1 0 0
  517.     did -a stats2 17 1 1 0 0 Total users:   + 0 0 0 $nick($chan($2),0,a)
  518.     did -a stats2 17 1 1 0 0 Ops:   + 0 0 0 $nick($chan($2),0,o) ( $+ $iif($int($calc($nick($chan($2),0,o) / $nick($chan($2),0,a) * 100)) == $null,0,$int($calc($nick($chan($2),0,o) / $nick($chan($2),0,a) * 100)))) $+ % $+ )
  519.     did -a stats2 17 1 1 0 0 Halfops:   + 0 0 0 $nick($chan($2),0,h) ( $+ $iif($int($calc($nick($chan($2),0,h) / $nick($chan($2),0,a) * 100)) == $null,0,$int($calc($nick($chan($2),0,h) / $nick($chan($2),0,a) * 100)))) $+ % $+ )
  520.     did -a stats2 17 1 1 0 0 Voiced:    + 0 0 0 $nick($chan($2),0,v) ( $+ $iif($int($calc($nick($chan($2),0,v) / $nick($chan($2),0,a) * 100)) == $null,0,$int($calc($nick($chan($2),0,v) / $nick($chan($2),0,a) * 100)))) $+ % $+ )
  521.     did -a stats2 17 1 1 0 0 Regulars:  + 0 0 0 $nick($chan($2),0,r) ( $+ $iif($int($calc($nick($chan($2),0,r) / $nick($chan($2),0,a) * 100)) == $null,0,$int($calc($nick($chan($2),0,r) / $nick($chan($2),0,a) * 100)))) $+ % $+ )
  522.     did -a stats2 17 1 1 0 0
  523.     did -a stats2 17 1 1 0 0 Topic:     + 0 0 0 $iif($chan($2).topic,$strip($ifmatch),-)
  524.     did -a stats2 17 1 1 0 0 Modes:     + 0 0 0 $iif($chan($chan($2)).mode,$left($chan($chan($2)).mode,1) $right($chan($chan($2)).mode,-1),-)
  525.     did -a stats2 17 1 1 0 0 Key:   + 0 0 0 $iif($chan($2).key,$ifmatch,-)
  526.     did -a stats2 17 1 1 0 0 Limit:     + 0 0 0 $iif($chan($2).limit,$ifmatch,-)
  527.     did -a stats2 17 1 1 0 0
  528.     did -a stats2 17 1 1 0 0 Logfile:   + 0 0 0 $chan($2).logfile
  529.     did -a stats2 17 1 1 0 0 Window ID:     + 0 0 0 $chan($2).wid
  530.     did -a stats2 17 1 1 0 0 Connect ID:    + 0 0 0 $chan($2).cid
  531.   }
  532.   else {
  533.     did -a stats2 17 1 1 0 0 Channel:   + 0 0 0 -
  534.     did -a stats2 17 1 1 0 0
  535.     did -a stats2 17 1 1 0 0 Total users:   + 0 0 0 -
  536.     did -a stats2 17 1 1 0 0 Ops:   + 0 0 0 -
  537.     did -a stats2 17 1 1 0 0 Halfops:   + 0 0 0 -
  538.     did -a stats2 17 1 1 0 0 Voiced:    + 0 0 0 -
  539.     did -a stats2 17 1 1 0 0 Regulars:  + 0 0 0 -
  540.     did -a stats2 17 1 1 0 0
  541.     did -a stats2 17 1 1 0 0 Topic:     + 0 0 0 -
  542.     did -a stats2 17 1 1 0 0 Modes:     + 0 0 0 -
  543.     did -a stats2 17 1 1 0 0 Key:   + 0 0 0 -
  544.     did -a stats2 17 1 1 0 0 Limit:     + 0 0 0 -
  545.     did -a stats2 17 1 1 0 0
  546.     did -a stats2 17 1 1 0 0 Logfile:   + 0 0 0 -
  547.     did -a stats2 17 1 1 0 0 Window ID:     + 0 0 0 -
  548.     did -a stats2 17 1 1 0 0 Connect ID:    + 0 0 0 -
  549.   }
  550. }
  551.  
  552.  
  553. alias -l stats.queryinfo {
  554.   if ($scon($1).status == connected) {
  555.     did -a stats2 16 1 1 0 0 Nickname:  + 0 0 0 $2
  556.     did -a stats2 16 1 1 0 0 Address:   + 0 0 0 $query($2).addr
  557.     did -a stats2 16 1 1 0 0    + 0 0 0
  558.     did -a stats2 16 1 1 0 0 Comchans:  + 0 0 0 $comchan($2,0)
  559.     var %c $comchan($2,0)
  560.     var %c2 1
  561.     while (%c2 <= %c) {
  562.       did -a stats2 16 1 1 0 0 $iif($2 !isreg $comchan($2,%c2),$left($nick($comchan($2,%c2),$2).pnick,1))   + 0 0 0 $comchan($2,%c2)
  563.       inc %c2
  564.     }
  565.     did -a stats2 16 1 1 0 0    + 0 0 0
  566.     did -a stats2 16 1 1 0 0 Logfile:   + 0 0 0 $query($2).logfile
  567.     did -a stats2 16 1 1 0 0 Window ID:     + 0 0 0 $query($2).wid
  568.     did -a stats2 16 1 1 0 0 Connect ID:    + 0 0 0 $query($2).cid
  569.   }
  570.   else {
  571.     did -a stats2 16 1 1 0 0 Nickname:  + 0 0 0 -
  572.     did -a stats2 16 1 1 0 0 Address:   + 0 0 0 -
  573.     did -a stats2 16 1 1 0 0    + 0 0 0
  574.     did -a stats2 16 1 1 0 0 Comchans:  + 0 0 0 -
  575.     did -a stats2 16 1 1 0 0    + 0 0 0
  576.     did -a stats2 16 1 1 0 0 Logfile:   + 0 0 0 -
  577.     did -a stats2 16 1 1 0 0 Window ID:     + 0 0 0 -
  578.     did -a stats2 16 1 1 0 0 Connect ID:    + 0 0 0 -
  579.   }
  580. }
  581.  
  582. alias -l stats.events {
  583.   if ($1 == -b) {
  584.     did -r been 2
  585.     did -a been 2 0 0 0 0 Oped  0 0 0 $sinfo(b,oped)    0 0 0 $sinfo(b,oped).year   0 0 0 $sinfo(b,oped).month  0 0 0 $sinfo(b,oped).week   0 0 0 $sinfo(b,oped).day    0 0 0 $sinfo(b,oped).p
  586.     did -a been 2 0 0 0 0 Deoped    0 0 0 $sinfo(b,deoped)  0 0 0 $sinfo(b,deoped).year     0 0 0 $sinfo(b,deoped).month    0 0 0 $sinfo(b,deoped).week     0 0 0 $sinfo(b,deoped).day  0 0 0 $sinfo(b,deoped).p
  587.     did -a been 2 0 0 0 0 Halfoped  0 0 0 $sinfo(b,halfoped)    0 0 0 $sinfo(b,halfoped).year   0 0 0 $sinfo(b,halfoped).month  0 0 0 $sinfo(b,halfoped).week   0 0 0 $sinfo(b,halfoped).day    0 0 0 $sinfo(b,halfoped).p
  588.     did -a been 2 0 0 0 0 Dehalfoped    0 0 0 $sinfo(b,dehalfoped)  0 0 0 $sinfo(b,dehalfoped).year     0 0 0 $sinfo(b,dehalfoped).month    0 0 0 $sinfo(b,dehalfoped).week     0 0 0 $sinfo(b,dehalfoped).day  0 0 0 $sinfo(b,dehalfoped).p
  589.     did -a been 2 0 0 0 0 Voiced    0 0 0 $sinfo(b,voiced)  0 0 0 $sinfo(b,voiced).year     0 0 0 $sinfo(b,voiced).month    0 0 0 $sinfo(b,voiced).week     0 0 0 $sinfo(b,voiced).day  0 0 0 $sinfo(b,voiced).p
  590.     did -a been 2 0 0 0 0 Devoiced  0 0 0 $sinfo(b,devoiced)    0 0 0 $sinfo(b,devoiced).year   0 0 0 $sinfo(b,devoiced).month  0 0 0 $sinfo(b,devoiced).week   0 0 0 $sinfo(b,devoiced).day    0 0 0 $sinfo(b,devoiced).p
  591.     did -a been 2 0 0 0 0 Kicked    0 0 0 $sinfo(b,kicked)  0 0 0 $sinfo(b,kicked).year     0 0 0 $sinfo(b,kicked).month    0 0 0 $sinfo(b,kicked).week     0 0 0 $sinfo(b,kicked).day  0 0 0 $sinfo(b,kicked).p
  592.     did -a been 2 0 0 0 0 Banned    0 0 0 $sinfo(b,banned)  0 0 0 $sinfo(b,banned).year     0 0 0 $sinfo(b,banned).month    0 0 0 $sinfo(b,banned).week     0 0 0 $sinfo(b,banned).day  0 0 0 $sinfo(b,banned).p
  593.     did -a been 2 0 0 0 0
  594.     did -a been 2 0 0 0 0 Total     0 0 0 $sinfo(b,total)   0 0 0 $sinfo(b,total).year  0 0 0 $sinfo(b,total).month     0 0 0 $sinfo(b,total).week  0 0 0 $sinfo(b,total).day   0 0 0 $sinfo(b,total).p
  595.     did -a been 1 Since: $hg(been.date)
  596.   }
  597.   elseif ($1 == -h) {
  598.     did -r have 2
  599.     did -a have 2 0 0 0 0 Oped  0 0 0 $sinfo(h,oped)    0 0 0 $sinfo(h,oped).year   0 0 0 $sinfo(h,oped).month  0 0 0 $sinfo(h,oped).week   0 0 0 $sinfo(h,oped).day    0 0 0 $sinfo(h,oped).p
  600.     did -a have 2 0 0 0 0 Deoped    0 0 0 $sinfo(h,deoped)  0 0 0 $sinfo(h,deoped).year     0 0 0 $sinfo(h,deoped).month    0 0 0 $sinfo(h,deoped).week     0 0 0 $sinfo(h,deoped).day  0 0 0 $sinfo(h,deoped).p
  601.     did -a have 2 0 0 0 0 Halfoped  0 0 0 $sinfo(h,halfoped)    0 0 0 $sinfo(h,halfoped).year   0 0 0 $sinfo(h,halfoped).month  0 0 0 $sinfo(h,halfoped).week   0 0 0 $sinfo(h,halfoped).day    0 0 0 $sinfo(h,halfoped).p
  602.     did -a have 2 0 0 0 0 Dehalfoped    0 0 0 $sinfo(h,dehalfoped)  0 0 0 $sinfo(h,dehalfoped).year     0 0 0 $sinfo(h,dehalfoped).month    0 0 0 $sinfo(h,dehalfoped).week     0 0 0 $sinfo(h,dehalfoped).day  0 0 0 $sinfo(h,dehalfoped).p
  603.     did -a have 2 0 0 0 0 Voiced    0 0 0 $sinfo(h,voiced)  0 0 0 $sinfo(h,voiced).year     0 0 0 $sinfo(h,voiced).month    0 0 0 $sinfo(h,voiced).week     0 0 0 $sinfo(h,voiced).day  0 0 0 $sinfo(h,voiced).p
  604.     did -a have 2 0 0 0 0 Devoiced  0 0 0 $sinfo(h,devoiced)    0 0 0 $sinfo(h,devoiced).year   0 0 0 $sinfo(h,devoiced).month  0 0 0 $sinfo(h,devoiced).week   0 0 0 $sinfo(h,devoiced).day    0 0 0 $sinfo(h,devoiced).p
  605.     did -a have 2 0 0 0 0 Kicked    0 0 0 $sinfo(h,kicked)  0 0 0 $sinfo(h,kicked).year     0 0 0 $sinfo(h,kicked).month    0 0 0 $sinfo(h,kicked).week     0 0 0 $sinfo(h,kicked).day  0 0 0 $sinfo(h,kicked).p
  606.     did -a have 2 0 0 0 0 Banned    0 0 0 $sinfo(h,banned)  0 0 0 $sinfo(h,banned).year     0 0 0 $sinfo(h,banned).month    0 0 0 $sinfo(h,banned).week     0 0 0 $sinfo(h,banned).day  0 0 0 $sinfo(h,banned).p
  607.     did -a have 2 0 0 0 0 Changed Nick  0 0 0 $sinfo(h,nick)    0 0 0 $sinfo(h,nick).year   0 0 0 $sinfo(h,nick).month  0 0 0 $sinfo(h,nick).week   0 0 0 $sinfo(h,nick).day    0 0 0 $sinfo(h,nick).p
  608.     did -a have 2 0 0 0 0 Set Topic     0 0 0 $sinfo(h,topic)   0 0 0 $sinfo(h,topic).year  0 0 0 $sinfo(h,topic).month     0 0 0 $sinfo(h,topic).week  0 0 0 $sinfo(h,topic).day   0 0 0 $sinfo(h,topic).p
  609.     did -a have 2 0 0 0 0 Quit Server   0 0 0 $sinfo(h,quit)    0 0 0 $sinfo(h,quit).year   0 0 0 $sinfo(h,quit).month  0 0 0 $sinfo(h,quit).week   0 0 0 $sinfo(h,quit).day    0 0 0 $sinfo(h,quit).p
  610.     did -a have 2 0 0 0 0 Joined Chan   0 0 0 $sinfo(h,joined)  0 0 0 $sinfo(h,joined).year     0 0 0 $sinfo(h,joined).month    0 0 0 $sinfo(h,joined).week     0 0 0 $sinfo(h,joined).day  0 0 0 $sinfo(h,joined).p
  611.     did -a have 2 0 0 0 0 Parted Chan   0 0 0 $sinfo(h,parted)  0 0 0 $sinfo(h,parted).year     0 0 0 $sinfo(h,parted).month    0 0 0 $sinfo(h,parted).week     0 0 0 $sinfo(h,parted).day  0 0 0 $sinfo(h,parted).p
  612.     did -a have 2 0 0 0 0 Queries   0 0 0 $sinfo(h,query)   0 0 0 $sinfo(h,query).year  0 0 0 $sinfo(h,query).month     0 0 0 $sinfo(h,query).week  0 0 0 $sinfo(h,query).day   0 0 0 $sinfo(h,query).p
  613.     did -a have 2 0 0 0 0 Connected     0 0 0 $sinfo(h,connected)   0 0 0 $sinfo(h,connected).year  0 0 0 $sinfo(h,connected).month     0 0 0 $sinfo(h,connected).week  0 0 0 $sinfo(h,connected).day   0 0 0 $sinfo(h,connected).p
  614.     did -a have 2 0 0 0 0
  615.     did -a have 2 0 0 0 0 Total     0 0 0 $sinfo(h,total)   0 0 0 $sinfo(h,total).year  0 0 0 $sinfo(h,total).month     0 0 0 $sinfo(h,total).week  0 0 0 $sinfo(h,total).day   0 0 0 $sinfo(h,total).p
  616.     did -a have 1 Since: $hg(have.date)
  617.   }
  618.   elseif ($1 == -s) {
  619.     did -r seen 2
  620.     did -a seen 2 0 0 0 0 Oped  0 0 0 $sinfo(s,oped)    0 0 0 $sinfo(s,oped).year   0 0 0 $sinfo(s,oped).month  0 0 0 $sinfo(s,oped).week   0 0 0 $sinfo(s,oped).day    0 0 0 $sinfo(s,oped).p
  621.     did -a seen 2 0 0 0 0 Deoped    0 0 0 $sinfo(s,deoped)  0 0 0 $sinfo(s,deoped).year     0 0 0 $sinfo(s,deoped).month    0 0 0 $sinfo(s,deoped).week     0 0 0 $sinfo(s,deoped).day  0 0 0 $sinfo(s,deoped).p
  622.     did -a seen 2 0 0 0 0 Halfoped  0 0 0 $sinfo(s,halfoped)    0 0 0 $sinfo(s,halfoped).year   0 0 0 $sinfo(s,halfoped).month  0 0 0 $sinfo(s,halfoped).week   0 0 0 $sinfo(s,halfoped).day    0 0 0 $sinfo(s,halfoped).p
  623.     did -a seen 2 0 0 0 0 Dehalfoped    0 0 0 $sinfo(s,dehalfoped)  0 0 0 $sinfo(s,dehalfoped).year     0 0 0 $sinfo(s,dehalfoped).month    0 0 0 $sinfo(s,dehalfoped).week     0 0 0 $sinfo(s,dehalfoped).day  0 0 0 $sinfo(b,dehalfoped).p
  624.     did -a seen 2 0 0 0 0 Voiced    0 0 0 $sinfo(s,voiced)  0 0 0 $sinfo(s,voiced).year     0 0 0 $sinfo(s,voiced).month    0 0 0 $sinfo(s,voiced).week     0 0 0 $sinfo(s,voiced).day  0 0 0 $sinfo(s,voiced).p
  625.     did -a seen 2 0 0 0 0 Devoiced  0 0 0 $sinfo(s,devoiced)    0 0 0 $sinfo(s,devoiced).year   0 0 0 $sinfo(s,devoiced).month  0 0 0 $sinfo(s,devoiced).week   0 0 0 $sinfo(s,devoiced).day    0 0 0 $sinfo(s,devoiced).p
  626.     did -a seen 2 0 0 0 0 Kicked    0 0 0 $sinfo(s,kicked)  0 0 0 $sinfo(s,kicked).year     0 0 0 $sinfo(s,kicked).month    0 0 0 $sinfo(s,kicked).week     0 0 0 $sinfo(s,kicked).day  0 0 0 $sinfo(s,kicked).p
  627.     did -a seen 2 0 0 0 0 Banned    0 0 0 $sinfo(s,banned)  0 0 0 $sinfo(s,banned).year     0 0 0 $sinfo(s,banned).month    0 0 0 $sinfo(s,banned).week     0 0 0 $sinfo(s,banned).day  0 0 0 $sinfo(s,banned).p
  628.     did -a seen 2 1 1 0 0 Nick Change   0 0 0 $sinfo(s,nick)    0 0 0 $sinfo(s,nick).year   0 0 0 $sinfo(s,nick).month  0 0 0 $sinfo(s,nick).week   0 0 0 $sinfo(s,nick).day    0 0 0 $sinfo(s,nick).p
  629.     did -a seen 2 1 1 0 0 Topic Change  0 0 0 $sinfo(s,topic)   0 0 0 $sinfo(s,topic).year  0 0 0 $sinfo(s,topic).month     0 0 0 $sinfo(s,topic).week  0 0 0 $sinfo(s,topic).day   0 0 0 $sinfo(s,topic).p
  630.     did -a seen 2 1 1 0 0 Server Quit   0 0 0 $sinfo(s,quit)    0 0 0 $sinfo(s,quit).year   0 0 0 $sinfo(s,quit).month  0 0 0 $sinfo(s,quit).week   0 0 0 $sinfo(s,quit).day    0 0 0 $sinfo(s,quit).p
  631.     did -a seen 2 1 1 0 0 Chan Join     0 0 0 $sinfo(s,joined)  0 0 0 $sinfo(s,joined).year     0 0 0 $sinfo(s,joined).month    0 0 0 $sinfo(s,joined).week     0 0 0 $sinfo(s,joined).day  0 0 0 $sinfo(s,joined).p
  632.     did -a seen 2 1 1 0 0 Chan Part     0 0 0 $sinfo(s,parted)  0 0 0 $sinfo(s,parted).year     0 0 0 $sinfo(s,parted).month    0 0 0 $sinfo(s,parted).week     0 0 0 $sinfo(s,parted).day  0 0 0 $sinfo(s,parted).p
  633.     did -a seen 2 0 0 0 0
  634.     did -a seen 2 0 0 0 0 Total     0 0 0 $sinfo(s,total)   0 0 0 $sinfo(s,total).year  0 0 0 $sinfo(s,total).month     0 0 0 $sinfo(s,total).week  0 0 0 $sinfo(s,total).day   0 0 0 $sinfo(s,total).p
  635.     did -a seen 1 Since: $hg(seen.date)
  636.   }
  637.   else {
  638.     did -r stats2 52
  639.     did -ra stats2 32 Stats since: $hg(firstdate)
  640.     did -ra stats2 34 Files sent: $hg(dccsend)
  641.     did -ra stats2 35 Size: $bytes($hg(dccsendsize),3).suf
  642.     did -ra stats2 36 Filed recieved: $hg(dccget)
  643.     did -ra stats2 37 Size: $bytes($hg(dccgetsize),3).suf
  644.     did -ra stats2 40 $time
  645.     did -ra stats2 41 ( $+ $time(z) $+ GMT)
  646.     did -ra stats2 43 $day $mdate
  647.     did -ra stats2 45 $totalonline
  648.     did -ra stats2 47 $uptime(mirc,1)
  649.     did -ra stats2 49 $uptime(system,1)
  650.  
  651.     did -a stats2 52 0 0 0 0 Misc:
  652.     did -a stats2 52 0 0 0 0 mIRC started   0 0 0 $sinfo(e,started)     0 0 0 $sinfo(e,started).year    0 0 0 $sinfo(e,started).month   0 0 0 $sinfo(e,started).week    0 0 0 $sinfo(e,started).day     0 0 0 $sinfo(e,started).p
  653.     did -a stats2 52 0 0 0 0 Viewed stats   0 0 0 $sinfo(e,viewed)  0 0 0 $sinfo(e,viewed).year     0 0 0 $sinfo(e,viewed).month    0 0 0 $sinfo(e,viewed).week     0 0 0 $sinfo(e,viewed).day  0 0 0 $sinfo(e,viewed).p
  654.     did -a stats2 52 0 0 0 0 Echo's     0 0 0 $sinfo(e,echo)    0 0 0 $sinfo(e,echo).year   0 0 0 $sinfo(e,echo).month  0 0 0 $sinfo(e,echo).week   0 0 0 $sinfo(e,echo).day    0 0 0 $sinfo(e,echo).p
  655.     did -a stats2 52 0 0 0 0 CTCP replies   0 0 0 $sinfo(e,ctcps)   0 0 0 $sinfo(e,ctcps).year  0 0 0 $sinfo(e,ctcps).month     0 0 0 $sinfo(e,ctcps).week  0 0 0 $sinfo(e,ctcps).day   0 0 0 $sinfo(e,ctcps).p
  656.     did -a stats2 52 0 0 0 0 Webpage hits   0 0 0 $sinfo(e,pagehits)    0 0 0 $sinfo(e,pagehits).year   0 0 0 $sinfo(e,pagehits).month  0 0 0 $sinfo(e,pagehits).week   0 0 0 $sinfo(e,pagehits).day    0 0 0 $sinfo(e,pagehits).p
  657.     did -a stats2 52 0 0 0 0
  658.     did -a stats2 52 0 0 0 0 Text Stuff:
  659.     did -a stats2 52 0 0 0 0 Lines  0 0 0 $sinfo(e,lines)   0 0 0 $sinfo(e,lines).year  0 0 0 $sinfo(e,lines).month     0 0 0 $sinfo(e,lines).week  0 0 0 $sinfo(e,lines).day   0 0 0 $sinfo(e,lines).p
  660.     did -a stats2 52 0 0 0 0 Words  0 0 0 $sinfo(e,words)   0 0 0 $sinfo(e,words).year  0 0 0 $sinfo(e,words).month     0 0 0 $sinfo(e,words).week  0 0 0 $sinfo(e,words).day   0 0 0 $sinfo(e,words).p
  661.     did -a stats2 52 0 0 0 0 Characters     0 0 0 $sinfo(e,chars)   0 0 0 $sinfo(e,chars).year  0 0 0 $sinfo(e,chars).month     0 0 0 $sinfo(e,words).week  0 0 0 $sinfo(e,chars).day   0 0 0 $sinfo(e,chars).p
  662.     did -a stats2 52 0 0 0 0 Punctuations   0 0 0 $sinfo(e,puncs)   0 0 0 $sinfo(e,puncs).year  0 0 0 $sinfo(e,puncs).month     0 0 0 $sinfo(e,puncs).week  0 0 0 $sinfo(e,puncs).day   0 0 0 $sinfo(e,puncs).p
  663.     did -a stats2 52 0 0 0 0 Smilies    0 0 0 $sinfo(e,smilies)     0 0 0 $sinfo(e,smilies).year    0 0 0 $sinfo(e,smilies).month   0 0 0 $sinfo(e,smilies).week    0 0 0 $sinfo(e,smilies).day     0 0 0 $sinfo(e,smilies).p
  664.     if ($hfind(stats,custom.*,0,w)) {
  665.       did -a stats2 52 0 0 0 0
  666.       did -a stats2 52 0 0 0 0 Custom:
  667.       var %c = 1
  668.       while (%c <= $hfind(stats,custom.*,0,w)) {
  669.         var %h = $hfind(stats,custom.*,%c,w)
  670.         did -a stats2 52 0 0 0 0 $gettok(%h,2,46)   0 0 0 $sinfo(e,%h)  0 0 0 $sinfo(e,%h).year     0 0 0 $sinfo(e,%h).month    0 0 0 $sinfo(e,%h).week     0 0 0 $sinfo(e,%h).day  0 0 0 $sinfo(e,%h).p
  671.         inc %c
  672.       }
  673.     }
  674.     did -a stats2 52 0 0 0 0
  675.     did -a stats2 52 0 0 0 0 Total  0 0 0 $sinfo(e,total)   0 0 0 $sinfo(e,total).year  0 0 0 $sinfo(e,total).month     0 0 0 $sinfo(e,total).week  0 0 0 $sinfo(e,total).day   0 0 0 $sinfo(e,total).p
  676.   }
  677. }
  678.  
  679. alias -l stats2 {
  680.   if (!$dialog(stats2)) || (!$hg(autoupdate)) { .timerstats off }
  681.   else {
  682.     did -ra stats2 40 $time
  683.     did -ra stats2 43 $day $mdate
  684.     did -ra stats2 45 $totalonline
  685.     did -ra stats2 47 $uptime(mirc,1)
  686.     did -ra stats2 49 $uptime(system,1)
  687.   }
  688. }
  689.  
  690. alias -l stats.cputm { if ($regex(cputm,$moo(testing),/CPUID Processor Brand \(where suppored. blank otherwise\): \((.+)\)/i)) { return $replace($regml(cputm,1),(tm),ô,(r),Æ,(c)) } }
  691.  
  692. alias -l stats.cpu {
  693.   did -ra stats2 63 $iif($sinfo(y,cpu),$ifmatch,n/a)
  694.   did -ra stats2 65 $iif($sinfo(y,mhz),$ifmatch,n/a)
  695.   did -ra stats2 67 $iif($sinfo(y,cache),$ifmatch,n/a)
  696.   did -ra stats2 68 Load: $iif($sinfo(y,load),$ifmatch,n/a)
  697.   did -a stats2 69 $iif($sinfo(y,load),$remove($ifmatch,%),0) 0 100
  698.   did -ra stats2 75 $iif($sinfo(y,man),$ifmatch,n/a)
  699.  
  700.   did -ra stats2 71 $iif($sinfo(y,ram),$ifmatch,n/a)
  701.   did -ra stats2 72 In use: $iif($sinfo(y,ramuse),$gettok($ifmatch,1,40),n/a)
  702.   did -a stats2 73 $iif($sinfo(y,ramuse),$gettok($remove($ifmatch,%),1,40),0) 0 100
  703. }
  704. alias -l stats.cache {
  705.   did -ra stats2 89 $iif($sinfo(y,cachesize),$ifmatch,n/a)
  706.   did -ra stats2 91 $iif($sinfo(y,cacheassoc),$ifmatch,n/a)
  707.   did -ra stats2 93 $iif($sinfo(y,cachelines),$ifmatch,n/a)
  708.   did -ra stats2 95 $iif($sinfo(y,cachelinesize),$ifmatch,n/a)
  709.   did -ra stats2 97 $iif($sinfo(y,cacheinstrsize),$ifmatch,n/a)
  710.   did -ra stats2 99 $iif($sinfo(y,cacheinstrassoc),$ifmatch,n/a)
  711.   did -ra stats2 101 $iif($sinfo(y,cacheinstrlines),$ifmatch,n/a)
  712.   did -ra stats2 103 $iif($sinfo(y,cacheinstrlinesize),$ifmatch,n/a)
  713. }
  714. alias -l stats.os {
  715.   did -ra stats2 78 $iif($sinfo(y,os),$ifmatch,n/a)
  716.   did -ra stats2 80 $iif($sinfo(y,osver),$ifmatch,n/a)
  717.   did -ra stats2 82 $iif($sinfo(y,osbuild),$ifmatch,n/a)
  718.   did -ra stats2 84 $iif($sinfo(y,osinst),$ifmatch,n/a)
  719.   did -ra stats2 86 $iif($sinfo(y,osup),$ifmatch,n/a)
  720. }
  721. alias -l stats.hdd {
  722.   did -r stats2 112
  723.   var %l = 67,%tfs = 0,%ts = 0,%i = 2,%rtfs = 0,%rts = 0
  724.   while (%l <= 90) {
  725.     if ($disk($chr(%l))) {
  726.       if ($disk($chr(%l)).type == fixed) || ($disk($chr(%l)).type == cdrom) || ($disk($chr(%l)).type == removable) {
  727.         var %f = $disk($chr(%l)).free,%s = $disk($chr(%l)).size
  728.         inc %tfs %f
  729.         inc %ts %s
  730.         if ($disk($chr(%l)).type == fixed) { var %ico = 1 }
  731.         if ($disk($chr(%l)).type == cdrom) { var %ico = 2 }
  732.         if ($disk($chr(%l)).type == removable) { var %ico = 3 }
  733.         if (0 %ico 0 0 $+($chr(%l),: ( $+ $iif($disk($chr(%l)).label,$disk($chr(%l)).label,No label) $+ ),  + 0 0 0 $bytes(%s,3).suf,   + 0 0 0 $bytes($calc(%s - %f),3).suf,   + 0 0 0 $bytes(%f,3).suf,   + 0 0 0 $round($calc((%f / %s)*100),1),%) != $did(stats2,112,%i)) {
  734.           did -a stats2 112 $ifmatch
  735.           var %dn = 1
  736.         }
  737.         inc %i
  738.       }
  739.       elseif ($disk($chr(%l)).type == remote) {
  740.         var %rf = $disk($chr(%l)).free,%rs = $disk($chr(%l)).size
  741.         inc %rtfs %rf
  742.         inc %rts %rs
  743.         if (0 3 0 0 $+($chr(%l),: ( $+ $disk($chr(%l)).unc $+ ),    + 0 0 0 $bytes(%rs,3).suf,  + 0 0 0 $bytes($calc(%rs - %rf),3).suf,     + 0 0 0 $bytes(%rf,3).suf,  + 0 0 0 $round($calc((%rf / %rs)*100),1),%) != $did(stats2,112,%i)) {
  744.           did -a stats2 112 $ifmatch
  745.           var %dn = 1,%rdn = 1
  746.         }
  747.         inc %i
  748.       }
  749.     }
  750.     inc %l
  751.   }
  752.   if (%dn) {
  753.     did -a stats2 112 0 0 0 0
  754.     if (%rdn) {
  755.       did -a stats2 112 0 1 0 0 0 Local total   0 0 0 $+($bytes(%ts,3).suf, 0 0 0 $bytes(%tfs,3).suf,   0 0 0 $round($calc((%tfs / %ts)*100),1),%)
  756.       did -a stats2 112 0 1 0 0 0 Mapped total  0 0 0 $+($bytes(%rts,3).suf,    0 0 0 $bytes(%rtfs,3).suf,  0 0 0 $round($calc((%rtfs / %rts)*100),1),%)
  757.       did -a stats2 112 0 0 0 0 0
  758.     }
  759.     did -a stats2 112 0 1 0 0 Total 0 0 0 $+($bytes($calc(%ts + %rts),3).suf,   + 0 0 0 $bytes($calc((%ts + %rts) - (%rtfs + %tfs)),3).suf,     0 0 0 $bytes($calc(%rtfs + %tfs),3).suf,    0 0 0 $round($calc(((%rtfs + %tfs)/(%ts + %rts))*100),1),%)
  760.   }
  761. }
  762.  
  763. alias -l stats.con {
  764.   did -ra stats2 124 $iif($sinfo(y,con),$ifmatch,n/a)
  765.   did -ra stats2 126 $iif($sinfo(y,conspeed),$ifmatch,n/a)
  766.   did -ra stats2 128 $iif($sinfo(y,condown),$ifmatch,n/a)
  767.   did -ra stats2 130 $iif($sinfo(y,conup),$ifmatch,n/a)
  768.   did -ra stats2 132 $iif($sinfo(y,conactive),$ifmatch,n/a)
  769.  
  770.   did -ra stats2 135 $iif($sinfo(y,eth),$ifmatch,n/a)
  771.   did -ra stats2 137 $iif($sinfo(y,ethspeed),$ifmatch,n/a)
  772.   did -ra stats2 139 $iif($sinfo(y,ethget),$ifmatch,n/a)
  773.   did -ra stats2 141 $iif($sinfo(y,ethsent),$ifmatch,n/a)
  774.   did -ra stats2 143 $ip
  775.  
  776.   did -ra stats2 156 $iif($sinfo(y,upstream),$ifmatch,n/a)
  777.   did -ra stats2 157 $iif($sinfo(y,downstream),$ifmatch,n/a)
  778. }
  779. alias -l stats.gfx {
  780.   did -ra stats2 115 $iif($sinfo(y,gfx),$ifmatch,n/a)
  781.   did -ra stats2 117 $iif($sinfo(y,gfxres),$ifmatch,n/a)
  782.   did -ra stats2 119 $iif($sinfo(y,gfxref),$ifmatch,n/a)
  783.   did -ra stats2 121 $iif($sinfo(y,gfxdepth),$ifmatch,n/a)
  784. }
  785. alias -l stats.misc {
  786.   did -r stats2 145
  787.   stats.miscadd is3dNow 3DNow! support
  788.   stats.miscadd is3dNowExt Extended 3DNow! support
  789.   stats.miscadd isMMX MMX support
  790.   stats.miscadd isMMXExt MMX Extensions
  791.   stats.miscadd isCPUID Supports CPUID instruction
  792.   stats.miscadd isFPU FPU present
  793.   stats.miscadd isVME Virtual Mode Extensions
  794.   stats.miscadd isDEBUG Debug extensions
  795.   stats.miscadd isPSE Page Size Extensions
  796.   stats.miscadd isTSC Time Stamp Counter
  797.   stats.miscadd isMSR Model Specific Registers
  798.   stats.miscadd isPAE Page Address Extensions
  799.   stats.miscadd isMCE Machine Check Extensions
  800.   stats.miscadd isCMPXCHG8 CMPXCHG8 instruction
  801.   stats.miscadd isAPIC APIC
  802.   stats.miscadd isSYSENTER SYSENTER/SYSEXIT instruction
  803.   stats.miscadd isMTRR Memory Type Range Registers instruction
  804.   stats.miscadd isGPE Global Paging Extensions
  805.   stats.miscadd isMCA Machine Check Architecture
  806.   stats.miscadd isCMOV CMOV instruction
  807.   stats.miscadd isPAT Page Attribue Table
  808.   stats.miscadd isPSE36 PSE36 (Page Size Extensions)
  809.   stats.miscadd isFXSAVE FXSAVE/FXRSTOR instruction
  810.   stats.miscadd isSSE SSE
  811.   stats.miscadd isSSEFP SSE FP support
  812. }
  813. alias -l stats.miscadd { did -a stats2 145 1 1 0 0  $2-     + 0 0 0 $iif($procinfo($1) == $true,Yes,No) }
  814.  
  815. ;#### $mirc2html by Sephiroth #####
  816.  
  817. alias -l mirc2html {
  818.   var %t = $replace($1-,<,&#060;,>,&#062;),%li,%re,%x,%y = 0
  819.   if ( isin %t) {
  820.     %t = %t $+
  821.     %x = $pos(%t,,0)
  822.     while (%y < %x) {
  823.       inc %y
  824.       %li = $.colrep($.controlrep($gettok(%t,1,15)))
  825.       %re = $gettok(%t,2-,15)
  826.       %t = %li $+ </b></u></font> $+ %re
  827.     }
  828.   }
  829.   else { %t = $.colrep($.controlrep(%t)) }
  830.   return %t
  831. }
  832. alias -l .rgb {
  833.   if ($1 isnum 0-15) {
  834.     tokenize 44 $rgb($color($1)) $+ $iif($2 isnum 0-15,$chr(44) $+ $rgb($color($2)))
  835.     var %col = $+($chr(35),$base($1,10,16,2),$base($2,10,16,2),$base($3,10,16,2)),%bgcol = $+($chr(35),$base($4,10,16,2),$base($5,10,16,2),$base($6,10,16,2))
  836.     return $iif($prop == html,<font color= $+ %col $+ $iif($4 || $4 isnum 0,$chr(32) $+ bgcolor= $+ %bgcol) $+ >,%col $iif($4 || $4 isnum 0,%bgcol))
  837.   }
  838.   else { return }
  839. }
  840. alias -l .colrep {
  841.   var %t = $replace($1-,$chr(32)),%s = ,%p,%cp,%atos,%l,%left,%right,%color = $false,%x,%y,%z
  842.   %p = 0
  843.   %atos = $pos(%t,%s,0)
  844.   while (%p < %atos) {
  845.     inc %p
  846.     %komma = $false
  847.     %l = $len(%t)
  848.     %cp = $pos(%t,%s,%p)
  849.     %left = $left(%t,$calc(%cp -1))
  850.     %right = $right(%t,$calc(%l - %cp +1))
  851.     %a = ""
  852.     %b = ""
  853.     if ($mid(%right,2,1) isnum) {
  854.       %color = $true
  855.       %x = $mid(%right,1,6)
  856.       %y = 1
  857.       while (%y < 6) {
  858.         inc %y
  859.         %z = $mid(%x,%y,1)
  860.         if (%z isnum 0-9) {
  861.           if ((!%komma) && ($len(%a) < 2)) %a = %a $+ %z
  862.           elseif ((%komma) && ($len(%b) < 2)) %b = %b $+ %z
  863.         }
  864.         elseif (%z == $chr(44)) { %komma = $true }
  865.       }
  866.     }
  867.     else {
  868.       %color = $false
  869.     }
  870.     %t = %left $+ $iif(%color,$.rgb(%a,%b).html,</font>) $+ %right
  871.   }
  872.   %t = %t
  873.   return $strip($replace(%t,ˇ,$chr(32)),c)
  874. }
  875. alias -l .controlrep {
  876.   var %t = $replace($1-,$chr(32)),%tok = ø<b>ø</b>πø<u>ø</u>πø $+ $.rgb($color(background),$color(normal)).html $+ ø</font>,%r = $numtok(%tok,185),%a,%b,%c,%s,%p,%cp,%atos,%l,%left,%right,%op
  877.   while (%r) {
  878.     %c = $gettok(%tok,%r,185)
  879.     %s = $gettok(%c,1,191)
  880.     %a = $gettok(%c,2,191)
  881.     %b = $gettok(%c,3,191)
  882.     %p = 0
  883.     %atos = $pos(%t,%s,0)
  884.     while (%p < %atos) {
  885.       inc %p
  886.       %l = $len(%t)
  887.       %cp = $pos(%t,%s,%p)
  888.       %left = $left(%t,$calc(%cp -1))
  889.       %right = $right(%t,$calc(%l - %cp +1))
  890.       %t = %left $+ $iif(2 // %p,%b,%a) $+ %right
  891.     }
  892.     %t = $remove(%t,%s)
  893.     dec %r
  894.   }
  895.   return $replace(%t,ˇ,$chr(32),,</b></u></font>)
  896. }
  897. ;###########
  898.  
  899. ;################ echo aliases ################
  900.  
  901. alias -l servecho {
  902.   var %c = 1
  903.   while (%c <= $chan(0)) {
  904.     if ($hg(echo.chan) == all) { msg $chan(%c) $1- }
  905.     elseif ($hg(echo.chan) == only) && ($chan(%c) isin $hg(echo.chan.only)) { msg $chan(%c) $1- }
  906.     elseif ($hg(echo.chan) == not) && ($chan(%c) !isin $hg(echo.chan.not)) { msg $chan(%c) $1- }
  907.     inc %c
  908.   }
  909.   var %q = 1
  910.   while (%q <= $query(0)) {
  911.     if ($hg(echo.chan) == all) { msg $query(%q) $1- }
  912.     elseif ($hg(echo.chan) == only) && ($query(%q) isin $hg(echo.chan.only)) { msg $query(%q) $1- }
  913.     elseif ($hg(echo.chan) == not) && ($query(%q) !isin $hg(echo.chan.not)) { msg $query(%q) $1- }
  914.     inc %q
  915.   }
  916. }
  917.  
  918. alias -l stats.echo {
  919.  
  920.   if ($1 == servers) {
  921.     var %o = $activecid
  922.     var %e = $ptext1(Server info) [Server] [Joined Channels] [Open Queries]
  923.     var %s = 1
  924.     while (%s <= $scon(0)) {
  925.       scon %s
  926.       var %c = 1
  927.       while (%c <= $chan(0)) {
  928.         set %stats.chan %stats.chan $+ $iif(%stats.chan,$chr(44)) $chan(%c)
  929.         inc %c
  930.       }
  931.       var %q = 1
  932.       while (%q <= $query(0)) {
  933.         set %stats.query %stats.query $+ $iif(%stats.query,$chr(44)) $query(%q)
  934.         inc %q
  935.       }
  936.       var %e = %e    $ptext($server $nbr($iif($network,$ifmatch))) $ptext(%stats.chan) $ptext(%stats.query)
  937.       unset %stats.chan %stats.query
  938.       inc %s
  939.     }
  940.     scid %o
  941.   }
  942.   elseif ($1 == power) {
  943.     var %1 = $scon(0),%2 = 1,%3 = 0,%4 = 0,%5 = 0,%6 = 0,%7 = 0
  944.     while (%2 <= %1) {
  945.       scon %2
  946.       set %3 $calc(%3 + $chan(0))
  947.       var %8 = $chan(0),%9 = 1
  948.       while (%9 <= %8) {
  949.         if ($me isop $chan(%9)) { inc %4 1 | set %7 $calc(%7 + $nick($chan(%9),0,a,o)) }
  950.         if ($me ishop $chan(%9)) { inc %5 1 | set %7 $calc(%7 + $nick($chan(%9),0,a,oh)) }
  951.         if ($me isvoice $chan(%9)) { inc %6 1 | set %7 $calc(%7 + $nick($chan(%9),0,r)) }
  952.         inc %9 1
  953.       }
  954.       inc %2 1
  955.     }
  956.     var %e = $ptext1(Show ur Powah) I'm on $ptext(%3) channels ( $+ %1 servers), I have ops in $ptext(%4) $+, halfops in $ptext(%5) $+ , voice in $ptext(%6) and I have power over $ptext(%7) peons!
  957.   }
  958.   elseif ($1 == time) { var %e = $ptext1(Time) Time on this system: $ptext($day $mdate $+ $chr(44) $time) }
  959.   elseif ($1 == uptime) { var %e = $ptext1(Uptime) System uptime: $ptext($uptime(system,1)) $+ , mIRC uptime: $ptext($uptime(mirc,1)) $+ , been online on this server for: $ptext($uptime(server,1)) $+ , total online time: $ptext($totalonline (since $hg(firstdate) $+ )) }
  960.   elseif ($1 == events) { var %e = $ptext1(Events) Since $hg(firstdate) I have started up mIRC $ptext($hg(started)) times, viewed my stats $ptext($hg(viewed)) times, echo'd my stats $ptext($hg(echo.total)) times, replied to $ptext($hg(ctcps)) ctcp requests, had $ptext($hg(pagehits)) hits on my webpage, sent $ptext($hg(dccsend)) files with a total of $ptext($bytes($hg(dccsendsize),3).suf) and recieved $ptext($hg(dccget)) files with a total of $ptext($bytes($hg(dccgetsize),3).suf) }
  961.   elseif ($1 == texts) { var %e = $ptext1(Text Stuff) Since $hg(firstdate) I have typed: $ptext($hg(lines)) lines, $ptext($hg(words)) words, $ptext($hg(chars)) characters, $ptext($hg(puncs)) punctuations and $ptext($hg(smilies)) smilies }
  962.   elseif ($1 == words) {
  963.     if ($hfind(stats,custom.*,0,w)) {
  964.       var %i = 1
  965.       while (%i <= $hfind(stats,custom.*,0,w)) {
  966.         var %h = $hfind(stats,custom.*,%i,w)
  967.         var %w = %w $+(',$gettok(%h,2,46),') $ptext($hg(%h)) times $+ $iif((!%w) && ($hfind(stats,custom.*,0,w) != 1),$chr(44))
  968.         inc %i
  969.       }
  970.       var %e = $ptext1(Own words) Since $hg(firstdate) I've typed the word %w
  971.     }
  972.     else { echo -a 10(4!10) Currently, you do not keep track of any words. }
  973.   }
  974.   elseif ($1 == been) { var %e = $ptext1(Been Stats) Since $hg(firstdate) times I've been: oped: $ptext($hg(been.oped)) $+ , deoped: $ptext($hg(been.deoped)) $+ , halfoped: $ptext($hg(been.halfoped)) $+ , dehalfoped: $ptext($hg(been.dehalfoped)) $+ , voiced: $ptext($hg(been.voiced)) $+ , devoiced: $ptext($hg(been.devoiced)) $+ , kicked: $ptext($hg(been.kicked)) $+ , banned: $ptext($hg(been.banned)) }
  975.   elseif ($1 == have) { var %e = $ptext1(Have Stats) Since $hg(have.date) times I have: oped: $ptext($hg(have.oped)) $+ , deoped: $ptext($hg(have.deoped)) $+ , halfoped: $ptext($hg(have.halfoped)) $+ , dehalfoped: $ptext($hg(have.dehalfoped)) $+ , voiced: $ptext($hg(have.voiced)) $+ , devoiced: $ptext($hg(have.devoiced)) $+ , kicked: $ptext($hg(have.kicked)) $+ , banned: $ptext($hg(have.banned)) $+ , changed nick: $ptext($hg(have.nick)) $+ , set a topic: $ptext($hg(have.topic)) $+ , joined a channel: $ptext($hg(have.joined)) $+ , parted a channel: $ptext($hg(have.parted)) $+ , opened a query: $ptext($hg(have.query)) $+ , connected: $ptext($hg(have.connected)) $+ , quit a server: $ptext($hg(have.quit)) }
  976.   elseif ($1 == seen) { var %e = $ptext1(Seen Stats) Since $hg(firstdate) times I've seen ppl being: oped: $ptext($hg(seen.oped)) $+ , deoped: $ptext($hg(seen.deoped)) $+ , halfoped: $ptext($hg(seen.halfoped)) $+ , dehalfoped: $ptext($hg(seen.dehalfoped)) $+ , voiced: $ptext($hg(seen.voiced)) $+ , devoiced: $ptext($hg(seen.devoiced)) $+ , kicked: $ptext($hg(seen.kicked)) $+ , banned: $ptext($hg(seen.banned)) $+ , nick change: $ptext($hg(seen.nick)) $+ , topic set: $ptext($hg(seen.topic)) $+ , channel join: $ptext($hg(seen.joined)) $+ , channel part: $ptext($hg(seen.parted)) $+ , server quit: $ptext($hg(seen.quit)) }
  977.   elseif ($1 == cpu) { var %e = $ptext1(CPU info) Processor: $ptext($sinfo(y,cpu)) $+ , Manufacturer: $ptext($sinfo(y,man)) $+ , Megahertz: $ptext($sinfo(y,mhz)) $+ , Cache: $ptext($sinfo(y,cache)) $+ , Load: $ptext($sinfo(y,load)) }
  978.   elseif ($1 == os) { var %e = $ptext1(OS info) Operating System: $ptext($sinfo(y,os)) $+ , Version: $ptext($sinfo(y,osver)) $+ , Build number: $ptext($sinfo(y,osbuild)) $+ , Installed for: $ptext($sinfo(y,osinst)) $+ , Uptime: $ptext($uptime(system,1)) }
  979.   elseif ($1 == cache) { var %e = $ptext1(L1 Cache info) Size: $ptext($sinfo(y,cachesize)) $+ , Associativity: $ptext($sinfo(y,cacheassoc)) $+ , Lines: $ptext($sinfo(y,cachelines)) $+ , Line size: $ptext($sinfo(y,cachelinesize)) $+ , Instuction size: $ptext($sinfo(y,cacheinstrsize)) $+ , Instruction associativity: $ptext($sinfo(y,cacheinstrassoc)) $+ , Instruction lines: $ptext($sinfo(y,cacheinstrlines)) $+ , Instruction line size: $ptext($sinfo(y,cacheinstrlinesize)) }
  980.   elseif ($1 == hdd) {
  981.     var %l = 67,%tfs = 0,%ts = 0,%i = 2,%rtfs = 0,%rts = 0,%e = $ptext1(HDD info) [Drive] [Size] [Used] [Free] [% Free]
  982.     while (%l <= 90) {
  983.       if ($disk($chr(%l))) {
  984.         if ($disk($chr(%l)).type == fixed) || ($disk($chr(%l)).type == cdrom) || ($disk($chr(%l)).type == removable) {
  985.           var %f = $disk($chr(%l)).free,%s = $disk($chr(%l)).size
  986.           inc %tfs %f
  987.           inc %ts %s
  988.           if ($disk($chr(%l)).type == fixed) { var %d = $ptext1(HD) }
  989.           elseif ($disk($chr(%l)).type == cdrom) { var %d = $ptext1(CD) }
  990.           elseif ($disk($chr(%l)).type == removable) { var %d = $ptext1(RM) }
  991.           var %d = %d $chr(%l) $+ : $bytes(%s,3).suf || $bytes($calc(%s - %f),3).suf || $bytes(%f,3).suf || $round($calc((%f / %s)*100),1) $+ %
  992.           var %dn = 1
  993.           inc %i
  994.         }
  995.         elseif ($disk($chr(%l)).type == remote) {
  996.           var %rf = $disk($chr(%l)).free,%rs = $disk($chr(%l)).size
  997.           inc %rtfs %rf
  998.           inc %rts %rs
  999.           var %d = $ptext1(RE) $chr(%l) $+ : $nbr($disk($chr(%l)).unc) || $bytes(%rs,3).suf || $bytes($calc(%rs - %rf),3).suf || $bytes(%rf,3).suf || $round($calc((%rf / %rs)*100),1) $+ %
  1000.           var %dn = 1,%rdn = 1
  1001.           inc %i
  1002.         }
  1003.         var %e = %e      %d
  1004.       }
  1005.       inc %l
  1006.     }
  1007.     if (%dn) {
  1008.       var %e = %e    $ptext1(TO) Total: $bytes($calc(%ts + %rts),3).suf || $bytes($calc((%ts + %rts) - (%rtfs + %tfs)),3).suf || $bytes($calc(%rtfs + %tfs),3).suf || $round($calc(((%rtfs + %tfs)/(%ts + %rts))*100),1) $+ %
  1009.     }
  1010.     else { echo -a 10(4!10) No harddisk data available. }
  1011.   }
  1012.   elseif ($1 == gfx) { var %e = $ptext1(gfx info) gfx card: $ptext($sinfo(y,gfx)) $+ , resolution: $ptext($sinfo(y,gfxres)) $+ , refresh rate: $ptext($sinfo(y,gfxref)) $+ , depth: $ptext($sinfo(y,gfxdepth)) }
  1013.   elseif ($1 == con) { var %e = $ptext1(connection info) Connection: $ptext($sinfo(y,con)) $+ , Speed: $ptext($sinfo(y,conspeed)) $+ , Downloaded: $ptext($sinfo(y,condown)) $+ , Uploaded: $ptext($sinfo(y,conup)) $+ , Active for: $ptext($sinfo(y,conactive)) $+ , IP: $ptext($ip) }
  1014.   elseif ($1 == eth) { var %e = $ptext1(network info) Name: $ptext($sinfo(y,eth)) $+ , Speed: $ptext($sinfo(y,ethspeed)) $+ , Recieved: $ptext($sinfo(y,ethget)) $+ , Sent: $ptext($sinfo(y,ethsent)) $+ , IP: $ptext($ip) }
  1015.   elseif ($1 == misc) {
  1016.     var %e = $stats.miscecho(is3dNow,3DNow! support)
  1017.     var %e = %e $+ , $stats.miscecho(is3dNowExt,Extended 3DNow!)
  1018.     var %e = %e $+ , $stats.miscecho(isMMX,MMX)
  1019.     var %e = %e $+ , $stats.miscecho(isMMXExt,MMX Extensions)
  1020.     var %e = %e $+ , $stats.miscecho(isCPUID,Supports CPUID)
  1021.     var %e = %e $+ , $stats.miscecho(isFPU,FPU)
  1022.     var %e = %e $+ , $stats.miscecho(isVME,Virtual Mode Extensions)
  1023.     var %e = %e $+ , $stats.miscecho(isDEBUG,Debug extensions)
  1024.     var %e = %e $+ , $stats.miscecho(isPSE,Page Size Extensions)
  1025.     var %e = %e $+ , $stats.miscecho(isTSC,Time Stamp Counter)
  1026.     var %e = %e $+ , $stats.miscecho(isMSR,Model Specific Registers)
  1027.     var %e = %e $+ , $stats.miscecho(isPAE,Page Address Extensions)
  1028.     var %e = %e $+ , $stats.miscecho(isMCE,Machine Check Extensions)
  1029.     var %e = %e $+ , $stats.miscecho(isCMPXCHG8,CMPXCHG8)
  1030.     var %e = %e $+ , $stats.miscecho(isAPIC,APIC)
  1031.     var %e = %e $+ , $stats.miscecho(isSYSENTER,SYSENTER/SYSEXIT)
  1032.     var %e = %e $+ , $stats.miscecho(isMTRR,Memory Type Range Registers)
  1033.     var %e = %e $+ , $stats.miscecho(isGPE,Global Paging Extensions)
  1034.     var %e = %e $+ , $stats.miscecho(isMCA,Machine Check Architecture)
  1035.     var %e = %e $+ , $stats.miscecho(isCMOV,CMOV)
  1036.     var %e = %e $+ , $stats.miscecho(isPAT,Page Attribue Table)
  1037.     var %e = %e $+ , $stats.miscecho(isPSE36,PSE36 (Page Size Extensions))
  1038.     var %e = %e $+ , $stats.miscecho(isFXSAVE,FXSAVE/FXRSTOR)
  1039.     var %e = %e $+ , $stats.miscecho(isSSE,SSE)
  1040.     var %e = %e $+ , $stats.miscecho(isSSEFP,SSE FP)
  1041.   }
  1042.   elseif ($1 == custom) { var %e = $eval($hg(echo.custom),2) }
  1043.  
  1044.   if ($hg(color)) { return %e }
  1045.   else { return $strip(%e) }
  1046. }
  1047. alias -l stats.miscecho { return $2 $+ : $ptext($iif($procinfo($1) == $true,Yes,No)) }
  1048.  
  1049. ;############### ctcp replies ###################
  1050.  
  1051. ctcp *:*:*:{
  1052.   if ($1 == STATS) {
  1053.     if (!$hg(ctcp)) { .ctcpreply $nick STATS: ctcpreplying has been disabled. | halt }
  1054.     if (!$2) { .ctcpreply $nick STATS: Use one of the following parameters: /ctcp $me STATS <power $chr(124) time $chr(124) uptime $chr(124) texts $chr(124) events $chr(124) words $chr(124) been $chr(124) have $chr(124) seen $chr(124) cpu $chr(124) os $chr(124) cache $chr(124) con $chr(124) eth $chr(124) gfx $chr(124) custom $chr(124) page> }
  1055.     elseif ($2 == power) {
  1056.       var %1 = $scon(0),%2 = 1,%3 = 0, %4 = 0, %5 = 0, %6 = 0, %7 = 0
  1057.       while (%2 <= %1) {
  1058.         scon %2
  1059.         set %3 $calc(%3 + $chan(0))
  1060.         var %8 $chan(0)
  1061.         var %9 1
  1062.         while (%9 <= %8) {
  1063.           if ($me isop $chan(%9)) { inc %4 1 | set %7 $calc(%7 + $nick($chan(%9),0,a,o)) }
  1064.           if ($me ishop $chan(%9)) { inc %5 1 | set %7 $calc(%7 + $nick($chan(%9),0,a,oh)) }
  1065.           if ($me isvoice $chan(%9)) { inc %6 1 | set %7 $calc(%7 + $nick($chan(%9),0,r)) }
  1066.           inc %9 1
  1067.         }
  1068.         inc %2 1
  1069.       }
  1070.       var %e = POWER: I'm on $ptext(%3) channels ( $+ %1 servers), I have ops in $ptext(%4) $+ , halfops in $ptext(%5) $+ , voice in $ptext(%6) and I have power over $ptext(%7) peons!
  1071.     }
  1072.     elseif ($2 == time) { var %e = TIME: Time on this system: $ptext($day $mdate $+ , $time) }
  1073.     elseif ($2 == uptime) { var %e = STATUS: Windows uptime: $ptext($uptime(system,1)) $+ , mIRC Uptime: $ptext($uptime(mirc,1)) $+ , Been online on this server for: $ptext($uptime(server,1)) $+ , Total online time: $ptext($totalonline (since $hg(firstdate) $+ )) }
  1074.     elseif ($2 == events) { var %e = EVENTS: Since $hg(firstdate) I have started up mIRC $ptext($hg(started)) times, had $ptext($hg(pagehits)) hits on my webpage, sent $ptext($hg(dccsend)) files with a total of $ptext($bytes($hg(dccsendsize),3).suf) and recieved $ptext($hg(dccget)) files with a total of $ptext($bytes($hg(dccgetsize),3).suf) }
  1075.     elseif ($2 == texts) { var %e = TEXT STUFF: Since $hg(firstdate) I have typed: $ptext($hg(lines)) lines, $ptext($hg(words)) words, $ptext($hg(chars)) characters, $ptext($hg(puncs)) punctuations and $ptext($hg(smilies)) smilies. }
  1076.     elseif ($2 == words) {
  1077.       if ($hfind(stats,custom.*,0,w)) {
  1078.         var %i = 1
  1079.         while (%i <= $hfind(stats,custom.*,0,w)) {
  1080.           var %h = $hfind(stats,custom.*,%i,w)
  1081.           var %w = %w $+(',$gettok(%h,2,46),') $ptext($hg(%h)) times $+ $iif((!%w) && ($hfind(stats,custom.*,0,w) != 1),$chr(44))
  1082.           inc %i
  1083.         }
  1084.         var %e = OWN WORDS: Since $hg(firstdate) I've recoded I typed the word %w
  1085.       }
  1086.       else { var %e = STATS: Currently I am not keeping track of any words I'm typing. }
  1087.     }
  1088.     elseif ($2 == been) { var %e = BEEN STATS: Since $hg(been.date) times I've been: oped: $ptext($hg(been.oped)) $+ , deoped: $ptext($hg(been.deoped)) $+ , halfoped: $ptext($hg(been.halfoped)) $+ , dehalfoped: $ptext($hg(been.dehalfoped)) $+ , voiced: $ptext($hg(been.voiced)) $+ , devoiced: $ptext($hg(been.devoiced)) $+ , kicked: $ptext($hg(been.kicked)) $+ , banned: $ptext($hg(been.banned)) }
  1089.     elseif ($2 == have) { var %e = HAVE STATS: Since $hg(have.date) times I have: oped: $ptext($hg(have.oped)) $+ , deoped: $ptext($hg(have.deoped)) $+ , halfoped: $ptext($hg(have.halfoped)) $+ , dehalfoped: $ptext($hg(have.dehalfoped)) $+ , voiced: $ptext($hg(have.voiced)) $+ , devoiced: $ptext($hg(have.devoiced)) $+ , kicked: $ptext($hg(have.kicked)) $+ , banned: $ptext($hg(have.banned)) $+ , changed nick: $ptext($hg(have.nick)) $+ , set a topic: $ptext($hg(have.topic)) $+ , joined a channel: $ptext($hg(have.joined)) $+ , parted a channel: $ptext($hg(have.parted)) $+ , opened a query: $ptext($hg(have.query)) $+ , connected: $ptext($hg(have.connected)) $+ , quit a server: $ptext($hg(have.quit)) }
  1090.     elseif ($2 == seen) { var %e = SEEN STATS: Since $hg(seen.date) times I've seen ppl being: oped: $ptext($hg(seen.oped)) $+ , deoped: $ptext($hg(seen.deoped)) $+ , halfoped: $ptext($hg(seen.halfoped)) $+ , dehalfoped: $ptext($hg(seen.dehalfoped)) $+ , voiced: $ptext($hg(seen.voiced)) $+ , devoiced: $ptext($hg(seen.devoiced)) $+ , kicked: $ptext($hg(seen.kicked)) $+ , banned: $ptext($hg(seen.banned)) $+ , nick change: $ptext($hg(seen.nick)) $+ , topic set: $ptext($hg(seen.topic)) $+ , channel join: $ptext($hg(seen.joined)) $+ , channel part: $ptext($hg(seen.parted)) $+ , server quit: $ptext($hg(seen.quit)) }
  1091.     elseif ($2 == cpu) { var %e = CPU INFO: Processor: $ptext($sinfo(y,cpu)) $+ , Manufacturer: $ptext($sinfo(y,man)) $+ , Megahertz: $ptext($sinfo(y,mhz)) $+ , Cache: $ptext($sinfo(y,cache)) $+ , Load: $ptext($sinfo(y,load)) }
  1092.     elseif ($2 == os) { var %e = OS INFO: Operating System: $ptext($sinfo(y,os)) $+ , Version: $ptext($sinfo(y,osver)) $+ , Build number: $ptext($sinfo(y,osbuild)) $+ , Installed for: $ptext($sinfo(y,osinst)) $+ , Uptime: $ptext($uptime(system,1)) }
  1093.     elseif ($2 == cache) { var %e = CACHE INFO: Size: $ptext($sinfo(y,cachesize)) $+ , Associativity: $ptext($sinfo(y,cacheassoc)) $+ , Lines: $ptext($sinfo(y,cachelines)) $+ , Line size: $ptext($sinfo(y,cachelinesize)) $+ , Instuction size: $ptext($sinfo(y,cacheinstrsize)) $+ , Instruction associativity: $ptext($sinfo(y,cacheinstrassoc)) $+ , Instruction lines: $ptext($sinfo(y,cacheinstrlines)) $+ , Instruction line size: $ptext($sinfo(y,cacheinstrlinesize)) }
  1094.     elseif ($2 == con) { var %e = CONNECTION INFO: Connection: $ptext($sinfo(y,con)) $+ , Speed: $ptext($sinfo(y,conspeed)) $+ , Downloaded: $ptext($sinfo(y,condown)) $+ , Uploaded: $ptext($sinfo(y,conup)) $+ , Active for: $ptext($sinfo(y,conactive)) $+ , IP: $ptext($ip) }
  1095.     elseif ($2 == eth) { var %e = NETWORK INFO: Name: $ptext($sinfo(y,eth)) $+ , Speed: $ptext($sinfo(y,ethspeed)) $+ , Recieved: $ptext($sinfo(y,ethget)) $+ , Sent: $ptext($sinfo(y,ethsent)) }
  1096.     elseif ($2 == gfx) { var %e = GFX INFO: gfx card: $ptext($sinfo(y,gfx)) $+ , resolution: $ptext($sinfo(y,gfxres)) $+ , refresh rate: $ptext($sinfo(y,gfxref)) $+ , depth: $ptext($sinfo(y,gfxdepth)) }
  1097.     elseif ($2 == custom) { var %e = $eval($hg(echo.custom),2) }
  1098.     elseif ($2 == page) {
  1099.       if ($hg(webonline)) { var %e = PAGE: My webpage is at: $hg(webonline) }
  1100.       else { var %e = PAGE: My webpage is currently offline. }
  1101.     }
  1102.     if (%e) {
  1103.       if ($hg(colorctcp)) { .ctcpreply $nick %e }
  1104.       else { .ctcpreply $nick $strip(%e) }
  1105.       hi ctcps 1
  1106.       if ($dialog(stats2)) && ($hg(autoupdate)) { stats.update e 6 ctcps }
  1107.     }
  1108.   }
  1109. }
  1110.  
  1111. ;################# configuration dialog ####################
  1112.  
  1113. dialog -l statsconf {
  1114.   title "mIRC Stats v4.61 - Configuration"
  1115.   size $position(config) 230 130
  1116.   option dbu
  1117.  
  1118.   list 1, 2 4 60 111, size
  1119.   button "ok", 2, 156 117 35 12, ok
  1120.   button "cancel", 3, 193 117 35 12, cancel
  1121.  
  1122.   tab "general", 4, 300 200 0 0
  1123.   tab "echoing", 5
  1124.   tab "data", 6
  1125.   tab "positioning", 7
  1126.   tab "weboptions", 8
  1127.   tab "personal", 9
  1128.   tab "contact", 10
  1129.   tab "about", 13
  1130.   tab "misc", 14
  1131.   tab "webpage", 15
  1132.  
  1133.   box "Custom Words", 38, 65 1 163 72, tab 4
  1134.   list 39, 70 10 154 49, tab 4 size
  1135.   button "add", 40, 70 60 20 10, tab 4
  1136.   button "reset", 41, 92 60 20 10, tab 4
  1137.   button "del", 42, 204 60 20 10, tab 4
  1138.   box "Menu's", 43, 65 76 163 39, tab 4
  1139.   check "Menubar", 44, 74 85 30 8, tab 4
  1140.   check "Status", 45, 74 94 30 8, tab 4
  1141.   check "Channel", 46, 130 85 30 8, tab 4
  1142.   check "Query", 47, 130 94 30 8, tab 4
  1143.   check "Nicklist", 48, 180 85 30 8, tab 4
  1144.   check "Show commands", 49, 74 104 60 8, tab 4
  1145.  
  1146.   box "Miscellaneous", 21, 65 1 163 72, tab 14
  1147.   check "Enable CTCP replying", 22, 74 10 70 8, tab 14
  1148.   check "Enable lag meter", 30, 150 10 50 8, tab 14
  1149.   check "Use grids in listviews", 23, 74 20 70 8, tab 14
  1150.   check "US format dates", 31, 150 20 50 8, tab 14
  1151.   check "Auto-update stats", 24, 74 50 70 8, tab 14
  1152.   check "Use classic server view", 32, 150 30 70 8, tab 14
  1153.   check "Dialogs on desktop", 28, 74 30 70 8, tab 14
  1154.   check "Dialogs always on top", 29, 74 40 70 8, tab 14
  1155.   check "Save stats every:", 25, 74 60 50 8, tab 14
  1156.   edit "", 26, 130 59 20 10, tab 14 center
  1157.   text "minutes", 27, 153 60 30 8, tab 14
  1158.   button "icons", 34, 150 41 25 10, tab 14
  1159.   button "color", 35, 180 41 25 10, tab 14
  1160.   text "", 36, 0 0 0 0, tab 14 hide
  1161.   box "When opening dialog initiate", 240, 65 76 163 39, tab 14
  1162.   check "Server info", 241, 74 85 45 8, tab 14
  1163.   check "Events", 242, 74 94 45 8, tab 14
  1164.   check "CPU info", 243, 74 103 45 8, tab 14
  1165.   check "L1 Cache info", 244, 130 85 45 8, tab 14
  1166.   check "OS info", 245, 130 94 45 8, tab 14
  1167.   check "HDD info", 246, 130 103 45 8, tab 14
  1168.   check "GFX info", 247, 180 85 45 8, tab 14
  1169.   check "Connection info", 248, 180 94 45 8, tab 14
  1170.   check "Misc info", 249, 180 103 45 8, tab 14
  1171.  
  1172.   box "Options", 51, 65 1 163 30, tab 5
  1173.   radio "Public", 52, 74 10 30 8, tab 5
  1174.   radio "Personal", 53, 120 10 30 8, tab 5
  1175.   check "Use color", 54, 74 19 40 8, tab 5
  1176.   check "Use ctcp color", 64, 120 19 50 8, tab 5
  1177.   box "Parentext", 55, 65 36 163 38, tab 5
  1178.   edit "", 56, 74 46 70 10, autohs tab 5
  1179.   button "", 57, 74 58 70 10, tab 5
  1180.   edit "", 58, 148 46 73 10, autohs tab 5
  1181.   button "", 59, 148 58 73 10, tab 5
  1182.   box "Custom line", 60, 65 74 163 41, tab 5
  1183.   edit "", 61, 74 85 148 10, autohs tab 5
  1184.   button "", 62, 74 97 148 10, tab 5
  1185.  
  1186.   box "Reset", 191, 65 1 163 65, tab 6
  1187.   text "Events:", 192, 74 12 20 8, tab 6
  1188.   edit "", 193, 110 11 70 10, tab 6 disable
  1189.   button "reset", 194, 185 11 20 10, tab 6
  1190.   text "Been:", 195, 74 24 20 8, tab 6
  1191.   edit "", 196, 110 23 70 10, tab 6 disable
  1192.   button "reset", 197, 185 23 20 10, tab 6
  1193.   text "Have:", 198, 74 35 20 8, tab 6
  1194.   edit "", 199, 110 34 70 10, tab 6 disable
  1195.   button "reset", 200, 185 34 20 10, tab 6
  1196.   text "Seen:", 201, 74 46 20 8, tab 6
  1197.   edit "", 202, 110 45 70 10, tab 6 disable
  1198.   button "reset", 203, 185 45 20 10, tab 6
  1199.  
  1200.   box "Stats", 207, 65 68 50 47, tab 6
  1201.   button "save", 208, 74 77 30 10, tab 6
  1202.   button "back-up", 209, 74 88 30 10, tab 6
  1203.   button "import", 210, 74 99 30 10, tab 6
  1204.   box "Update", 211, 121 68 107 47, tab 6
  1205.   button "check for updates", 212, 170 77 50 10, tab 6
  1206.   text "Current version:", 213, 126 90 40 8, tab 6
  1207.   edit "4.61 (13/06/2004)", 214, 170 89 50 10, tab 6 disable
  1208.   text "Latest version:", 215, 126 102 40 8, tab 6
  1209.   edit "", 216, 170 101 50 10, tab 6 disable
  1210.   button "download", 217, 170 77 50 10, tab 6 hide
  1211.  
  1212.   box "Coˆrdinates", 78, 65 1 163 75, tab 7
  1213.   radio "Default", 71, 74 16 30 8, tab 7 group
  1214.   radio "Derive coˆrds from last usage", 72, 74 27 80 8, tab 7
  1215.   radio "Specify", 73, 74 39 30 8, tab 7
  1216.   text "X:", 74, 90 49 8 8, tab 7
  1217.   edit "", 75, 100 48 30 10, tab 7
  1218.   text "Y:", 76, 90 61 8 8, tab 7
  1219.   edit "", 77, 100 60 30 10, tab 7
  1220.   box "Apply for", 180, 65 80 163 35, tab 7
  1221.   check "Stats dialog", 181, 74 90 40 8, tab 7
  1222.   check "Configuration dialog", 182, 74 100 60 8, tab 7
  1223.   check "Been dialog", 183, 135 90 40 8, tab 7
  1224.   check "Have dialog", 184, 135 100 40 8, tab 7
  1225.   check "Seen dialog", 185, 176 90 40 8, tab 7
  1226.  
  1227.   box "Webpage", 270, 65 1 163 114, tab 15
  1228.   text "Webpage:", 271, 74 11 40 8, tab 15
  1229.   combo 272, 110 10 110 10, drop tab 15
  1230.   text "", 284, 71 23 153 1, tab 15
  1231.   text "Name:", 273, 74 28 30 8, tab 15
  1232.   text "", 274, 110 28 110 8, tab 15
  1233.   text "Version:", 275, 74 38 30 8, tab 15
  1234.   text "", 276, 110 38 110 8, tab 15
  1235.   text "Author:", 277, 74 48 30 8, tab 15
  1236.   text "", 278, 110 48 110 8, tab 15
  1237.   text "E-mail:", 279, 74 58 30 8, tab 15
  1238.   link "", 280, 110 58 110 8, tab 15
  1239.   text "Website:", 281, 74 68 30 8, tab 15
  1240.   link "", 282, 110 68 110 8, tab 15
  1241.   edit "", 283, 74 81 146 30, tab 15 multi return vsbar read
  1242.  
  1243.   box "Display", 81, 65 1 163 55, tab 8
  1244.   text "Window title:", 82, 74 10 40 8, tab 8
  1245.   edit "", 83, 110 9 110 10, autohs tab 8
  1246.   text "Page title:", 84, 74 21 40 8, tab 8
  1247.   edit "", 85, 110 20 110 10, autohs tab 8
  1248.   text "Top pic url:", 86, 74 32 40 8, tab 8
  1249.   edit "", 87, 110 31 110 10, autohs tab 8
  1250.   text "Bottom pic url:", 88, 74 43 40 8, tab 8
  1251.   edit "", 89, 110 42 110 10, autohs tab 8
  1252.   box "Show", 90, 65 57 163 28, tab 8
  1253.   check "Time", 91, 74 65 40 8, tab 8
  1254.   check "Private chans", 92, 120 65 40 8, tab 8
  1255.   check "Secret chans", 93, 120 74 40 8, tab 8
  1256.   check "Counters", 94, 74 74 40 8, tab 8
  1257.   check "System Stats", 95, 170 65 40 8, tab 8
  1258.   check "Server info", 119, 170 74 40 8, tab 8
  1259.   box "Other options", 96, 65 87 163 28, tab 8
  1260.   check "Report connections to the page", 97, 74 95 100 8, tab 8
  1261.   check "Launch page when starting mIRC on port:", 98, 74 104 110 8, tab 8
  1262.   edit "", 99, 190 102 30 10, tab 8 autohs center
  1263.  
  1264.   box "Personal Information", 100, 64 1 164 114, tab 9
  1265.   text "Nickname:", 101, 74 11 40 8, tab 9
  1266.   edit "", 102, 110 10 110 10, autohs tab 9
  1267.   text "Alt-Nickname:", 103, 74 23 40 8, tab 9
  1268.   edit "", 104, 110 22 110 10, autohs tab 9
  1269.   text "Full name:", 105, 74 34 40 8, tab 9
  1270.   edit "", 106, 110 33 110 10, autohs tab 9
  1271.   text "Location", 107, 74 45 40 8, tab 9
  1272.   edit "", 108, 110 44 110 10, autohs tab 9
  1273.   text "Age:", 109, 74 56 40 8, tab 9
  1274.   edit "", 110, 110 55 15 10, tab 9 limit 2
  1275.   radio "Male", 111, 140 56 20 8, tab 9 group
  1276.   radio "Female", 112, 170 56 25 8, tab 9
  1277.   text "Hobbies:", 113, 74 74 40 8, tab 9
  1278.   edit "", 114, 110 73 110 10, autohs tab 9
  1279.   text "Occupation:", 115, 74 85 40 8, tab 9
  1280.   edit "", 116, 110 84 110 10, autohs tab 9
  1281.   text "Bio:", 117, 74 96 40 8, tab 9
  1282.   edit "", 118, 110 95 110 10, autohs tab 9
  1283.  
  1284.   box "Contact Information", 120, 64 1 164 114, tab 10
  1285.   text "Email Address:", 121, 74 11 40 8, tab 10
  1286.   edit "", 122, 110 10 110 10, autohs tab 10
  1287.   text "Website:", 123, 74 22 40 8, tab 10
  1288.   edit "", 124, 110 21 110 10, autohs tab 10
  1289.   text "MSN addy:", 125, 74 35 40 8, tab 10
  1290.   edit "", 126, 110 34 110 10, autohs tab 10
  1291.   text "AIM nick:", 127, 74 46 40 8, tab 10
  1292.   edit "", 128, 110 45 110 10, autohs tab 10
  1293.   text "ICQ number:", 129, 74 57 40 8, tab 10
  1294.   edit "", 130, 110 56 110 10, autohs tab 10
  1295.   text "Yahoo addy:", 131, 74 68 40 8, tab 10
  1296.   edit "", 132, 110 67 110 10, autohs tab 10
  1297.   text "IRC networks:", 133, 74 80 40 8, tab 10
  1298.   edit "", 134, 110 79 110 10, autohs tab 10
  1299.   text "IRC channels:", 135, 74 91 40 8, tab 10
  1300.   edit "", 136, 110 90 110 10, autohs tab 10
  1301.   text "IRC nicks:", 137, 74 102 40 8, tab 10
  1302.   edit "", 138, 110 101 110 10, autohs tab 10
  1303.  
  1304.   box "About mIRC Stats", 220, 64 1 164 114, tab 13
  1305.   text "mIRC StatsÆ v4.61", 221, 74 15 50 8, tab 13
  1306.   text "Copyright © 2003", 222, 74 30 50 8, tab 13
  1307.   text "Voice of Power - Marc Kuiper", 223, 74 38 100 8, tab 13
  1308.   text "mIRC.net, mIRCScripts.org, ScriptsDB.org, mIRCSource.com or Hawkee.com;              depending where downloaded.", 224, 74 45 120 24, tab 13
  1309.   text "All rights reserved.", 225, 74 68 50 8, tab 13
  1310.   text "Written by", 226, 74 85 27 8, tab 13
  1311.   link "Voice of Power", 227, 102 85 40 8, tab 13
  1312.   text "mIRCÆ v6.15                   Copyright © 1995-2003         mIRC Co. Ltd.                     All rights reserved.", 228, 165 85 70 30, tab 13
  1313. }
  1314. on *:dialog:mstatsconf:*:*:{
  1315.   if ($devent == init) {
  1316.     smdx SetMircVersion $version
  1317.     smdx MarkDialog $dname
  1318.     smdx SetControlMDX $dname 1 TreeView haslines hasbuttons linesatroot > $sviews
  1319.  
  1320.     did -a $dname 1 +e General
  1321.     did -i $dname 1 1 cb root 2
  1322.     did -a $dname 1 Misc
  1323.     did -a $dname 1 Echoing
  1324.     did -a $dname 1 Data
  1325.     did -a $dname 1 Positioning
  1326.     did -i $dname 1 1 cb root
  1327.     did -a $dname 1 +e Webpage
  1328.     did -i $dname 1 1 cb root 3
  1329.     did -a $dname 1 Options
  1330.     did -a $dname 1 Personal
  1331.     did -a $dname 1 Contact
  1332.     did -i $dname 1 1 cb root
  1333.     did -a $dname 1 About
  1334.  
  1335.     smdx SetControlMDX $dname 39 ListView report labeltip showsel single rowselect $iif($hg(grids),grid) noheader > $sviews
  1336.     did -i $dname 39 1 headerdims 225:1 62:2
  1337.  
  1338.     if (config isin $hg(disp.color.apply)) {
  1339.       if (back isin $hg(disp.color.apply)) { did -i $dname 1 1 setcolor bkg $gettok($hg(disp.color),1,32) }
  1340.       if (text isin $hg(disp.color.apply)) { did -i $dname 1 1 setcolor text $gettok($hg(disp.color),2,32) }
  1341.       if (line isin $hg(disp.color.apply)) { did -i $dname 1 1 setcolor line $gettok($hg(disp.color),3,32) }
  1342.     }
  1343.     if (words isin $hg(disp.color.apply)) {
  1344.       if (back isin $hg(disp.color.apply)) { did -i $dname 39 1 setbkg color $gettok($hg(disp.color),1,32) }
  1345.       if (back isin $hg(disp.color.apply)) { did -i $dname 39 1 settxt bgcolor $gettok($hg(disp.color),1,32) }
  1346.       if (text isin $hg(disp.color.apply)) { did -i $dname 39 1 settxt color $gettok($hg(disp.color),2,32) }
  1347.     }
  1348.  
  1349.     if ($hfind(stats,custom.*,0,w)) {
  1350.       var %c = 1
  1351.       while (%c <= $hfind(stats,custom.*,0,w)) {
  1352.         var %h = $hfind(stats,custom.*,%c,w)
  1353.         did -a $dname 39 0 0 0 0 $gettok(%h,2,46)   0 0 0 $hg(%h)
  1354.         inc %c
  1355.       }
  1356.     }
  1357.     if ($hg(menu.menubar)) { did -c $dname 44 }
  1358.     if ($hg(menu.status)) { did -c $dname 45 }
  1359.     if ($hg(menu.channel)) { did -c $dname 46 }
  1360.     if ($hg(menu.query)) { did -c $dname 47 }
  1361.     if ($hg(menu.nicklist)) { did -c $dname 48 }
  1362.     if ($hg(menu.commands)) { did -c $dname 49 }
  1363.  
  1364.     if ($hg(ctcp)) { did -c $dname 22 }
  1365.     if ($hg(grids)) { did -c $dname 23 }
  1366.     if ($hg(autoupdate)) { did -c $dname 24 }
  1367.     if ($hg(saveevery)) { did -c $dname 25 }
  1368.     did -a $dname 26 $hg(saveeverynum)
  1369.     if ($hg(desktop)) { did -c $dname 28 }
  1370.     if ($hg(ontop)) { did -c $dname 29 }
  1371.     if ($hg(checklag)) { did -c $dname 30 }
  1372.     if ($hg(usdate)) { did -c $dname 31 }
  1373.     if ($hg(disp.servers) == classic) { did -c $dname 32 }
  1374.     if (server isin $hg(init)) { did -c $dname 241 }
  1375.     if (events isin $hg(init)) { did -c $dname 242 }
  1376.     if (cpu isin $hg(init)) { did -c $dname 243 }
  1377.     if (cache isin $hg(init)) { did -c $dname 244 }
  1378.     if (os isin $hg(init)) { did -c $dname 245 }
  1379.     if (hdd isin $hg(init)) { did -c $dname 246 }
  1380.     if (gfx isin $hg(init)) { did -c $dname 247 }
  1381.     if (con isin $hg(init)) { did -c $dname 248 }
  1382.     if (misc isin $hg(init)) { did -c $dname 249 }
  1383.  
  1384.     window -hl @stats.paren1
  1385.     window -hl @stats.paren2
  1386.     window -hl @stats.custom
  1387.     smdx SetControlMDX $dname 57,59,62 window > $sdialog
  1388.     did -a $dname 57 grab $window(@stats.paren1).hwnd @stats.paren1
  1389.     did -a $dname 59 grab $window(@stats.paren2).hwnd @stats.paren2
  1390.     did -a $dname 62 grab $window(@stats.custom).hwnd @stats.custom
  1391.     if ($hg(echo) == public) { did -c $dname 52 }
  1392.     elseif ($hg(echo) == personal) { did -c $dname 53 }
  1393.     if ($hg(color)) { did -c $dname 54 }
  1394.     if ($hg(colorctcp)) { did -c $dname 64 }
  1395.     did -a $dname 56 $hg(echo.parentext1)
  1396.     if ($did(56)) { aline @stats.paren1 $replace($did(56),<text>,mIRC Stats) }
  1397.     did -a $dname 58 $hg(echo.parentext2)
  1398.     if ($did(58)) { aline @stats.paren2 $replace($did(58),<text>,value) }
  1399.     did -a $dname 61 $replace($hg(echo.custom),<text>,value)
  1400.     if ($did(61)) { aline @stats.custom $eval($did(61),2) }
  1401.  
  1402.     did -a $dname 193 last: $iif($hg(firstdate),$ifmatch,n/a)
  1403.     did -a $dname 196 last: $iif($hg(been.date),$ifmatch,n/a)
  1404.     did -a $dname 199 last: $iif($hg(have.date),$ifmatch,n/a)
  1405.     did -a $dname 202 last: $iif($hg(seen.date),$ifmatch,n/a)
  1406.  
  1407.     smdx SetControlMDX $dname 75,77 UpDown arrowkeys center alignright edit numeric nothousands > $sctl
  1408.     if ($hg(positionc) == default) { did -c $dname 71 }
  1409.     elseif ($hg(positionc) == derive) { did -c $dname 72 }
  1410.     elseif ($hg(positionc) == specify) { did -c $dname 73 }
  1411.     did -i $dname 75 1 $gettok($hg(position),1,32) 0 $window(-1).w 0
  1412.     did -i $dname 77 1 $gettok($hg(position),2,32) 0 $window(-1).h 0
  1413.     if (!$did(73).state) { did -b $dname 74,75,76,77 }
  1414.     if (stats isin $hg(pos.apply)) { did -c $dname 181 }
  1415.     if (config isin $hg(pos.apply)) { did -c $dname 182 }
  1416.     if (been isin $hg(pos.apply)) { did -c $dname 183 }
  1417.     if (have isin $hg(pos.apply)) { did -c $dname 184 }
  1418.     if (seen isin $hg(pos.apply)) { did -c $dname 185 }
  1419.  
  1420.     smdx SetBorderStyle $dname 284 staticedge
  1421.     var %w = $findfile($scriptdirwebpages\,*.msw,0,did -a $dname 272 $nopath($1-))
  1422.     if ($hg(webcurrent)) { did -c $dname 272 $didwm($dname,272,$hg(webcurrent))) }
  1423.     else { did -c $dname 272 1 }
  1424.     did -a $dname 274 $stats.read($did(272).seltext,name)
  1425.     did -a $dname 276 v $+ $stats.read($did(272).seltext,version) (mIRC Stats v $+ $stats.read($did(272).seltext,msversion) $+ )
  1426.     did -a $dname 278 $stats.read($did(272).seltext,author)
  1427.     did -a $dname 280 $stats.read($did(272).seltext,email)
  1428.     did -a $dname 282 $stats.read($did(272).seltext,website)
  1429.     did -a $dname 283 $stats.read($did(272).seltext,description)
  1430.  
  1431.     did -a $dname 83 $hg(webwintitle)
  1432.     did -a $dname 85 $hg(webpagetitle)
  1433.     did -a $dname 87 $hg(webpiclink)
  1434.     did -a $dname 89 $hg(webpiclink2)
  1435.     if ($hg(webshowtime)) { did -c $dname 91 }
  1436.     if ($hg(webshowpriv)) { did -c $dname 92 }
  1437.     if ($hg(webshowsec)) { did -c $dname 93 }
  1438.     if ($hg(webshowcount)) { did -c $dname 94 }
  1439.     if ($hg(webshowsys)) { did -c $dname 95 }
  1440.     if ($hg(webshowserv)) { did -c $dname 119 }
  1441.     if ($hg(webreport)) { did -c $dname 97 }
  1442.     if ($hg(webstart)) { did -c $dname 98 }
  1443.     did -a $dname 99 $hg(webstartport)
  1444.  
  1445.     did -a $dname 102 $hg(webnick)
  1446.     did -a $dname 104 $hg(webanick)
  1447.     did -a $dname 106 $hg(webfullname)
  1448.     did -a $dname 108 $hg(weblocation)
  1449.     did -a $dname 110 $hg(webage)
  1450.     if ($hg(websex) == male) { did -c $dname 111 }
  1451.     elseif ($hg(websex) == female) { did -c $dname 112 }
  1452.     did -a $dname 114 $hg(webhobbies)
  1453.     did -a $dname 116 $hg(webocc)
  1454.     did -a $dname 118 $hg(webbio)
  1455.  
  1456.     did -a $dname 122 $hg(webemail)
  1457.     did -a $dname 124 $hg(webwebsite)
  1458.     did -a $dname 126 $hg(webmsn)
  1459.     did -a $dname 128 $hg(webaim)
  1460.     did -a $dname 130 $hg(webicq)
  1461.     did -a $dname 132 $hg(webyahoo)
  1462.     did -a $dname 134 $hg(webnets)
  1463.     did -a $dname 136 $hg(webchans)
  1464.     did -a $dname 138 $hg(webnicks)
  1465.  
  1466.   }
  1467.   if ($devent == sclick) {
  1468.     if ($did == 1) {
  1469.       tokenize 32 $spage($dname,1).select
  1470.       if ($2 == 2) {
  1471.         if (!$3) { did -f $dname 4 }
  1472.         elseif ($3 == 2) { did -f $dname 14 }
  1473.         elseif ($3 == 3) { did -f $dname 5 }
  1474.         elseif ($3 == 4) { did -f $dname 6 }
  1475.         elseif ($3 == 5) { did -f $dname 7 }
  1476.       }
  1477.       elseif ($2 == 3) {
  1478.         if (!$3) { did -f $dname 15 }
  1479.         elseif ($3 == 2) { did -f $dname 8 }
  1480.         elseif ($3 == 3) { did -f $dname 9 }
  1481.         elseif ($3 == 4) { did -f $dname 10 }
  1482.       }
  1483.       elseif ($2 == 4) { did -f $dname 13 }
  1484.     }
  1485.     if ($did == 2) {
  1486.       ha ctcp $did(22).state
  1487.       ha grids $did(23).state
  1488.       ha autoupdate $did(24).state
  1489.       ha saveevery $did(25).state
  1490.       ha saveeverynum $did(26)
  1491.       ha desktop $did(28).state
  1492.       ha ontop $did(29).state
  1493.       ha checklag $did(30).state
  1494.       ha usdate $did(31).state
  1495.       if ($did(36)) {
  1496.         tokenize 47 $hg(firstdate)
  1497.         ha firstdate $+($2,/,$1,/,$3)
  1498.         tokenize 47 $hg(been.date)
  1499.         ha been.date $+($2,/,$1,/,$3)
  1500.         tokenize 47 $hg(have.date)
  1501.         ha have.date $+($2,/,$1,/,$3)
  1502.         tokenize 47 $hg(seen.date)
  1503.         ha seen.date $+($2,/,$1,/,$3)
  1504.       }
  1505.       if ($did(32).state) { ha disp.servers classic }
  1506.       else { ha disp.servers new }
  1507.       if ($did(241).state) { var %i = server }
  1508.       if ($did(242).state) { var %i = %i events }
  1509.       if ($did(243).state) { var %i = %i cpu }
  1510.       if ($did(244).state) { var %i = %i cache }
  1511.       if ($did(245).state) { var %i = %i os }
  1512.       if ($did(246).state) { var %i = %i hdd }
  1513.       if ($did(247).state) { var %i = %i gfx }
  1514.       if ($did(248).state) { var %i = %i con }
  1515.       if ($did(249).state) { var %i = %i misc }
  1516.       ha init %i
  1517.  
  1518.       ha menu.menubar $did(44).state
  1519.       if ($did(44).state) { .enable #menu.menubar }
  1520.       else { .disable #menu.menubar }
  1521.       ha menu.status $did(45).state
  1522.       if ($did(45).state) { .enable #menu.status }
  1523.       else { .disable #menu.status }
  1524.       ha menu.channel $did(46).state
  1525.       if ($did(46).state) { .enable #menu.channel }
  1526.       else { .disable #menu.channel }
  1527.       ha menu.query $did(47).state
  1528.       if ($did(47).state) { .enable #menu.query }
  1529.       else { .disable #menu.query }
  1530.       ha menu.nicklist $did(48).state
  1531.       if ($did(48).state) { .enable #menu.nicklist }
  1532.       else { .disable #menu.nicklist }
  1533.       ha menu.commands $did(49).state
  1534.  
  1535.       if ($did(52).state) { ha echo public }
  1536.       elseif ($did(53).state) { ha echo personal }
  1537.       ha color $did(54).state
  1538.       ha colorctcp $did(64).state
  1539.       ha echo.parentext1 $did(56)
  1540.       ha echo.parentext2 $did(58)
  1541.       ha echo.custom $did(61)
  1542.  
  1543.       if ($did(71).state) { ha positionc default }
  1544.       elseif ($did(72).state) { ha positionc derive }
  1545.       elseif ($did(73).state) { ha positionc specify }
  1546.       ha position $gettok($did(75),1,32) $gettok($did(77),1,32)
  1547.       ha pos.apply $iif($did(181).state,stats) $iif($did(182).state,config) $iif($did(183).state,been) $iif($did(184).state,have) $iif($did(185).state,seen)
  1548.  
  1549.       ha webwintitle $did(83)
  1550.       ha webpagetitle $did(85)
  1551.       ha webpiclink $did(87)
  1552.       ha webpiclink2 $did(89)
  1553.       ha webshowtime $did(91).state
  1554.       ha webshowpriv $did(92).state
  1555.       ha webshowsec $did(93).state
  1556.       ha webshowcount $did(94).state
  1557.       ha webshowsys $did(95).state
  1558.       ha webshowserv $did(119).state
  1559.       ha webreport $did(97).state
  1560.       ha webstart $did(98).state
  1561.       ha webstartport $did(99)
  1562.  
  1563.       ha webnick $did(102)
  1564.       ha webanick $did(104)
  1565.       ha webfullname $did(106)
  1566.       ha weblocation $did(108)
  1567.       ha webage $did(110)
  1568.       if ($did(111).state == 1) { ha websex male }
  1569.       elseif ($did(112).state == 1) { ha websex female }
  1570.       ha webhobbies $did(114)
  1571.       ha webocc $did(116)
  1572.       ha webbio $did(118)
  1573.  
  1574.       ha webemail $did(122)
  1575.       ha webwebsite $did(124)
  1576.       ha webmsn $did(126)
  1577.       ha webaim $did(128)
  1578.       ha webicq $did(130)
  1579.       ha webyahoo $did(132)
  1580.       ha webnets $did(134)
  1581.       ha webchans $did(136)
  1582.       ha webnicks $did(138)
  1583.  
  1584.       if ($findfile($scriptdirwebpages,* $+ $stats.read($did(272).seltext,script),1,var %file = $1-)) {
  1585.         if ($script($hg(webcurscript))) { .unload -rs $ifmatch }
  1586.  
  1587.         .load -rs $+(",%file,")
  1588.         ha webcurrent $did(272).seltext
  1589.         ha webcurname $stats.read($did(272).seltext,name)
  1590.         ha webcurauthor $stats.read($did(272).seltext,author)
  1591.         ha webcuremail $stats.read($did(272).seltext,email)
  1592.         ha webcurwebsite $stats.read($did(272).seltext,website)
  1593.         ha webcurdesc $stats.read($did(272).seltext,description)
  1594.         ha webcurver $stats.read($did(272).seltext,version)
  1595.         ha webcurmsver $stats.read($did(272).seltext,msversion)
  1596.         ha webcurscript %file
  1597.         ha webcuralias $stats.read($did(272).seltext,alias)
  1598.       }
  1599.     }
  1600.     if ($did == 31) { did -ra $dname 36 1 }
  1601.     if ($did == 34) { stats icons }
  1602.     if ($did == 35) { stats color }
  1603.     if ($did == 40) {
  1604.       var %w = $$input(Specify a word you wish to record.,eq,Custom Words)
  1605.       if ($hg(custom. $+ $gettok(%w,1,32))) {
  1606.         var %e = $input($+(',%w,') already exists $+ $chr(44) do you wish to reset it?,yq,Custom Words)
  1607.         if (%e) { ha custom. $+ %w 0 }
  1608.       }
  1609.       else {
  1610.         ha custom. $+ %w 0
  1611.         did -a $dname 39 0 0 0 0 %w     0 0 0 $hg(custom. $+ %w)
  1612.       }
  1613.     }
  1614.     if ($did == 41) {
  1615.       var %w = $input(Are you sure you wish to reset $+(',$cell($dname,39,$did(39).sel,1),') ?,yq,Custom Words)
  1616.       if (%w) {
  1617.         ha custom. $+ $cell($dname,39,$did(39).sel,1) 0
  1618.         did -o $dname 39 $did(39).sel 0 0 0 0 $cell($dname,39,$did(39).sel,1)   0 0 0 0
  1619.       }
  1620.     }
  1621.     if ($did == 42) {
  1622.       var %w = $input(Are you sure you wish to delete $+(',$cell($dname,39,$did(39).sel,1),') ?,yq,Custom Words)
  1623.       if (%w) {
  1624.         hdel stats custom. $+ $cell($dname,39,$did(39).sel,1)
  1625.         did -d $dname 39 $did(39).sel
  1626.       }
  1627.     }
  1628.     if ($did == 71) || ($did == 72) { did -b $dname 74,75,76,77 }
  1629.     if ($did == 73) { did -e $dname 74,75,76,77 }
  1630.     if ($did == 194) { resetstats events | did -ra $dname 193 last: $hg(firstdate) }
  1631.     if ($did == 197) { resetstats been | did -ra $dname 196 last: $hg(been.date) }
  1632.     if ($did == 200) { resetstats have | did -ra $dname 199 last: $hg(have.date) }
  1633.     if ($did == 203) { resetstats seen | did -ra $dname 202 $hg(seen.date) }
  1634.     if ($did == 206) { resetstats webcolor }
  1635.     if ($did == 208) { hsave -o stats $+(",$scriptdirstats.src,") }
  1636.     if ($did == 209) {
  1637.       var %f = $$sfile($scriptdir*.src,Save stats to..,Save)
  1638.       hsave -o stats $+(",%f,")
  1639.     }
  1640.     if ($did == 210) {
  1641.       var %i = $input(Be aware that old files from version 1.0 $+ $chr(44) 1.1 and 2.0 cannot be imported $+ $chr(44) since version 3.0 most stats have been renamed and are used differently $+ $chr(44) make sure the file is valid before you continue. $crlf $crlf If the file is invalid $+ $chr(44) you will have to reset everything for mIRC Stats to function properly. $crlf $crlf Continue?,yi,Import)
  1642.       if (%i) {
  1643.         var %f = $$sfile($scriptdir*.src,Select stats file..,Load)
  1644.         if (!$hget(stats)) { hmake stats 15 }
  1645.         if ($exists($+(",%f,"))) { hload stats $+(",%f,") }
  1646.       }
  1647.     }
  1648.     if ($did == 212) { stats.updatecheck -d }
  1649.     if ($did == 217) { run http://www.voiceofpower.us/scripts/mstats_latest.zip }
  1650.     if ($did == 227) { run mailto:marckuiper@hotmail.com }
  1651.     if ($did == 272) {
  1652.       did -ra $dname 274 $stats.read($did(272).seltext,name)
  1653.       did -ra $dname 276 v $+ $stats.read($did(272).seltext,version) (mIRC Stats v $+ $stats.read($did(272).seltext,msversion) $+ )
  1654.       did -ra $dname 278 $stats.read($did(272).seltext,author)
  1655.       did -ra $dname 280 $stats.read($did(272).seltext,email)
  1656.       did -ra $dname 282 $stats.read($did(272).seltext,website)
  1657.       did -ra $dname 283 $stats.read($did(272).seltext,description)
  1658.     }
  1659.   }
  1660.   if ($devent == edit) {
  1661.     if ($did == 56) {
  1662.       clear @stats.paren1
  1663.       if ($did(56)) { aline @stats.paren1 $replace($ifmatch,<text>,mIRC Stats) }
  1664.     }
  1665.     if ($did == 58) {
  1666.       clear @stats.paren2
  1667.       if ($did(58)) { aline @stats.paren2 $replace($ifmatch,<text>,value) }
  1668.     }
  1669.     if ($did == 61) {
  1670.       clear @stats.custom
  1671.       if ($did(61)) { aline @stats.custom $eval($ifmatch,2) }
  1672.     }
  1673.   }
  1674.   if ($devent == close) { ha pos.config $dialog(statsconf).x $dialog(statsconf).y }
  1675. }
  1676.  
  1677. dialog -l stats.icons {
  1678.   title "mIRC Stats 4.61 - Icons"
  1679.   size -1 -1 147 149
  1680.   option dbu
  1681.  
  1682.   text "Server:", 1, 2 5 30 8
  1683.   icon 2, 35 1 30 20
  1684.   edit "", 3, 55 4 63 10, read autohs
  1685.   button "change", 4, 120 4 25 10
  1686.   text "Channel:", 5, 2 28 30 8
  1687.   icon 6, 35 24 30 20
  1688.   edit "", 7, 55 27 63 10, read autohs
  1689.   button "change", 8, 120 27 25 10
  1690.   text "Query:", 9, 2 51 30 8
  1691.   icon 10, 35 47 30 20
  1692.   edit "", 11, 55 50 63 10, read autohs
  1693.   button "change", 12, 120 50 25 10
  1694.   text "Hard Disk:", 13, 2 74 30 8
  1695.   icon 14, 35 70 30 20
  1696.   edit "", 15, 55 73 63 10, read autohs
  1697.   button "change", 16, 120 73 25 10
  1698.   text "CDrom:", 17, 2 97 30 8
  1699.   icon 18, 35 93 30 20
  1700.   edit "", 19, 55 96 63 10, read autohs
  1701.   button "change", 20, 120 96 25 10
  1702.   text "Removable:", 21, 2 120 30 8
  1703.   icon 22, 35 116 30 20
  1704.   edit "", 23, 55 119 63 10, read autohs
  1705.   button "change", 24, 120 119 25 10
  1706.  
  1707.   box "", 25, -5 130 200 100
  1708.   button "default", 26, 75 135 30 12
  1709.   button "ok", 27, 40 135 30 12, ok
  1710. }
  1711. on *:dialog:mstats.icons:*:*:{
  1712.   if ($devent == init) {
  1713.     did -g $dname 2 $gettok($icon(serv),1,44) $gettok($icon(serv),2,44)
  1714.     did -a $dname 3 $icon(serv)
  1715.     did -g $dname 6 $gettok($icon(chan),1,44) $gettok($icon(chan),2,44)
  1716.     did -a $dname 7 $icon(chan)
  1717.     did -g $dname 10 $gettok($icon(query),1,44) $gettok($icon(query),2,44)
  1718.     did -a $dname 11 $icon(query)
  1719.     did -g $dname 14 $gettok($icon(hd),1,44) $gettok($icon(hd),2,44)
  1720.     did -a $dname 15 $icon(hd)
  1721.     did -g $dname 18 $gettok($icon(cd),1,44) $gettok($icon(cd),2,44)
  1722.     did -a $dname 19 $icon(cd)
  1723.     did -g $dname 22 $gettok($icon(rm),1,44) $gettok($icon(rm),2,44)
  1724.     did -a $dname 23 $icon(rm)
  1725.   }
  1726.   if ($devent == sclick) {
  1727.     if ($did == 4) { icons serv }
  1728.     if ($did == 8) { icons chan }
  1729.     if ($did == 12) { icons query }
  1730.     if ($did == 16) { icons hd }
  1731.     if ($did == 20) { icons cd }
  1732.     if ($did == 24) { icons rm }
  1733.     if ($did == 26) {
  1734.       did -ra stats.icons 3 0, $+ $shortfn($scriptdiricons\) $+ serv.ico
  1735.       did -g stats.icons 2 $shortfn($scriptdiricons\) $+ serv.ico 0
  1736.       ha icon.serv 0, $+ $shortfn($scriptdiricons\) $+ serv.ico
  1737.       did -ra stats.icons 7 0, $+ $shortfn($scriptdiricons\) $+ chan.ico
  1738.       did -g stats.icons 6 $shortfn($scriptdiricons\) $+ chan.ico 0
  1739.       ha icon.chan 0, $+ $shortfn($scriptdiricons\) $+ chan.ico
  1740.       did -ra stats.icons 11 0, $+ $shortfn($scriptdiricons\) $+ query.ico
  1741.       did -g stats.icons 10 $shortfn($scriptdiricons\) $+ query.ico 0
  1742.       ha icon.query 0, $+ $shortfn($scriptdiricons\) $+ query.ico
  1743.       did -ra stats.icons 15 0, $+ $shortfn($scriptdiricons\) $+ hd.ico
  1744.       did -g stats.icons 14 $shortfn($scriptdiricons\) $+ hd.ico 0
  1745.       ha icon.hd 0, $+ $shortfn($scriptdiricons\) $+ hd.ico
  1746.       did -ra stats.icons 19 0, $+ $shortfn($scriptdiricons\) $+ cd.ico
  1747.       did -g stats.icons 18 $shortfn($scriptdiricons\) $+ cd.ico 0
  1748.       ha icon.cd 0, $+ $shortfn($scriptdiricons\) $+ cd.ico
  1749.       did -ra stats.icons 23 0, $+ $shortfn($scriptdiricons\) $+ rm.ico
  1750.       did -g stats.icons 22 $shortfn($scriptdiricons\) $+ rm.ico 0
  1751.       ha icon.rm 0, $+ $shortfn($scriptdiricons\) $+ rm.ico
  1752.     }
  1753.   }
  1754. }
  1755.  
  1756. dialog -l stats.icon {
  1757.   size -1 -1 288 340
  1758.   title "Select icon"
  1759.   button "Ok" 1, 135 310 70 23,ok
  1760.   list 2, 8 50 272 255, size
  1761.   button "Cancel" 3, 210 310 70 23, cancel
  1762.   edit "" 4, 8 25 208 22, autohs
  1763.   button "Browse..." 5, 218 25 60 22
  1764.   text "" 6, 10 313 30 15
  1765. }
  1766. on *:dialog:mstats.icon:*:*:{
  1767.   if ($devent == init) {
  1768.     smdx SetMircVersion $version
  1769.     smdx MarkDialog $dname
  1770.     smdx SetControlMDX $dname 2 listview icon single > $sviews
  1771.     did -ba $dname 4 $mircexe
  1772.     did -i $dname 2 1 iconspacing 42 3
  1773.  
  1774.     var %c = $gettok($bdll(cicon,$mircexe),2,32)
  1775.     var %n = 0
  1776.     while (%n <= %c) {
  1777.       did -i $dname 2 1 seticon list %n $+ , $+ $mircexe
  1778.       if (%n > 0) { did -a $dname 2 0 %n 0 0 }
  1779.       inc %n
  1780.     }
  1781.   }
  1782.   if ($devent == sclick) {
  1783.     if ($did == 2) { if ($did($dname,2).sel) { did -ra $dname 6 #: $calc($did($dname,$did).sel -2) } }
  1784.     if ($did == 5) {
  1785.       var %f = $$sfile($scriptdir*.ico;*.icl;*.exe;*.dll,Please select an icon,Choose)
  1786.       did -ra $dname 4 %f
  1787.       var %c = $gettok($bdll(cicon,%f),2,32)
  1788.       var %n = 0
  1789.       did -r $dname 2
  1790.       did -i $dname 2 1 clearicons normal
  1791.       while (%n <= %c) {
  1792.         did -i $dname 2 1 seticon list %n $+ , $+ %f
  1793.         if (%n > 0) { did -a $dname 2 0 %n 0 0 }
  1794.         inc %n
  1795.       }
  1796.     }
  1797.     if ($did == 1) && ($did($dname,2).seltext) {
  1798.       var %g = $gettok($did($dname,2).seltext,3,32)
  1799.       var %i = $calc(%g -1) $+ , $+ $shortfn($nofile($did(4))) $+ $nopath($did(4))
  1800.       if (%icontype == serv) {
  1801.         did -ra stats.icons 3 %i
  1802.         did -g stats.icons 2 $gettok(%i,1,44) $gettok(%i,2,44)
  1803.         ha icon.serv %i
  1804.       }
  1805.       if (%icontype == chan) {
  1806.         did -ra stats.icons 7 %i
  1807.         did -g stats.icons 6 $gettok(%i,1,44) $gettok(%i,2,44)
  1808.         ha icon.chan %i
  1809.       }
  1810.       if (%icontype == query) {
  1811.         did -ra stats.icons 11 %i
  1812.         did -g stats.icons 10 $gettok(%i,1,44) $gettok(%i,2,44)
  1813.         ha icon.query %i
  1814.       }
  1815.       if (%icontype == hd) {
  1816.         did -ra stats.icons 15 %i
  1817.         did -g stats.icons 14 $gettok(%i,1,44) $gettok(%i,2,44)
  1818.         ha icon.hd %i
  1819.       }
  1820.       if (%icontype == cd) {
  1821.         did -ra stats.icons 19 %i
  1822.         did -g stats.icons 18 $gettok(%i,1,44) $gettok(%i,2,44)
  1823.         ha icon.cd %i
  1824.       }
  1825.       if (%icontype == rm) {
  1826.         did -ra stats.icon 23 %i
  1827.         did -g stats.icons 22 $gettok(%i,1,44) $gettok(%i,2,44)
  1828.         ha icon.rm %i
  1829.       }
  1830.       unset %icontype
  1831.     }
  1832.   }
  1833. }
  1834.  
  1835. dialog -l stats.color {
  1836.   title "mIRC Stats 4.61 - Color"
  1837.   size -1 -1 106 132
  1838.   option dbu
  1839.  
  1840.   box "Colors", 1, 2 2 102 51
  1841.   check "Back color:", 2, 5 10 35 8
  1842.   check "Text color:", 3, 5 20 35 8
  1843.   check "Line color:", 4, 5 30 35 8
  1844.   button "", 5, 45 10 30 8
  1845.   button "", 6, 45 20 30 8
  1846.   button "", 7, 45 30 30 8
  1847.   combo 8, 80 9 20 8, drop
  1848.   combo 9, 80 19 20 8, drop
  1849.   combo 10, 80 29 20 8, drop
  1850.   button "adapt colors", 11, 5 41 40 10
  1851.   button "preview", 12, 71 41 30 10
  1852.  
  1853.   box "Apply for", 20, 2 54 102 66
  1854.   check "Servers tree", 21, 5 62 40 8
  1855.   check "Servers list", 22, 60 62 40 8
  1856.   check "Channels list", 23, 5 70 40 8
  1857.   check "Queries list", 24, 60 70 40 8
  1858.   check "Events list", 25, 5 78 40 8
  1859.   check "Been list", 26, 60 78 40 8
  1860.   check "Have list", 27, 5 86 40 8
  1861.   check "Seen list", 28, 60 86 40 8
  1862.   check "HDD list", 29, 5 94 40 8
  1863.   check "Misc list", 30, 60 94 40 8
  1864.   check "Echo tree", 33, 5 102 40 8
  1865.   check "Editboxes", 32, 60 102 40 8
  1866.   check "Custom words list", 31, 5 110 52 8
  1867.   check "Config tree", 34, 60 110 40 8
  1868.  
  1869.   button "ok", 40, 40 121 30 10, ok
  1870. }
  1871. on *:dialog:mstats.color:*:*:{
  1872.   if ($devent == init) {
  1873.     smdx SetMircVersion $version
  1874.     smdx MarkDialog $dname
  1875.     smdx SetControlMDX $dname 5,6,7 Text > $sctl
  1876.     smdx SetBorderStyle $dname 5,6,7 border
  1877.     smdx SetColor $dname 5 background $gettok($hg(disp.color),1,32)
  1878.     smdx SetColor $dname 6 background $gettok($hg(disp.color),2,32)
  1879.     smdx SetColor $dname 7 background $gettok($hg(disp.color),3,32)
  1880.     didtok $dname 8,9,10 44 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
  1881.     did -c $dname 8,9,10 1
  1882.  
  1883.     if (back isin $hg(disp.color.apply)) { did -c $dname 2 }
  1884.     if (text isin $hg(disp.color.apply)) { did -c $dname 3 }
  1885.     if (line isin $hg(disp.color.apply)) { did -c $dname 4 }
  1886.     if (servers isin $hg(disp.color.apply)) { did -c $dname 21 }
  1887.     if (serversl isin $hg(disp.color.apply)) { did -c $dname 22 }
  1888.     if (channels isin $hg(disp.color.apply)) { did -c $dname 23 }
  1889.     if (querys isin $hg(disp.color.apply)) { did -c $dname 24 }
  1890.     if (events isin $hg(disp.color.apply)) { did -c $dname 25 }
  1891.     if (been isin $hg(disp.color.apply)) { did -c $dname 26 }
  1892.     if (have isin $hg(disp.color.apply)) { did -c $dname 27 }
  1893.     if (seen isin $hg(disp.color.apply)) { did -c $dname 28 }
  1894.     if (hdd isin $hg(disp.color.apply)) { did -c $dname 29 }
  1895.     if (misc isin $hg(disp.color.apply)) { did -c $dname 30 }
  1896.     if (words isin $hg(disp.color.apply)) { did -c $dname 31 }
  1897.     if (editboxes isin $hg(disp.color.apply)) { did -c $dname 32 }
  1898.     if (echo isin $hg(disp.color.apply)) { did -c $dname 33 }
  1899.     if (config isin $hg(disp.color.apply)) { did -c $dname 34 }
  1900.   }
  1901.   if ($did == 5) { var %c = $colordll($gettok($hg(disp.color),1,32)) | if (%c != $false) { var %o = $gettok($hg(disp.color),2-3,32) | ha disp.color %c %o | smdx SetColor $dname 5 background %c } }
  1902.   if ($did == 6) { var %c = $colordll($gettok($hg(disp.color),2,32)) | if (%c != $false) { var %o = $gettok($hg(disp.color),1,32),%o2 = $gettok($hg(disp.color),3,32) | ha disp.color %o %c %o2 | smdx SetColor $dname 6 background %c } }
  1903.   if ($did == 7) { var %c = $colordll($gettok($hg(disp.color),3,32)) | if (%c != $false) { var %o = $gettok($hg(disp.color),1-2,32) | ha disp.color %o %c | smdx SetColor $dname 7 background %c } }
  1904.   if ($did == 8) { var %c = $color($did(8).seltext) | var %o = $gettok($hg(disp.color),2-3,32) | ha disp.color %c %o | smdx SetColor $dname 5 background %c }
  1905.   if ($did == 9) { var %c = $color($did(9).seltext) | var %o = $gettok($hg(disp.color),1,32),%o2 = $gettok($hg(disp.color),3,32) | ha disp.color %o %c %o2 | smdx SetColor $dname 6 background %c }
  1906.   if ($did == 10) { var %c = $color($did(10).seltext) | var %o = $gettok($hg(disp.color),1-2,32) | ha disp.color %o %c | smdx SetColor $dname 7 background %c }
  1907.   if ($did == 11) {
  1908.     ha disp.color $color($color(back)) $color($color(normal text)) $color($color(action text))
  1909.     smdx SetColor $dname 5 background $gettok($hg(disp.color),1,32)
  1910.     smdx SetColor $dname 6 background $gettok($hg(disp.color),2,32)
  1911.     smdx SetColor $dname 7 background $gettok($hg(disp.color),3,32)
  1912.     did -c $dname 8 $calc($color(back) + 1)
  1913.     did -c $dname 9 $calc($color(normal text) + 1)
  1914.     did -c $dname 10 $calc($color(action tex) + 1)
  1915.   }
  1916.   if ($did == 12) { if (!$dialog(stats.color.prev)) { dialog -m stats.color.prev stats.color.prev } }
  1917.   if ($did == 40) {
  1918.     if ($did(2).state) { var %a = back }
  1919.     if ($did(3).state) { var %a = %a text }
  1920.     if ($did(4).state) { var %a = %a line }
  1921.     if ($did(21).state) { var %a = %a servers }
  1922.     if ($did(22).state) { var %a = %a serversl }
  1923.     if ($did(23).state) { var %a = %a channels }
  1924.     if ($did(24).state) { var %a = %a querys }
  1925.     if ($did(25).state) { var %a = %a events }
  1926.     if ($did(26).state) { var %a = %a been }
  1927.     if ($did(27).state) { var %a = %a have }
  1928.     if ($did(28).state) { var %a = %a seen }
  1929.     if ($did(29).state) { var %a = %a hdd }
  1930.     if ($did(30).state) { var %a = %a misc }
  1931.     if ($did(31).state) { var %a = %a words }
  1932.     if ($did(32).state) { var %a = %a editboxes }
  1933.     if ($did(33).state) { var %a = %a echo }
  1934.     if ($did(34).state) { var %a = %a config }
  1935.     ha disp.color.apply %a
  1936.   }
  1937. }
  1938.  
  1939. dialog -l stats.color.prev {
  1940.   title "Color preview"
  1941.   size -1 -1 177 95
  1942.   option dbu
  1943.   list 1, 2 2 70 80, size
  1944.   list 2, 75 2 100 80, size extsel
  1945.   edit "Editbox", 3, 2 84 70 10
  1946.   button "close", 4, 150 84 25 10, ok
  1947. }
  1948. on *:dialog:mstats.color.prev:*:*:{
  1949.   if ($devent == init) {
  1950.     smdx SetMircVersion $version
  1951.     smdx MarkDialog $dname
  1952.     smdx SetControlMDX $dname 1 TreeView haslines hasbuttons linesatroot showsel > $sviews
  1953.     smdx SetControlMDX $dname 2 ListView report labeltip showsel single rowselect $iif($hg(grids),grid) > $sviews
  1954.  
  1955.     did -a $dname 1 +e TreeView
  1956.     did -i $dname 1 1 cb root 2
  1957.     did -a $dname 1 Branch 1
  1958.     did -a $dname 1 Branch 2
  1959.     did -i $dname 1 1 cb root
  1960.     did -a $dname 1 +e Network
  1961.     did -i $dname 1 1 cb root 3
  1962.     did -a $dname 1 #Channel
  1963.     did -a $dname 1 Query
  1964.     did -i $dname 2 1 headerdims 95:1 50:2 50:3
  1965.     did -i $dname 2 1 headertext Header     Text    Bla
  1966.     did -a $dname 2 This    is  a
  1967.     did -a $dname 2 preview     of  what
  1968.     did -a $dname 2 a   List    View
  1969.     did -a $dname 2 could   look    like
  1970.     did -a $dname 2 :)
  1971.  
  1972.     var %d = stats.color
  1973.     if ($dialog(%d)) {
  1974.       if ($did(%d, 2).state) { did -i $dname 1 1 setcolor bkg $gettok($hg(disp.color),1,32) }
  1975.       if ($did(%d, 3).state) { did -i $dname 1 1 setcolor text $gettok($hg(disp.color),2,32) }
  1976.       if ($did(%d, 4).state) { did -i $dname 1 1 setcolor line $gettok($hg(disp.color),3,32) }
  1977.       if ($did(%d, 2).state) { did -i $dname 2 1 setbkg color $gettok($hg(disp.color),1,32) }
  1978.       if ($did(%d, 2).state) { did -i $dname 2 1 settxt bgcolor $gettok($hg(disp.color),1,32) }
  1979.       if ($did(%d, 3).state) { did -i $dname 2 1 settxt color $gettok($hg(disp.color),2,32) }
  1980.       if ($did(%d, 2).state) { smdx SetColor $dname 3 background $gettok($hg(disp.color),1,32) }
  1981.       if ($did(%d, 2).state) { smdx SetColor $dname 3 textbg $gettok($hg(disp.color),1,32) }
  1982.       if ($did(%d, 3).state) { smdx SetColor $dname 3 text $gettok($hg(disp.color),2,32) }
  1983.     }
  1984.   }
  1985. }
  1986.  
  1987.  
  1988.  
  1989. alias -l stats.updatecheck {
  1990.   if ($portfree(80)) {
  1991.     if ($1 == -d) { did -ra statsconf 216 Contacting... }
  1992.     elseif ($show) { echo -a 10(4!10) Looking for updates... }
  1993.     sockopen $iif($1 == -d, verstatsd, verstats) voiceofpower.us 80
  1994.   }
  1995.   elseif ($1 == -d) { did -ra statsconf 216 Port 80 is in use }
  1996.   elseif ($show) { echo -a 10(4!10) Cannot check for an update, port 80 is in use. }
  1997. }
  1998. on 1:SOCKOPEN:verstat*:{
  1999.   if ($sockerr > 0) {
  2000.     if ($sockname == verstats) { echo -a 10(4!10) An error has occured: $sockerr }
  2001.     else { did -ra statsconf 216 Error connecting }
  2002.   }
  2003.   sockwrite -n $sockname GET /scripts/mstats_versions.txt HTTP/1.1
  2004.   sockwrite -n $sockname Host: voiceofpower.us
  2005.   sockwrite -n $sockname Connection: keep-alive
  2006.   sockwrite $sockname $crlf
  2007.   if ($isfile(verstats.txt)) { .remove verstats.txt }
  2008. }
  2009. on 1:SOCKREAD:verstat*:{
  2010.   if ($sockname == verstatsd) { did -ra statsconf 216 Downloading data... }
  2011.   sockread -f &data
  2012.   bwrite verstats.txt -1 -1 &data
  2013.   .timerverstats 1 1 verstatsclose $iif($sockname == verstatsd, -d)
  2014. }
  2015. alias -l verstatsclose {
  2016.   if ($isfile(verstats.txt)) {
  2017.     if ($hg(usdate)) { var %l = $read(verstats.txt,$lines(verstats.txt)) }
  2018.     else { var %l = $read(verstats.txt,$calc($lines(verstats.txt) - 1)) }
  2019.     if ($1 == -d) { did -h statsconf 212 | did -v statsconf 217 }
  2020.     .remove verstats.txt
  2021.   }
  2022.  
  2023.   if ($1 == -d) { did -ra statsconf 216 $iif(%l, $ifmatch, None found) }
  2024.   else {
  2025.     if ($gettok(%l, 1, 32) > $msver) {
  2026.       echo -a 10(4!10) New version found: %l !
  2027.       echo -a 10(4!10) Download it here: http://www.voiceofpower.us/scripts/mstats_latest.zip
  2028.     }
  2029.   }
  2030.  
  2031.   sockclose verstats $+ $iif($1 == -d, d)
  2032. }
  2033.  
  2034.  
  2035. ;################ the stats dialog ####################
  2036.  
  2037. dialog -l stats2 {
  2038.   title "mIRC Stats v4.61 - Servers"
  2039.   size -1 -1 206 202
  2040.   option dbu
  2041.  
  2042.   tab "Servers", 1, 0 0 206 202
  2043.   tab "Events", 2
  2044.   tab "System Stats", 3
  2045.   tab "Echo", 4
  2046.  
  2047.   box "Current Servers", 11, 2 16 79 184, tab 1
  2048.   list 12, 5 24 71 163, size tab 1
  2049.   button "Refresh", 13, 5 188 25 10, tab 1
  2050.   button "List chans", 14, 48 188 30 10, tab 1
  2051.   box "Server Info", 15, 85 16 119 184, tab 1
  2052.   list 16, 88 24 113 173, size extsel hide tab 1
  2053.   list 17, 88 24 113 163, size extsel tab 1
  2054.   button "Users", 18, 88 188 25 10, hide tab 1
  2055.   button "Bans", 19, 176 188 25 10, hide tab 1
  2056.   button "Power", 20, 88 188 25 10, tab 1
  2057.  
  2058.   box "Current Servers", 21, 2 16 202 65, tab 1 hide
  2059.   list 22, 5 24 195 44, size tab 1 hide
  2060.   box "Channels", 23, 2 81 202 60, tab 1 hide
  2061.   list 24, 5 89 195 49, size tab 1 hide
  2062.   box "Queries", 25, 2 141 202 59, tab 1 hide
  2063.   list 26, 5 149 195 48, size tab 1 hide
  2064.   button "Refresh", 27, 5 69 25 10, tab 1 hide
  2065.   button "List chans", 28, 34 69 30 10, tab 1 hide
  2066.   button "Power", 29, 175 69 25 10, tab 1 hide
  2067.  
  2068.   box "Status / DCC", 31, 2 16 66 70, tab 2
  2069.   text "", 32, 4 24 60 8, tab 2
  2070.   text "DCC:", 33, 4 34 80 8, tab 2
  2071.   text "", 34, 8 42 50 8, tab 2
  2072.   text "", 35, 10 50 50 8, tab 2
  2073.   text "", 36, 8 58 50 8, tab 2
  2074.   text "", 37, 10 66 50 8, tab 2
  2075.   box "Time", 38, 71 16 133 70, tab 2
  2076.   text "Hour:", 39, 74 24 30 8, tab 2
  2077.   edit "", 40, 120 23 30 10, tab 2 read
  2078.   text "", 41, 153 24 40 8, tab 2 disable
  2079.   text "Date:", 42, 74 36 30 8, tab 2
  2080.   edit "", 43, 120 35 80 10, tab 2 read
  2081.   text "Total online:", 44, 74 50 40 8, tab 2
  2082.   edit "", 45, 120 49 80 10, autohs tab 2 read
  2083.   text "mIRC uptime:", 46, 74 62 40 8, tab 2
  2084.   edit "", 47, 120 61 80 10, autohs tab 2 read
  2085.   text "System uptime:", 48, 74 74 50 8, tab 2
  2086.   edit "", 49, 120 73 80 10, autohs tab 2 read
  2087.   box "Events", 51, 2 88 202 112, tab 2
  2088.   list 52, 5 96 196 91, size tab 2
  2089.   button "Been", 53, 5 188 30 10, tab 2
  2090.   button "Have", 54, 37 188 30 10, tab 2
  2091.   button "Seen", 55, 69 188 30 10, tab 2
  2092.   button "Refresh", 56, 176 188 25 10, tab 2
  2093.  
  2094.   list 60, 35 18 140 10, tab 3 size
  2095.   box "CPU", 61, 2 30 104 100, tab 3
  2096.   text "CPU:", 62, 5 38 40 8, tab 3
  2097.   edit "", 63, 43 37 60 10, tab 3 autohs read
  2098.   text "Manufacturer:", 74, 5 49 40 8, tab 3
  2099.   edit "", 75, 43 48 40 10, tab 3 autohs read
  2100.   text "Megahertz:", 64, 5 60 40 8, tab 3
  2101.   edit "", 65, 43 59 40 10, tab 3 autohs read
  2102.   text "Cache:", 66, 5 71 40 8, tab 3
  2103.   edit "", 67, 43 70 40 10, tab 3 autohs read
  2104.   text "Load: 0%", 68, 5 82 37 8, tab 3
  2105.   text "", 69, 43 81 60 10, tab 3
  2106.   text "RAM ammount:", 70, 5 96 40 8, tab 3
  2107.   edit "", 71, 43 95 40 10, tab 3 autohs read
  2108.   text "In use: 0%", 72, 5 107 37 8, tab 3
  2109.   text "", 73, 43 106 60 10, tab 3
  2110.   box "L1 Cache", 87, 109 30 95 100, tab 3
  2111.   text "Size:", 88, 112 38 50 8, tab 3
  2112.   edit "", 89, 151 37 50 10, tab 3 autohs read
  2113.   text "Associativity:", 90, 112 49 50 8, tab 3
  2114.   edit "", 91, 151 48 50 10, tab 3 autohs read
  2115.   text "Lines:", 92, 112 60 50 8, tab 3
  2116.   edit "", 93, 151 59 50 10, tab 3 autohs read
  2117.   text "Line size:", 94, 112 71 50 8, tab 3
  2118.   edit "", 95, 151 70 50 10, tab 3 autohs read
  2119.   text "Instr size:", 96, 112 82 50 8, tab 3
  2120.   edit "", 97, 151 81 50 10, tab 3 autohs read
  2121.   text "Instr assoc:", 98, 112 93 50 8, tab 3
  2122.   edit "", 99, 151 92 50 10, tab 3 autohs read
  2123.   text "Instr lines:", 100, 112 104 50 8, tab 3
  2124.   edit "", 101, 151 103 50 10, tab 3 autohs read
  2125.   text "Instr line size:", 102, 112 115 50 8, tab 3
  2126.   edit "", 103, 151 114 50 10, tab 3 autohs read
  2127.   box "OS", 76, 2 131 149 69, tab 3
  2128.   text "OS:", 77, 5 139 40 8, tab 3
  2129.   edit "", 78, 43 138 100 10, autohs read tab 3
  2130.   text "Version:", 79, 5 150 40 8, tab 3
  2131.   edit "", 80, 43 149 40 10, autohs read tab 3
  2132.   text "Build number:", 81, 5 161 40 8, tab 3
  2133.   edit "", 82, 43 160 40 10, autohs read tab 3
  2134.   text "Installed for:", 83, 5 175 40 8, tab 3
  2135.   edit "", 84, 43 174 100 10, autohs read tab 3
  2136.   text "Uptime:", 85, 5 186 40 8, tab 3
  2137.   edit "", 86, 43 185 100 10, autohs read tab 3
  2138.  
  2139.   box "HDD", 111, 2 30 202 100, tab 3 hide
  2140.   list 112, 5 38 195 88, size extsel tab 3 hide
  2141.   box "GFX", 113, 2 131 149 69, tab 3 hide
  2142.   text "GFX card:", 114, 5 144 40 8, tab 3 hide
  2143.   edit "", 115, 43 143 100 10, autohs read tab 3 hide
  2144.   text "Resolution:", 116, 5 156 40 8, tab 3 hide
  2145.   edit "", 117, 43 155 40 10, autohs read tab 3 hide
  2146.   text "Refresh rate:", 118, 5 168 40 8, tab 3 hide
  2147.   edit "", 119, 43 167 40 10, autohs read tab 3 hide
  2148.   text "Depth:", 120, 5 180 40 8, tab 3 hide
  2149.   edit "", 121, 43 179 40 10, autohs read tab 3 hide
  2150.  
  2151.   box "Dail-up", 122, 2 30 104 70, tab 3 hide
  2152.   text "Connection:", 123, 4 38 40 8, tab 3 hide
  2153.   edit "", 124, 43 37 60 10, autohs read tab 3 hide
  2154.   text "Speed:", 125, 5 50 40 8, tab 3 hide
  2155.   edit "", 126, 43 49 60 10, autohs read tab 3 hide
  2156.   text "Downloaded:", 127, 5 62 40 8, tab 3 hide
  2157.   edit "", 128, 43 61 60 10, autohs read tab 3 hide
  2158.   text "Uploaded:", 129, 5 74 40 8, tab 3 hide
  2159.   edit "", 130, 43 73 60 10, autohs read tab 3 hide
  2160.   text "Active for:", 131, 5 86 40 8, tab 3 hide
  2161.   edit "", 132, 43 85 60 10, autohs read tab 3 hide
  2162.   box "Ethernet", 133, 109 30 95 70, tab 3 hide
  2163.   text "Name:", 134, 112 38 40 8, tab 3 hide
  2164.   edit "", 135, 137 37 64 10, autohs read tab 3 hide
  2165.   text "Speed:", 136, 112 50 40 8, tab 3 hide
  2166.   edit "", 137, 137 49 64 10, autohs read tab 3 hide
  2167.   text "Recieved:", 138, 112 62 40 8, tab 3 hide
  2168.   edit "", 139, 137 61 64 10, autohs read tab 3 hide
  2169.   text "Sent:", 140, 112 74 40 8, tab 3 hide
  2170.   edit "", 141, 137 73 64 10, autohs read tab 3 hide
  2171.   text "IP:", 142, 112 86 40 8, tab 3 hide
  2172.   edit "", 143, 137 85 64 10, autohs read tab 3 hide
  2173.   box "Misc", 144, 2 101 149 99, tab 3 hide
  2174.   list 145, 5 109 142 88, size extsel tab 3 hide
  2175.   box "Bandwidth", 153, 154 101 50 29, tab 3 hide
  2176.   text "Up:", 154, 159 109 20 8, tab 3 hide
  2177.   text "Down:", 155, 159 119 20 8, tab 3 hide
  2178.   text "", 156, 179 109 20 8, tab 3 hide
  2179.   text "", 157, 179 119 20 8, tab 3 hide
  2180.  
  2181.   box "Refresh", 146, 154 131 50 69, tab 3
  2182.   button "CPU/Cache", 147, 162 138 35 10, tab 3
  2183.   button "OS info", 148, 162 148 35 10, tab 3
  2184.   button "HDD info", 149, 162 158 35 10, tab 3
  2185.   button "GFX info", 150, 162 168 35 10, tab 3
  2186.   button "Con info", 151, 162 178 35 10, tab 3
  2187.   button "Misc info", 152, 162 188 35 10, tab 3
  2188.  
  2189.   box "Servers/Channels/Queries", 161, 2 16 104 150, tab 4
  2190.   list 162, 5 24 96 129, size tab 4
  2191.   button "refresh", 163, 5 154 25 10, tab 4
  2192.   box "Basic Options", 164, 2 167 104 33, tab 4
  2193.   radio "Public", 165, 10 177 40 8, tab 4 group
  2194.   radio "Personal", 166, 50 177 40 8, tab 4
  2195.   check "Color", 167, 10 188 40 8, tab 4
  2196.   box "Echo", 171, 109 16 95 120, tab 4
  2197.   button "Servers", 172, 118 24 35 10, tab 4
  2198.   button "Power", 173, 118 35 35 10, tab 4
  2199.   button "Time", 174, 118 46 35 10, tab 4
  2200.   button "Uptime", 175, 118 57 35 10, tab 4
  2201.   button "Events", 176, 118 68 35 10, tab 4
  2202.   button "Text stuff", 177, 118 79 35 10, tab 4
  2203.   button "Own words", 178, 118 90 35 10, tab 4
  2204.   button "Been stats", 179, 118 101 35 10, tab 4
  2205.   button "Have stats", 180, 118 112 35 10, tab 4
  2206.   button "Seen stats", 181, 118 123 35 10, tab 4
  2207.   button "CPU info", 182, 160 24 35 10, tab 4
  2208.   button "OS info", 183, 160 35 35 10, tab 4
  2209.   button "Cache info", 184, 160 46 35 10, tab 4
  2210.   button "HDD info", 185, 160 57 35 10, tab 4
  2211.   button "GFX info", 186, 160 68 35 10, tab 4
  2212.   button "Ccon info", 187, 160 79 35 10, tab 4
  2213.   button "Eth info", 188, 160 90 35 10, tab 4
  2214.   button "Misc info", 189, 160 101 35 10, tab 4
  2215.   button "Custom", 190, 160 123 35 10, tab 4
  2216.   box "Advanced Options", 192, 109 137 95 63, tab 4
  2217.   check "Enable server echoing", 193, 115 145 65 8, tab 4
  2218.   radio "Only in:", 194, 115 157 27 8, tab 4 group
  2219.   radio "Not in:", 195, 115 169 25 8, tab 4
  2220.   radio "Echo in all channels and queries", 196, 115 181 90 8, tab 4
  2221.   edit "", 197, 145 156 57 10, tab 4 autohs
  2222.   edit "", 198, 145 168 57 10, tab 4 autohs
  2223.  
  2224.   menu "&Options", 201
  2225.   item "Configuration", 202, 201
  2226.   item break, 203, 201
  2227.   item "Icons", 204, 201
  2228.   item "Colors", 205, 201
  2229.   item break, 206, 201
  2230.   item "Close", 207, 201
  2231.   menu "&Help", 208
  2232.   item "Help", 209, 208
  2233. }
  2234.  
  2235. on *:dialog:mstats2:*:*:{
  2236.   if ($devent == init) {
  2237.     smdx SetMircVersion $version
  2238.     smdx MarkDialog $dname
  2239.     var %c = smdx SetColor $dname 40,43,45,47,49,63,65,67,71,75,78,80,82,84,86,89,91,93,95,97,99,101,103,115,117,119,121,124,126,128,130,132,135,137,139,141,143
  2240.     if (editboxes isin $hg(disp.color.apply)) {
  2241.       if (back isin $hg(disp.color.apply)) { %c background $gettok($hg(disp.color),1,32) }
  2242.       if (back isin $hg(disp.color.apply)) { %c textbg $gettok($hg(disp.color),1,32) }
  2243.       if (text isin $hg(disp.color.apply)) { %c text $gettok($hg(disp.color),2,32) }
  2244.     }
  2245.     else {
  2246.       %c background $rgb(hilight)
  2247.       %c textbg $rgb(hilight)
  2248.       %c text $rgb(text)
  2249.     }
  2250.     hi viewed 1
  2251.  
  2252.     if ($hg(disp.servers) != classic) {
  2253.       did -h $dname 11,12,13,14,15,16,17,18,19,20
  2254.       did -v $dname 21,22,23,24,25,26,27,28,29
  2255.  
  2256.       smdx SetControlMDX $dname 22,24,26 ListView report labeltip showsel single rowselect $iif($hg(grids),grid) > $sviews
  2257.       did -i $dname 22 1 headerdims 120:1 80:2 80:3 50:4 80:5 80:6 80:7 90:8 90:9 80:10 80:11 80:12 70:13 50:14
  2258.       did -i $dname 22 1 headertext Server  Network     IP address  Port    Chan types  Chan modes  Mode prefix     Mode params     Nickname    Usermodes   Connected   Idle time   Lag     Away
  2259.       did -i $dname 22 1 seticon normal $icon(serv)
  2260.       did -i $dname 24 1 headerdims 80:1 50:2 50:3 50:4 50:5 50:6 100:7 50:8 50:9 50:10 100:11 50:12 50:13
  2261.       did -i $dname 24 1 headertext Channel     Total   Ops     Hops    Voiced  Regs    Topic   Modes   Key     Limit   Logfile     Win ID  Con ID
  2262.       did -i $dname 24 1 seticon normal $icon(chan)
  2263.       did -i $dname 26 1 headerdims 80:1 120:2 70:3 100:4 50:5 50:6
  2264.       did -i $dname 26 1 headertext Nickname    Address     Comchans    Logfile     Win ID  Con ID
  2265.       did -i $dname 26 1 seticon normal $icon(query)
  2266.  
  2267.       if (server isin $hg(init)) { stats.servers.new }
  2268.     }
  2269.     smdx SetControlMDX $dname 12,162 TreeView haslines hasbuttons linesatroot showsel > $sviews
  2270.     did -i $dname 12,162 1 iconsize normal small
  2271.     did -i $dname 12,162 1 seticon normal $icon(serv)
  2272.     did -i $dname 12,162 1 seticon normal $icon(chan)
  2273.     did -i $dname 12,162 1 seticon normal $icon(query)
  2274.     smdx SetControlMDX $dname 16,17 ListView report labeltip showsel single rowselect $iif($hg(grids),grid) noheader > $sviews
  2275.     did -i $dname 16,17 1 headerdims 80:1 140:2
  2276.  
  2277.     if (server isin $hg(init)) {
  2278.       var %s 1
  2279.       while (%s <= $scon(0)) {
  2280.         if ($scon(%s).status == connected) {
  2281.           did -a $dname 12,162 +e 1 1 $scon(%s).server
  2282.           did -i $dname 12,162 1 cb last
  2283.           scon %s stats.servers.chans
  2284.         }
  2285.         inc %s 1
  2286.       }
  2287.       stats.serverinfo 1
  2288.     }
  2289.     if (servers isin $hg(disp.color.apply)) {
  2290.       if (back isin $hg(disp.color.apply)) { did -i $dname 12 1 setcolor bkg $gettok($hg(disp.color),1,32) }
  2291.       if (text isin $hg(disp.color.apply)) { did -i $dname 12 1 setcolor text $gettok($hg(disp.color),2,32) }
  2292.       if (line isin $hg(disp.color.apply)) { did -i $dname 12 1 setcolor line $gettok($hg(disp.color),3,32) }
  2293.     }
  2294.     if (echo isin $hg(disp.color.apply)) {
  2295.       if (back isin $hg(disp.color.apply)) { did -i $dname 162 1 setcolor bkg $gettok($hg(disp.color),1,32) }
  2296.       if (text isin $hg(disp.color.apply)) { did -i $dname 162 1 setcolor text $gettok($hg(disp.color),2,32) }
  2297.       if (line isin $hg(disp.color.apply)) { did -i $dname 162 1 setcolor line $gettok($hg(disp.color),3,32) }
  2298.     }
  2299.     if (serversl isin $hg(disp.color.apply)) {
  2300.       if (back isin $hg(disp.color.apply)) { did -i $dname 16,17,22 1 setbkg color $gettok($hg(disp.color),1,32) }
  2301.       if (back isin $hg(disp.color.apply)) { did -i $dname 16,17,22 1 settxt bgcolor $gettok($hg(disp.color),1,32) }
  2302.       if (text isin $hg(disp.color.apply)) { did -i $dname 16,17,22 1 settxt color $gettok($hg(disp.color),2,32) }
  2303.     }
  2304.     if (channels isin $hg(disp.color.apply)) {
  2305.       if (back isin $hg(disp.color.apply)) { did -i $dname 24 1 setbkg color $gettok($hg(disp.color),1,32) }
  2306.       if (back isin $hg(disp.color.apply)) { did -i $dname 24 1 settxt bgcolor $gettok($hg(disp.color),1,32) }
  2307.       if (text isin $hg(disp.color.apply)) { did -i $dname 24 1 settxt color $gettok($hg(disp.color),2,32) }
  2308.     }
  2309.     if (querys isin $hg(disp.color.apply)) {
  2310.       if (back isin $hg(disp.color.apply)) { did -i $dname 26 1 setbkg color $gettok($hg(disp.color),1,32) }
  2311.       if (back isin $hg(disp.color.apply)) { did -i $dname 26 1 settxt bgcolor $gettok($hg(disp.color),1,32) }
  2312.       if (text isin $hg(disp.color.apply)) { did -i $dname 26 1 settxt color $gettok($hg(disp.color),2,32) }
  2313.     }
  2314.  
  2315.     if (events isin $hg(init)) {
  2316.       smdx SetControlMDX $dname 52 Listview report labeltip showsel single rowselect $iif($hg(grids),grid) > $sviews
  2317.       did -i $dname 52 1 headerdims 95:1 75:2 60:3 69:4 65:5 60:6 69:7
  2318.       did -i $dname 52 1 headertext Event   Times   Per year    Per month   Per week    Per day     % of total
  2319.       .timerstats -o 0 1 stats2
  2320.       stats.events
  2321.     }
  2322.     if (events isin $hg(disp.color.apply)) {
  2323.       if (back isin $hg(disp.color.apply)) { did -i $dname 52 1 setbkg color $gettok($hg(disp.color),1,32) }
  2324.       if (back isin $hg(disp.color.apply)) { did -i $dname 52 1 settxt bgcolor $gettok($hg(disp.color),1,32) }
  2325.       if (text isin $hg(disp.color.apply)) { did -i $dname 52 1 settxt color $gettok($hg(disp.color),2,32) }
  2326.     }
  2327.  
  2328.     smdx SetControlMDX $dname 60 ToolBar flat list wrap nodivider arrows > $sbars
  2329.     smdx SetBorderStyle 60
  2330.     did -i $dname 60 1 bmpsize 0 0
  2331.     did -a $dname 60 +acgx 0 CPU/OS/Cache
  2332.     did -a $dname 60 -
  2333.     did -a $dname 60 +acg 0 HDD/GFX
  2334.     did -a $dname 60 -
  2335.     did -a $dname 60 +acg 0 Connections/Misc
  2336.     smdx SetControlMDX $dname 69,73 ProgressBar smooth > $sctl
  2337.     smdx SetControlMDX $dname 112 ListView report labeltip showsel single rowselect $iif($hg(grids),grid) > $sviews
  2338.     did -i $dname 112 1 headerdims 130:1 70:2 62:3 62:4 62:5
  2339.     did -i $dname 112 1 headertext Drive    Size    Used    Free    % Free
  2340.     did -i $dname 112 1 seticon normal $icon(hd)
  2341.     did -i $dname 112 1 seticon normal $icon(cd)
  2342.     did -i $dname 112 1 seticon normal $icon(rm)
  2343.     smdx SetControlMDX $dname 145 ListView report labeltip showsel single rowselect $iif($hg(grids),grid) noheader > $sviews
  2344.     did -i $dname 145 1 headerdims 217:1 30:2
  2345.  
  2346.     if (hdd isin $hg(disp.color.apply)) {
  2347.       if (back isin $hg(disp.color.apply)) { did -i $dname 112 1 setbkg color $gettok($hg(disp.color),1,32) }
  2348.       if (back isin $hg(disp.color.apply)) { did -i $dname 112 1 settxt bgcolor $gettok($hg(disp.color),1,32) }
  2349.       if (text isin $hg(disp.color.apply)) { did -i $dname 112 1 settxt color $gettok($hg(disp.color),2,32) }
  2350.     }
  2351.     if (misc isin $hg(disp.color.apply)) {
  2352.       if (back isin $hg(disp.color.apply)) { did -i $dname 145 1 setbkg color $gettok($hg(disp.color),1,32) }
  2353.       if (back isin $hg(disp.color.apply)) { did -i $dname 145 1 settxt bgcolor $gettok($hg(disp.color),1,32) }
  2354.       if (text isin $hg(disp.color.apply)) { did -i $dname 145 1 settxt color $gettok($hg(disp.color),2,32) }
  2355.     }
  2356.  
  2357.     if (cpu isin $hg(init)) { stats.cpu }
  2358.     if (cache isin $hg(init)) { stats.cache }
  2359.     if (os isin $hg(init)) { stats.os }
  2360.     if (hdd isin $hg(init)) { stats.hdd }
  2361.     if (gfx isin $hg(init)) { stats.gfx }
  2362.     if (con isin $hg(init)) { stats.con }
  2363.     if (misc isin $hg(init)) { stats.misc }
  2364.  
  2365.     if ($hg(echo) == public) { did -c $dname 165 }
  2366.     elseif ($hg(echo) == personal) { did -c $dname 166 }
  2367.     if ($hg(color)) { did -c $dname 167 }
  2368.     if ($hg(echo.server)) { did -c $dname 193 }
  2369.     if ($hg(echo.chan) == only) { did -c $dname 194 | did -b $dname 198 }
  2370.     elseif ($hg(echo.chan) == not) { did -c $dname 195 | did -b $dname 197 }
  2371.     elseif ($hg(echo.chan) == all) { did -c $dname 196 | did -b $dname 197,198 }
  2372.     did -a $dname 197 $hg(echo.chan.only)
  2373.     did -a $dname 198 $hg(echo.chan.not)
  2374.   }
  2375.   if ($devent == sclick) {
  2376.     if ($did == 1) { dialog -t stats2 mIRC Stats v $+ $msver - Servers }
  2377.     if ($did == 2) { dialog -t stats2 mIRC Stats v $+ $msver - Events }
  2378.     if ($did == 3) { dialog -t stats2 mIRC Stats v $+ $msver - System Stats }
  2379.     if ($did == 4) { dialog -t stats2 mIRC Stats v $+ $msver - Echo }
  2380.     if ($did == 12) {
  2381.       if ($len($right($spage($dname,12).select,-6)) == 1) { did -ra $dname 15 Server info | did -h $dname 16 | did -h $dname 18,19 | did -vr $dname 17 | did -v $dname 20 | tokenize 32 $spage($dname,12).select | stats.serverinfo $calc($2 - 1) }
  2382.       else {
  2383.         if ($left($sbranch($dname,12),1) == $chr(35)) { did -ra $dname 15 Channel info | did -h $dname 16,20 | did -vr $dname 17 | did -v $dname 18,19 | tokenize 32 $spage($dname,12).select | scon $calc($2 - 1) | stats.channelinfo $calc($2 - 1) $calc($3 - 1) }
  2384.         else { did -ra $dname 15 Query info | did -h $dname 17 | did -h $dname 18,19,20 | did -vr $dname 16 | tokenize 32 $spage($dname,12).select | scon $calc($2 - 1) | stats.queryinfo $calc($2 - 1) $query($sbranch($dname,12)) }
  2385.       }
  2386.     }
  2387.     if ($did == 13) || ($did == 163) {
  2388.       did -r $dname 12,17,162
  2389.       var %s 1
  2390.       while (%s <= $scon(0)) {
  2391.         if ($scon(%s).status == connected) {
  2392.           did -a $dname 12,162 +e 1 1 0 0 $scon(%s).server
  2393.           did -i $dname 12,162 1 cb last
  2394.           scon %s stats.servers.chans
  2395.         }
  2396.         inc %s 1
  2397.       }
  2398.       stats.serverinfo 1
  2399.     }
  2400.     if ($did == 14) {
  2401.       if ($len($right($spage($dname,12).select,-6)) == 1) {
  2402.         tokenize 32 $spage($dname,12).select
  2403.         if ($scon($calc($1 - 1)).status == connected) { scon $calc($1 - 1) list }
  2404.       }
  2405.     }
  2406.     if ($did == 18) {
  2407.       did -r $dname 17
  2408.       tokenize 32 $spage($dname,12).select
  2409.       scon $calc($2 - 1)
  2410.       if ($chan($calc($3 - 1)).ial == $false) { did -a $dname 17 1 1 0 0 IAL not ready  + 0 0 0 please wait and try again }
  2411.       else {
  2412.         did -a $dname 17 1 1 0 0 Total:     + 0 0 0 $nick($chan($calc($3 - 1)),0)
  2413.         var %c1 $nick($chan($calc($3 - 1)),0)
  2414.         var %c2 1
  2415.         while (%c2 <= %c1) {
  2416.           did -a $dname 17 1 1 0 0 $iif($nick($chan($calc($3 - 1)),%c2) !isreg $chan($calc($3 - 1)),$left($nick($chan($calc($3 - 1)),%c2).pnick,1)) $nick($chan($calc($3 - 1)),%c2)     + 0 0 0 $ialchan(*,$chan($calc($3 - 1)),%c2)
  2417.           if (%c2 >= 100) { did -a $dname 17 1 1 0 0 too much   + 0 0 0 users | break }
  2418.           inc %c2 1
  2419.         }
  2420.       }
  2421.     }
  2422.     if ($did == 19) {
  2423.       did -r $dname 17
  2424.       tokenize 32 $spage($dname,12).select
  2425.       scon $calc($2 - 1)
  2426.       did -a $dname 17 1 1 0 0 Total:   + 0 0 0 $ibl($chan($calc($3 - 1)),0)
  2427.       if ($ibl($chan($calc($3 - 1)),0) == 0) { did -a $dname 17 1 1 0 0 No bans...  + 0 0 0 }
  2428.       else {
  2429.         var %b1 $ibl($chan($calc($3 - 1)),0)
  2430.         var %b2 1
  2431.         while (%b2 <= %b1) {
  2432.           did -a $dname 17 1 1 0 0 by $ibl($chan($calc($3 - 1)),%b2).by at $ibl($chan($calc($3 - 1)),%b2).date  + 0 0 0 $ibl($chan($calc($3 - 1)),%b2)
  2433.           if (%b2 >= 50) { did -a $dname 17 1 1 0 0 too much    + 0 0 0 users | break }
  2434.           inc %b2 1
  2435.         }
  2436.       }
  2437.     }
  2438.     if ($did == 20) {
  2439.       did -r $dname 17
  2440.       var %p1 = $scon(0),%p2 = 1,%p3 = 0,%p4 = 0,%p5 = 0,%p6 = 0,%p7 = 0
  2441.       while (%p2 <= %p1) {
  2442.         scon %p2
  2443.         set %p3 $calc(%p3 + $chan(0))
  2444.         var %p8 $chan(0),%p9 = 1
  2445.         while (%p9 <= %p8) {
  2446.           if ($me isop $chan(%p9)) { inc %p4 1 | set %p7 $calc(%p7 + $nick($chan(%p9),0,a,o)) }
  2447.           if ($me ishop $chan(%p9)) { inc %p5 1 | set %p7 $calc(%p7 + $nick($chan(%p9),0,a,oh)) }
  2448.           if ($me isvoice $chan(%p9)) { inc %p6 1 | set %p7 $calc(%p7 + $nick($chan(%p9),0,r)) }
  2449.           inc %p9 1
  2450.         }
  2451.         inc %p2 1
  2452.       }
  2453.       did -a $dname 17 0 0 1 1 Servers:     + 0 0 0 %p1
  2454.       did -a $dname 17 0 0 1 1 Channels:    + 0 0 0 %p3
  2455.       did -a $dname 17 0 0 1 1  + 0 0 0
  2456.       did -a $dname 17 0 0 1 1 Op in:   + 0 0 0 %p4 channels
  2457.       did -a $dname 17 0 0 1 1 Halfop in:   + 0 0 0 %p5 channels
  2458.       did -a $dname 17 0 0 1 1 Voice in:    + 0 0 0 %p6 channels
  2459.       did -a $dname 17 0 0 1 1  + 0 0 0
  2460.       did -a $dname 17 0 0 1 1 Power over:  + 0 0 0 %p7 peons
  2461.     }
  2462.     if ($did == 22) && ($gettok($did(22,1),1,32) == sclick) { stats.chans.new $calc($did(22).sel - 1) }
  2463.     if ($did == 27) { did -r $dname 22,24,26 | stats.servers.new }
  2464.     if ($did == 28) { if ($scon($calc($did(22).sel - 1)).status == connected) { scon $calc($did(22).sel - 1) list } }
  2465.     if ($did == 29) { if (!$dialog(stats.power)) { dialog -m stats.power stats.power } }
  2466.     if ($did == 53) { stats been }
  2467.     if ($did == 54) { stats have }
  2468.     if ($did == 55) { stats seen }
  2469.     if ($did == 56) { stats.events }
  2470.     if ($did == 60) {
  2471.       var %s = $did(60).sel
  2472.       if (%s == 2) {
  2473.         did -o $dname 60 2 +acgx 0 CPU/OS/Cache | did -o $dname 60 4 +acg 0 HDD/GFX | did -o $dname 60 6 +acg 0 Connections/Misc
  2474.         did -h $dname 111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,153,154,155,156,157
  2475.         did -v $dname 61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103
  2476.       }
  2477.       elseif (%s == 4) {
  2478.         did -o $dname 60 2 +acg 0 CPU/OS/Cache | did -o $dname 60 4 +acgx 0 HDD/GFX | did -o $dname 60 6 +acg 0 Connections/Misc
  2479.         did -h $dname 61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,153,154,155,156,157
  2480.         did -v $dname 111,112,113,114,115,116,117,118,119,120,121
  2481.       }
  2482.       elseif (%s == 6) {
  2483.         did -o $dname 60 2 +acg 0 CPU/OS/Cache | did -o $dname 60 4 +acg 0 HDD/GFX | did -o $dname 60 6 +acgx 0 Connections/Misc
  2484.         did -h $dname 61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,111,112,113,114,115,116,117,118,119,120,121
  2485.         did -v $dname 122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,153,154,155,156,157
  2486.       }
  2487.     }
  2488.     if ($did == 147) { stats.cpu | stats.cache }
  2489.     if ($did == 148) { stats.os }
  2490.     if ($did == 149) { stats.hdd }
  2491.     if ($did == 150) { stats.gfx }
  2492.     if ($did == 151) { stats.con }
  2493.     if ($did == 152) { stats.misc }
  2494.     if ($did == 165) { ha echo public }
  2495.     if ($did == 166) { ha echo personal }
  2496.     if ($did == 167) { ha color $did(167).state }
  2497.     if ($did == 193) { ha echo.server $did(193).state }
  2498.     if ($did == 194) { ha echo.chan only | did -b $dname 198 | did -e $dname 197 }
  2499.     if ($did == 195) { ha echo.chan not | did -b $dname 197 | did -e $dname 198 }
  2500.     if ($did == 196) { ha echo.chan all | did -b $dname 197,198 }
  2501.  
  2502.     if ($did isnum 172-190) {
  2503.       var %b = $sbranch($dname,162)
  2504.       did -i $dname 162 1 cb select
  2505.       tokenize 32 $spage($dname,162).select
  2506.       scon $calc($2 - 1)
  2507.  
  2508.       if ($did == 172) { var %e = $stats.echo(servers) }
  2509.       if ($did == 173) { var %e = $stats.echo(power) }
  2510.       if ($did == 174) { var %e = $stats.echo(time) }
  2511.       if ($did == 175) { var %e = $stats.echo(uptime) }
  2512.       if ($did == 176) { var %e = $stats.echo(events) }
  2513.       if ($did == 177) { var %e = $stats.echo(texts) }
  2514.       if ($did == 178) { var %e = $stats.echo(words) }
  2515.       if ($did == 179) { var %e = $stats.echo(been) }
  2516.       if ($did == 180) { var %e = $stats.echo(have) }
  2517.       if ($did == 181) { var %e = $stats.echo(seen) }
  2518.       if ($did == 182) { var %e = $stats.echo(cpu) }
  2519.       if ($did == 183) { var %e = $stats.echo(os) }
  2520.       if ($did == 184) { var %e = $stats.echo(cache) }
  2521.       if ($did == 185) { var %e = $stats.echo(hdd) }
  2522.       if ($did == 186) { var %e = $stats.echo(gfx) }
  2523.       if ($did == 187) { var %e = $stats.echo(con) }
  2524.       if ($did == 188) { var %e = $stats.echo(eth) }
  2525.       if ($did == 189) { var %e = $stats.echo(misc) }
  2526.       if ($did == 190) { var %e = $stats.echo(custom) }
  2527.  
  2528.       if (%e) {
  2529.         var %i = 1
  2530.         while ($gettok(%e,%i,9)) {
  2531.           if ($0 == 2) { if ($hg(echo.server)) { servecho $gettok(%e,%i,9) } }
  2532.           elseif ($hg(echo) == personal) || (!$server) { echo -a $gettok(%e,%i,9) }
  2533.           elseif (%b) { msg %b $gettok(%e,%i,9) }
  2534.           inc %i
  2535.         }
  2536.         hi echo.total 1
  2537.         if ($hg(autoupdate)) { stats.update e 5 echo }
  2538.       }
  2539.     }
  2540.   }
  2541.   if ($devent == edit) {
  2542.     if ($did == 197) { ha echo.chan.only $did(197) }
  2543.     if ($did == 198) { ha echo.chan.not $did(198) }
  2544.   }
  2545.   if ($devent == menu) {
  2546.     if ($did == 202) { stats config }
  2547.     if ($did == 204) { stats icons }
  2548.     if ($did == 205) { stats color }
  2549.     if ($did == 207) { dialog -x stats2 stats2 }
  2550.     if ($did == 209) { stats help }
  2551.   }
  2552.   if ($devent == close) { ha pos.stats $dialog(stats2).x $dialog(stats2).y }
  2553. }
  2554.  
  2555. dialog -l stats.power {
  2556.   title "Power"
  2557.   size -1 -1 80 74
  2558.   option dbu
  2559.   text "Servers:", 1, 4 2 30 8
  2560.   text "", 2, 43 2 50 8
  2561.   text "Channels:", 3, 4 10 30 8
  2562.   text "", 4, 43 10 50 8
  2563.   text "Op in:", 5, 4 23 30 8
  2564.   text "", 6, 43 23 50 8
  2565.   text "Halfop in:", 7, 4 31 30 8
  2566.   text "", 8, 43 31 50 8
  2567.   text "Voice in:", 9, 4 39 30 8
  2568.   text "", 10, 43 39 50 8
  2569.   text "Power over:", 11, 4 52 30 8
  2570.   text "", 12, 43 52 50 8
  2571.   text "", 13, 2 61 76 1
  2572.   button "close", 14, 53 63 25 10, cancel
  2573. }
  2574. on *:dialog:mstats.power:init:*:{
  2575.   smdx SetMircVersion $version
  2576.   smdx MarkDialog $dname
  2577.   smdx SetBorderStyle $dname 13 staticedge
  2578.   var %p1 = $scon(0),%p2 = 1,%p3 = 0,%p4 = 0,%p5 = 0,%p6 = 0,%p7 = 0
  2579.   while (%p2 <= %p1) {
  2580.     scon %p2
  2581.     set %p3 $calc(%p3 + $chan(0))
  2582.     var %p8 $chan(0),%p9 = 1
  2583.     while (%p9 <= %p8) {
  2584.       if ($me isop $chan(%p9)) { inc %p4 1 | set %p7 $calc(%p7 + $nick($chan(%p9),0,a,o)) }
  2585.       if ($me ishop $chan(%p9)) { inc %p5 1 | set %p7 $calc(%p7 + $nick($chan(%p9),0,a,oh)) }
  2586.       if ($me isvoice $chan(%p9)) { inc %p6 1 | set %p7 $calc(%p7 + $nick($chan(%p9),0,r)) }
  2587.       inc %p9 1
  2588.     }
  2589.     inc %p2 1
  2590.   }
  2591.   did -a $dname 2 %p1
  2592.   did -a $dname 4 %p3
  2593.   did -a $dname 6 %p4 channels
  2594.   did -a $dname 8 %p5 channels
  2595.   did -a $dname 10 %p6 channels
  2596.   did -a $dname 12 %p7 peons
  2597. }
  2598.  
  2599. ;########### been/have/seen dialogs along with their events ############
  2600.  
  2601. dialog -l been {
  2602.   title "Been Stats"
  2603.   size $position(been) 248 104
  2604.   option dbu
  2605.  
  2606.   text "", 1, 3 2 100 8
  2607.   list 2, 2 10 244 82, size extsel
  2608.   button "Close", 3, 221 93 25 10, cancel
  2609.   button "Echo", 4, 29 93 25 10
  2610.   button "Refresh", 5, 2 93 25 10
  2611. }
  2612. on *:dialog:been:*:*:{
  2613.   if ($devent == init) {
  2614.     smdx SetMircVersion $version
  2615.     smdx MarkDialog $dname
  2616.     smdx SetControlMDX $dname 2 ListView report labeltip showsel single rowselect $iif($hg(grids),grid) > $sviews
  2617.     did -i $dname 2 1 headerdims 85:1 75:2 60:3 69:4 65:5 60:6 69:7
  2618.     did -i $dname 2 1 headertext You've been    Times   Per year    Per month   Per week    Per day     % of total
  2619.     if (been isin $hg(disp.color.apply)) {
  2620.       if (back isin $hg(disp.color.apply)) { did -i $dname 2 1 setbkg color $gettok($hg(disp.color),1,32) }
  2621.       if (back isin $hg(disp.color.apply)) { did -i $dname 2 1 settxt bgcolor $gettok($hg(disp.color),1,32) }
  2622.       if (text isin $hg(disp.color.apply)) { did -i $dname 2 1 settxt color $gettok($hg(disp.color),2,32) }
  2623.     }
  2624.     stats.events -b
  2625.   }
  2626.   if ($devent == sclick) {
  2627.     if ($did == 4) { msg $$?="channel/nick:" $stats.echo(been) }
  2628.     if ($did == 5) { stats.events -b }
  2629.   }
  2630.   if ($devent == close) { ha pos.been $dialog(been).x $dialog(been).y }
  2631. }
  2632.  
  2633.  
  2634. dialog -l have {
  2635.   title "Have Stats"
  2636.   size $position(have) 248 153
  2637.   option dbu
  2638.  
  2639.   text "", 1, 3 2 100 8
  2640.   list 2, 2 10 244 131, size extsel
  2641.   button "Close", 3, 221 142 25 10, cancel
  2642.   button "Echo", 4, 29 142 25 10
  2643.   button "Refresh", 5, 2 142 25 10
  2644. }
  2645. on *:dialog:have:*:*:{
  2646.   if ($devent == init) {
  2647.     smdx SetMircVersion $version
  2648.     smdx MarkDialog $dname
  2649.     smdx SetControlMDX $dname 2 ListView report labeltip showsel single rowselect $iif($hg(grids),grid) > $sviews
  2650.     did -i $dname 2 1 headerdims 85:1 75:2 60:3 69:4 65:5 60:6 69:7
  2651.     did -i $dname 2 1 headertext You have   Times   Per year    Per month   Per week    Per day     % of total
  2652.     if (have isin $hg(disp.color.apply)) {
  2653.       if (back isin $hg(disp.color.apply)) { did -i $dname 2 1 setbkg color $gettok($hg(disp.color),1,32) }
  2654.       if (back isin $hg(disp.color.apply)) { did -i $dname 2 1 settxt bgcolor $gettok($hg(disp.color),1,32) }
  2655.       if (text isin $hg(disp.color.apply)) { did -i $dname 2 1 settxt color $gettok($hg(disp.color),2,32) }
  2656.     }
  2657.     stats.events -h
  2658.   }
  2659.   if ($devent == sclick) {
  2660.     if ($did == 4) { msg $$?="channel/nick:" $stats.echo(have) }
  2661.     if ($did == 5) { stats.events -h }
  2662.   }
  2663.   if ($devent == close) { ha pos.have $dialog(have).x $dialog(have).y }
  2664. }
  2665.  
  2666.  
  2667. dialog -l seen {
  2668.   title "Seen Stats"
  2669.   size $position(been) 248 139
  2670.   option dbu
  2671.  
  2672.   text "", 1, 3 2 100 8
  2673.   list 2, 2 10 244 117, size extsel
  2674.   button "Close", 3, 221 128 25 10, cancel
  2675.   button "Echo", 4, 29 128 25 10
  2676.   button "Refresh", 5, 2 128 25 10
  2677. }
  2678. on *:dialog:seen:*:*:{
  2679.   if ($devent == init) {
  2680.     smdx SetMircVersion $version
  2681.     smdx MarkDialog $dname
  2682.     smdx SetControlMDX $dname 2 ListView report labeltip showsel single rowselect $iif($hg(grids),grid) > $sviews
  2683.     did -i $dname 2 1 headerdims 85:1 75:2 60:3 69:4 65:5 60:6 69:7
  2684.     did -i $dname 2 1 headertext You've seen    Times   Per year    Per month   Per week    Per day     % of total
  2685.     if (seen isin $hg(disp.color.apply)) {
  2686.       if (back isin $hg(disp.color.apply)) { did -i $dname 2 1 setbkg color $gettok($hg(disp.color),1,32) }
  2687.       if (back isin $hg(disp.color.apply)) { did -i $dname 2 1 settxt bgcolor $gettok($hg(disp.color),1,32) }
  2688.       if (text isin $hg(disp.color.apply)) { did -i $dname 2 1 settxt color $gettok($hg(disp.color),2,32) }
  2689.     }
  2690.     stats.events -s
  2691.   }
  2692.   if ($devent == sclick) {
  2693.     if ($did == 4) { msg $$?="channel/nick:" $stats.echo(seen) }
  2694.     if ($did == 5) { stats.events -s }
  2695.   }
  2696.   if ($devent == close) { ha pos.seen $dialog(seen).x $dialog(seen).y }
  2697. }
  2698.  
  2699.  
  2700. ;############## events ###############
  2701.  
  2702. on *:START:{
  2703.   if (!$hget(stats)) { hmake stats 15 }
  2704.   if ($exists($+(",$scriptdirstats.src,"))) { hload stats $shortfn($scriptdir) $+ stats.src }
  2705.   hi started 1
  2706.   if ($hg(webstart)) { statsweb $iif($hg(webstartport),$ifmatch) }
  2707.   if ($hg(saveevery)) && ($hg(saveeverynum)) { .timersavestats -i 0 $calc($hg(saveeverynum) * 60) hsave -o stats $shortfn($scriptdir) $+ stats.src }
  2708.   .stats.updatecheck
  2709. }
  2710. on *:EXIT:{ hsave -o stats $shortfn($scriptdir) $+ stats.src }
  2711. on *:CONNECT:{
  2712.   .timertotalonline -i 0 1 hi totalonline 1
  2713.   hi have.connected 1
  2714.   stats.update h 16 connected
  2715. }
  2716. on *:DISCONNECT:{
  2717.   if ($nick == $me) { hi have.quit 1 | stats.update h 12 quit }
  2718.   else { hi seen.quit 1 | stats.update s 12 quit }
  2719. }
  2720. on *:JOIN:#:{
  2721.   if ($nick == $me) { hi have.joined 1 | stats.update h 13 joined }
  2722.   else { hi seen.joined 1 | stats.update s 14 joined }
  2723. }
  2724. on *:PART:#:{
  2725.   if ($nick == $me) { hi have.parted 1 | stats.update h 14 parted }
  2726.   else { hi seen.parted 1 | stats.update s 14 parted }
  2727. }
  2728. on *:OPEN:?:{ hi have.query 1 | stats.update h 15 query }
  2729. on *:NICK:{
  2730.   if ($nick == $me) { hi have.nick 1 | stats.update h 10 nick }
  2731.   else { hi seen.nick 1 | stats.update s 10 nick }
  2732. }
  2733. on *:TOPIC:#:{
  2734.   if ($nick == $me) { hi have.topic 1 | stats.update h 11 topic }
  2735.   else { hi seen.topic 1 | stats.update s 11 topic }
  2736. }
  2737. on *:QUIT:{
  2738.   if ($nick == $me) { hi have.quit 1 | stats.update h 12 }
  2739.   else { hi seen.quit 1 | stats.update s 12 quit }
  2740. }
  2741. on *:OP:#:{
  2742.   if ($opnick == $me) { hi been.oped 1 | stats.update b 2 oped }
  2743.   if ($nick == $me) { hi have.oped 1 | stats.update h 2 oped }
  2744.   else { hi seen.oped 1 | stats.update s 2 oped }
  2745. }
  2746. on *:SERVEROP:#:{
  2747.   if ($opnick == $me) { hi been.oped 1 | stats.update b 2 oped }
  2748.   if ($nick == $me) { hi have.oped 1 | stats.update h 2 oped }
  2749.   else { hi seen.oped 1 | stats.update s 2 oped }
  2750. }
  2751. on *:DEOP:#:{
  2752.   if ($opnick == $me) { hi been.deoped 1 | stats.update b 3 deoped }
  2753.   if ($nick == $me) { hi have.deoped 1 | stats.update h 3 deoped }
  2754.   else { hi seen.deoped 1 | stats.update s 3 deoped }
  2755. }
  2756. on *:HELP:#:{
  2757.   if ($hnick == $me) { hi been.halfoped 1 | stats.update b 4 halfoped }
  2758.   if ($nick == $me) { hi have.halfoped 1 | stats.update h 4 halfoped }
  2759.   else { hi seen.halfoped 1 | stats.update s 4 halfoped }
  2760. }
  2761. on *:DEHELP:#:{
  2762.   if ($hnick == $me) { hi been.dehalfoped 1 | stats.update b 5 dehalfoped }
  2763.   if ($nick == $me) { hi have.dehalfoped 1 | stats.update h 5 dehalfoped }
  2764.   else { hi seen.dehalfoped 1 | stats.update s 5 dehalfoped }
  2765. }
  2766. on *:VOICE:#:{
  2767.   if ($vnick == $me) { hi been.voiced 1 | stats.update b 6 voiced }
  2768.   if ($nick == $me) { hi have.voiced 1 | stats.update h 6 voiced }
  2769.   else { hi seen.voiced 1 | stats.update s 6 voiced }
  2770. }
  2771. on *:DEVOICE:#:{
  2772.   if ($vnick == $me) { hi been.devoiced 1 | stats.update b 7 devoiced }
  2773.   if ($nick == $me) { hi have.devoiced 1 | stats.update h 7 devoiced }
  2774.   else { hi seen.devoiced 1 | stats.update s 7 devoiced }
  2775. }
  2776. on *:KICK:#:{
  2777.   if ($knick == $me) { hi been.kicked 1 | stats.update b 8 kicked }
  2778.   if ($nick == $me) { hi have.kicked 1 | stats.update h 8 kicked }
  2779.   else { hi seen.kicked 1 | stats.update s 8 kicked }
  2780. }
  2781. on *:BAN:#:{
  2782.   if ($bnick == $me) { hi been.banned 1 | stats.update b 9 banned }
  2783.   if ($nick == $me) { hi have.banned 1 | stats.update h 9 banned }
  2784.   else { hi seen.banned 1 | stats.update s 9 banned }
  2785. }
  2786. on *:FILESENT:*:{
  2787.   hi dccsend 1
  2788.   hi dccsendsize $file($filename).size)
  2789.   if ($dialog(stats2)) && ($hg(autoupdate)) { did -ra stats2 34 Files sent: $hg(dccsend) | did -ra stats2 35 Size: $bytes($hg(dccsendsize),3).suf }
  2790. }
  2791. on *:FILERCVD:*:{
  2792.   hi dccget 1
  2793.   hi dccgetsize $file($filename).size)
  2794.   if ($dialog(stats2)) && ($hg(autoupdate)) { did -ra stats2 36 Files sent: $hg(dccget) | did -ra stats2 37 Size: $bytes($hg(dccgetsize),3).suf }
  2795. }
  2796. on *:INPUT:*:{
  2797.   hi chars $len($1-)
  2798.   hi words $0
  2799.   hi lines 1
  2800.   if ($istok($right($1-,1),!,32)) || ($istok($right($1-,1),?,32)) || ($istok($right($1-,1),.,32)) || ($istok($right($1-,1),:,32)) || ($istok($right($1-,1),;,32)) { hi puncs 1 }
  2801.   if (: $+ $chr(41) isin $1-) || (; $+ $chr(41) isin $1-) || (: $+ $chr(40) isin $1-) || (:D isin $1-) || (:P isin $1-) || (:o isin $1-) || (:S isin $1-) { hi smilies 1 }
  2802.   if (:| isin $1-) || (:x isin $1-) || (:/ isin $1-) || (:-x isin $1-) || (:-/ isin $1-) || (:' $+ $chr(40) isin $1-) || (:$ isin $1-) || (:- $+ $chr(41) isin $1-) { hi smilies 1 }
  2803.   if (;- $+ $chr(41) isin $1-) || (:- $+ $chr(40) isin $1-) || (:-D isin $1-) || (:-P isin $1-) || (:-o isin $1-) || (:-S isin $1-) || (:-| isin $1-) || (:-$ isin $1-) { hi smilies 1 }
  2804.   var %c = 1
  2805.   while (%c <= $hfind(stats,custom.*,0,w)) {
  2806.     if ($gettok($hfind(stats,custom.*,%c,w),2,46) isin $1-) {
  2807.       var %h = $hfind(stats,custom.*,%c,w)
  2808.       hi %h 1
  2809.       stats.update e $calc(16 + %c) %h
  2810.     }
  2811.     inc %c
  2812.   }
  2813.   stats.update e 10 lines
  2814.   stats.update e 11 words
  2815.   stats.update e 12 chars
  2816.   stats.update e 13 puncs
  2817.   stats.update e 14 smilies
  2818. }
  2819.  
  2820.  
  2821. ;################### webpage #############
  2822.  
  2823.  
  2824. on 1:socklisten:mstats:{
  2825.   var %temp = $r(1,200000)
  2826.   sockaccept stats $+ %temp
  2827. }
  2828.  
  2829. on 1:sockread:mstats*:{
  2830.   sockread %line
  2831.   tokenize 32 %line
  2832.   if ($1 == GET) {
  2833.     if ($isfile($hg(webcurscript))) { if (!$script($hg(webcurscript))) { .load -rs $+(",$hg(webcurscript),") } }
  2834.     else {
  2835.       var %q = $sock($1).sq
  2836.       if (!%q) { sockclose $sockname }
  2837.       else { .timer -m 1 $calc(%q /5) sclose $sockname }
  2838.       unset %line
  2839.       halt
  2840.     }
  2841.  
  2842.     if ($hg(webreport)) { echo -a 10(9!10) $sock($sockname).ip accessed/refreshed your mIRC Stats webpage. }
  2843.     hi pagehits 1
  2844.     $stats.read($hg(webcurrent),alias) $2
  2845.  
  2846.     var %q = $sock($1).sq
  2847.     if (!%q) { sockclose $sockname }
  2848.     else { .timer -m 1 $calc(%q /5) sclose $sockname }
  2849.   }
  2850.   unset %line
  2851. }
  2852.  
  2853.  
  2854.  
  2855. ;############# menubars - only part that may be moved/edited :) - yeh I know it's a bit retarted with the groups now.. wait till I make the menu system ############
  2856.  
  2857. #menu.menubar on
  2858.  
  2859. menu menubar {
  2860.   -
  2861.   mIRC Stats
  2862.   .dialogs
  2863.   ..main dialog $iif($hg(menu.commands),    /stats) :mstats
  2864.   ..configuration $iif($hg(menu.commands)/stats config) :mstats config
  2865.   ..-
  2866.   ..been stats $iif($hg(menu.commands), /stats been) :mstats been
  2867.   ..have stats $iif($hg(menu.commands), /stats have) :mstats have
  2868.   ..seen stats $iif($hg(menu.commands), /stats seen) :mstats seen
  2869.   .launch webpage $iif($hg(menu.commands),  /statsweb) :statsweb
  2870.   .-
  2871.   .help $iif($hg(menu.commands),    /stats help) :mstats help
  2872.   .-
  2873.   .unload
  2874.   ..confirm:unload -rs $script
  2875. }
  2876. #menu.menubar end
  2877.  
  2878. #menu.status off
  2879. menu status {
  2880.   -
  2881.   mIRC Stats
  2882.   .dialogs
  2883.   ..main dialog $iif($hg(menu.commands),    /stats) :mstats
  2884.   ..configuration $iif($hg(menu.commands)/stats config) :mstats config
  2885.   ..-
  2886.   ..been stats $iif($hg(menu.commands), /stats been) :mstats been
  2887.   ..have stats $iif($hg(menu.commands), /stats have) :mstats have
  2888.   ..seen stats $iif($hg(menu.commands), /stats seen) :mstats seen
  2889.   .launch webpage $iif($hg(menu.commands),  /statsweb) :statsweb
  2890.   .-
  2891.   .help $iif($hg(menu.commands),    /stats help) :mstats help
  2892. }
  2893. #menu.status end
  2894.  
  2895.  
  2896. #menu.channel on
  2897. menu channel {
  2898.   -
  2899.   mIRC Stats
  2900.   .dialogs
  2901.   ..main dialog $iif($hg(menu.commands),    /stats) :mstats
  2902.   ..configuration $iif($hg(menu.commands)/stats config) :mstats config
  2903.   ..-
  2904.   ..been stats $iif($hg(menu.commands), /stats been) :mstats been
  2905.   ..have stats $iif($hg(menu.commands), /stats have) :mstats have
  2906.   ..seen stats $iif($hg(menu.commands), /stats seen) :mstats seen
  2907.   .launch webpage $iif($hg(menu.commands),  /statsweb) :statsweb
  2908.   .-
  2909.   .help $iif($hg(menu.commands),    /stats help) :mstats help
  2910.   .-
  2911.   .echo stats
  2912.   ..Servers $iif($hg(menu.commands),    /secho servers) :secho servers
  2913.   ..Power $iif($hg(menu.commands)/secho power) :secho power
  2914.   ..-
  2915.   ..Time $iif($hg(menu.commands),   /secho time) :secho time
  2916.   ..Uptime $iif($hg(menu.commands), /secho uptime) :secho uptime
  2917.   ..Events $iif($hg(menu.commands), /secho events) :secho events
  2918.   ..Text stuff $iif($hg(menu.commands), /secho texts) :secho texts
  2919.   ..-
  2920.   ..Been stats $iif($hg(menu.commands), /secho been) :secho been
  2921.   ..Have stats $iif($hg(menu.commands), /secho have) :secho have
  2922.   ..Seen stats $iif($hg(menu.commands), /secho seen) :secho seen
  2923.   ..-
  2924.   ..CPU info $iif($hg(menu.commands),   /secho cpu) :secho cpu
  2925.   ..OS info $iif($hg(menu.commands),    /secho os) :secho os
  2926.   ..Cache info $iif($hg(menu.commands), /secho cache) : secho cache
  2927.   ..HDD info $iif($hg(menu.commands),   /secho hdd) :secho hdd
  2928.   ..GFX info $iif($hg(menu.commands),   /secho gfx) :secho gfx
  2929.   ..Connection info $iif($hg(menu.commands),    /secho con) :secho con
  2930.   ..Network info $iif($hg(menu.commands),   /secho eth) :secho eth
  2931.   ..-
  2932.   ..Custom $iif($hg(menu.commands), /secho custom) :secho custom
  2933. }
  2934. #menu.channel end
  2935.  
  2936. #menu.query on
  2937. menu query {
  2938.   -
  2939.   mIRC Stats
  2940.   .dialogs
  2941.   ..main dialog $iif($hg(menu.commands),    /stats) :mstats
  2942.   ..configuration $iif($hg(menu.commands)/stats config) :mstats config
  2943.   ..-
  2944.   ..been stats $iif($hg(menu.commands), /stats been) :mstats been
  2945.   ..have stats $iif($hg(menu.commands), /stats have) :mstats have
  2946.   ..seen stats $iif($hg(menu.commands), /stats seen) :mstats seen
  2947.   .launch webpage $iif($hg(menu.commands),  /statsweb) :statsweb
  2948.   .-
  2949.   .help $iif($hg(menu.commands),    /stats help) :mstats help
  2950.   .-
  2951.   .echo stats
  2952.   ..Servers $iif($hg(menu.commands),    /secho servers) :secho servers
  2953.   ..Power $iif($hg(menu.commands)/secho power) :secho power
  2954.   ..-
  2955.   ..Time $iif($hg(menu.commands),   /secho time) :secho time
  2956.   ..Uptime $iif($hg(menu.commands), /secho uptime) :secho uptime
  2957.   ..Events $iif($hg(menu.commands), /secho events) :secho events
  2958.   ..Text stuff $iif($hg(menu.commands), /secho texts) :secho texts
  2959.   ..-
  2960.   ..Been stats $iif($hg(menu.commands), /secho been) :secho been
  2961.   ..Have stats $iif($hg(menu.commands), /secho have) :secho have
  2962.   ..Seen stats $iif($hg(menu.commands), /secho seen) :secho seen
  2963.   ..-
  2964.   ..CPU info $iif($hg(menu.commands),   /secho cpu) :secho cpu
  2965.   ..OS info $iif($hg(menu.commands),    /secho os) :secho os
  2966.   ..Cache info $iif($hg(menu.commands), /secho cache) : secho cache
  2967.   ..HDD info $iif($hg(menu.commands),   /secho hdd) :secho hdd
  2968.   ..GFX info $iif($hg(menu.commands),   /secho gfx) :secho gfx
  2969.   ..Connection info $iif($hg(menu.commands),    /secho con) :secho con
  2970.   ..Network info $iif($hg(menu.commands),   /secho eth) :secho eth
  2971.   ..-
  2972.   ..Custom $iif($hg(menu.commands), /secho custom) :secho custom
  2973.   .$iif($1,CTCP)
  2974.   ..$iif($hg(menu.commands),$style(2) Command $+ $chr(58)   /ctcp $1 STATS [info]):bla
  2975.   ..-
  2976.   ..Power $iif($hg(menu.commands),  POWER) :ctcp $$1 STATS POWER
  2977.   ..-
  2978.   ..Time $iif($hg(menu.commands),   TIME) :ctcp $$1 STATS TIME
  2979.   ..Uptime $iif($hg(menu.commands), UPTIME) :ctcp $$1 STATS UPTIME
  2980.   ..Events $iif($hg(menu.commands), EVENTS) :ctcp $$1 STATS EVENTS
  2981.   ..Text stuff $iif($hg(menu.commands), TEXTS) :ctcp $$1 STATS TEXTS
  2982.   ..-
  2983.   ..Been stats $iif($hg(menu.commands), BEEN) :ctcp $$1 STATS BEEN
  2984.   ..Have stats $iif($hg(menu.commands), HAVE) :ctcp $$1 STATS HAVE
  2985.   ..Seen stats $iif($hg(menu.commands), SEEN) :ctcp $$1 STATS SEEN
  2986.   ..-
  2987.   ..CPU info $iif($hg(menu.commands),   CPU) :ctcp $$1 STATS CPU
  2988.   ..OS info $iif($hg(menu.commands),    OS) :ctcp $$1 STATS OS
  2989.   ..Cache info $iif($hg(menu.commands), CACHE) :ctcp $$1 STATS CACHE
  2990.   ..GFX info $iif($hg(menu.commands),   GFX) :ctcp $$1 STATS GFX
  2991.   ..Connection info $iif($hg(menu.commands),    CON) :ctcp $$1 STATS CON
  2992.   ..Network info $iif($hg(menu.commands),   ETH) :ctcp $$1 STATS ETH
  2993.   ..-
  2994.   ..Custom $iif($hg(menu.commands), CUSTOM) :ctcp $$1 STATS CUSTOM
  2995. }
  2996. #menu.query end
  2997.  
  2998. #menu.nicklist off
  2999. menu nicklist {
  3000.   -
  3001.   mIRC Stats
  3002.   .dialogs
  3003.   ..main dialog $iif($hg(menu.commands),    /stats) :mstats
  3004.   ..configuration $iif($hg(menu.commands)/stats config) :mstats config
  3005.   ..-
  3006.   ..been stats $iif($hg(menu.commands), /stats been) :mstats been
  3007.   ..have stats $iif($hg(menu.commands), /stats have) :mstats have
  3008.   ..seen stats $iif($hg(menu.commands), /stats seen) :mstats seen
  3009.   .launch webpage $iif($hg(menu.commands),  /statsweb) :statsweb
  3010.   .-
  3011.   .help $iif($hg(menu.commands),    /stats help) :mstats help
  3012.   .-
  3013.   .$iif($1,CTCP)
  3014.   ..$iif($hg(menu.commands),$style(2) Command $+ $chr(58)   /ctcp $1 STATS [info]):bla
  3015.   ..-
  3016.   ..Power $iif($hg(menu.commands),  POWER) :ctcp $$1 STATS POWER
  3017.   ..-
  3018.   ..Time $iif($hg(menu.commands),   TIME) :ctcp $$1 STATS TIME
  3019.   ..Uptime $iif($hg(menu.commands), UPTIME) :ctcp $$1 STATS UPTIME
  3020.   ..Events $iif($hg(menu.commands), EVENTS) :ctcp $$1 STATS EVENTS
  3021.   ..Text stuff $iif($hg(menu.commands), TEXTS) :ctcp $$1 STATS TEXTS
  3022.   ..-
  3023.   ..Been stats $iif($hg(menu.commands), BEEN) :ctcp $$1 STATS BEEN
  3024.   ..Have stats $iif($hg(menu.commands), HAVE) :ctcp $$1 STATS HAVE
  3025.   ..Seen stats $iif($hg(menu.commands), SEEN) :ctcp $$1 STATS SEEN
  3026.   ..-
  3027.   ..CPU info $iif($hg(menu.commands),   CPU) :ctcp $$1 STATS CPU
  3028.   ..OS info $iif($hg(menu.commands),    OS) :ctcp $$1 STATS OS
  3029.   ..Cache info $iif($hg(menu.commands), CACHE) :ctcp $$1 STATS CACHE
  3030.   ..GFX info $iif($hg(menu.commands),   GFX) :ctcp $$1 STATS GFX
  3031.   ..Connection info $iif($hg(menu.commands),    CON) :ctcp $$1 STATS CON
  3032.   ..Network info $iif($hg(menu.commands),   ETH) :ctcp $$1 STATS ETH
  3033.   ..-
  3034.   ..Custom $iif($hg(menu.commands), CUSTOM) :ctcp $$1 STATS CUSTOM
  3035. }
  3036. #menu.nicklist end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement