SHARE
TWEET

Untitled

a guest May 31st, 2017 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. menu * {
  2.   ProHLer
  3.   .$iif(!%ProHLer.On,$style(2))Turn ProHLer Off:/ProHLer.Off
  4.   .$iif(%ProHLer.On,$style(2))Turn ProHLer On:/ProHLer.On
  5.   .-
  6.   .Open ProHler:/ProHLer.Open
  7. }
  8. menu nicklist {
  9.   ProHLer
  10.   .$iif($1 == $null,$style(2)) Add to NonHighlighting Nicknames:/ProHLer.Menu.NickList.1 $1
  11. }
  12. menu @ProHLer.* {
  13.   dclick:/ProHLer.Menu.Window.2 $1-
  14.   ProHLer
  15.   .Add to NonHighlighting Nicknames:ProHLer.Menu.Window.1 $active
  16. }
  17.  
  18. ;If You have your own color identifers you can replace the ProHLer identifers with something like this:
  19. ;alias ProHLer.C1 {
  20. ;  var %c = $c1(MSG)
  21. ;  %c = $gettok($remove(%c,,MSG),1,44)
  22. ;  return $iif($prop == code,%c,$iif($1,$+(,%c,$1),$+(,%c)))
  23. ;}
  24. alias ProHLer.C1 {
  25.   var %c = 04
  26.   %c = $gettok($remove(%c,,MSG),1,44)
  27.   return $iif($prop == code,%c,$iif($1,$+(,%c,$1),$+(,%c)))
  28. }
  29. alias ProHLer.C2 {
  30.   var %c = 03
  31.   %c = $gettok($remove(%c,,MSG),1,44)
  32.   return $iif($prop == code,%c,$iif($1,$+(,%c,$1),$+(,%c)))
  33. }
  34. alias ProHLer.C3 {
  35.   var %c = 02
  36.   %c = $gettok($remove(%c,,MSG),1,44)
  37.   return $iif($prop == code,%c,$iif($1,$+(,%c,$1),$+(,%c)))
  38. }
  39. alias ProHLer.C4 {
  40.   var %c = 05
  41.   %c = $gettok($remove(%c,,MSG),1,44)
  42.   return $iif($prop == code,%c,$iif($1,$+(,%c,$1),$+(,%c)))
  43. }
  44. alias ProHLer.CloseWindows {
  45.   if ($input(Are you sure you want to close all the ProHLer windows?,yqd,ProHLer - Question)) {
  46.     var %total $window(@ProHLer.*,0)
  47.     close -@ProHLer.*
  48.     if ($dialog(ProHLer.DMain)) dialog -x $v1
  49.     if ($dialog(ProHLer.DNoHL)) dialog -x $v1
  50.     if ($dialog(ProHLer.DHLers)) dialog -x $v1
  51.     if ($dialog(ProHLer.DResetStats)) dialog -x $v1
  52.     if ($dialog(ProHLer.DSettings)) dialog -x $v1
  53.     noop $input(All ProHLer windows are closed! Total: %total,oid,ProHLer - Info)
  54.   }
  55. }
  56. alias ProHLer.Help {
  57.   if ($window(@ProHLer.Help)) {
  58.     clear @ProHLer.Help
  59.   }
  60.   else window -k0vxz @ProHLer.Help
  61.   aline $ProHLer.C1().code @ProHLer.Help <***>ProHLer HighLight detection script by: Marlinc - Version $ProHLer.Version $+ <***>
  62.   aline $ProHLer.C3().code @ProHLer.Help Common aliases:
  63.   aline @ProHLer.Help $ProHLer.C2(/ProHLer.Open) $ProHLer.C1(=) $ProHLer.C3(Opens the main screen of ProHLer wich provides Stats and Settings)
  64.   aline @ProHLer.Help $ProHLer.C2(/ProHLer.CloseWindows) $ProHLer.C1(=) $ProHLer.C3(Closes all the ProHLer windows)
  65.   aline @ProHLer.Help $ProHLer.C2(/ProHLer.Help) $ProHLer.C1(=) $ProHLer.C3(Opens this help screen)
  66.   aline @ProHLer.Help $ProHLer.C2(/ProHLer.On) $ProHLer.C1(=) $ProHLer.C3(This will turn ProHLer on)
  67.   aline @ProHLer.Help $ProHLer.C2(/ProHLer.Off) $ProHLer.C1(=) $ProHLer.C3(This will turn ProHLer off)
  68.   aline @ProHLer.Help $ProHLer.C2(/ProHLer.Changelog) $ProHLer.C1(=) $ProHLer.C3(Opens the ProHLer changelog)
  69.   aline $ProHLer.C3().code @ProHLer.Help -----
  70.   aline $ProHLer.C3().code @ProHLer.Help Developer aliases/identifiers/variables:
  71.   aline @ProHLer.Help $ProHLer.C2(/ProHLer.Nicks.Filter) $ProHLer.C1(=) $ProHLer.C3(Sorts the nicknames that highlighted you to a file called ProHLer.NicksOUT.txt)
  72.   aline @ProHLer.Help $ProHLer.C2(/ProHLer.Chans.Filter) $ProHLer.C1(=) $ProHLer.C3(Sorts the channels where you are highlighted you to a file called ProHLer.ChansOUT.txt)
  73.   aline @ProHLer.Help $ProHLer.C2($!ProHLer.Version) $ProHLer.C1(=) $ProHLer.C3(Returns the current ProHLer version)
  74.   aline @ProHLer.Help $ProHLer.C2($!ProHLer.Duration) $ProHLer.C1(=) $ProHLer.C3(Returns a $ProHLer.Duration(12345) format of $!duration)
  75.   aline @ProHLer.Help $ProHLer.C2($!ProHLer.C1) $ProHLer.C1(=) $ProHLer.C3(Returns ProHLer color 1)
  76.   aline @ProHLer.Help $ProHLer.C2($!ProHLer.C2) $ProHLer.C1(=) $ProHLer.C3(Returns ProHLer color 2)
  77.   aline @ProHLer.Help $ProHLer.C2($!ProHLer.C3) $ProHLer.C1(=) $ProHLer.C3(Returns ProHLer color 3)
  78.   aline @ProHLer.Help $ProHLer.C2($!ProHLer.C4) $ProHLer.C1(=) $ProHLer.C3(Returns ProHLer color 4)
  79.   aline @ProHLer.Help $ProHLer.C2($!ProHLer.C5) $ProHLer.C1(=) $ProHLer.C3(Returns ProHLer color 5)
  80.   aline @ProHLer.Help $ProHLer.C2($!ProHler.NoHL) $ProHLer.C1(=) $ProHLer.C3(If no nickname specified it will return a list of nicknames that can't highlight you)
  81.   aline @ProHLer.Help $ProHLer.C2($+(%,ProHLer.LastUpdate)) $ProHLer.C1(=) $ProHLer.C3(Returns the time of the last update in $!ctime format)
  82.   aline @ProHLer.Help $ProHLer.C2($+(%,ProHLer.Version)) $ProHLer.C1(=) $ProHLer.C3(Returns the current ProHLer version. This is only to check if you updated you ProHLer version)
  83.   aline @ProHLer.Help $ProHLer.C2($+(%,ProHLer.TotalHls)) $ProHLer.C1(=) $ProHLer.C3(Returns the total of highlights you got)
  84. }
  85. alias ProHLer.ChangeLog {
  86.   if ($window(@ProHLer.Help)) {
  87.     clear @ProHLer.Help
  88.   }
  89.   else window -k0vxz @ProHLer.Help
  90.   aline $ProHLer.C1().code @ProHLer.Help <***>ProHLer HighLight detection script by: Marlinc - Version $ProHLer.Version $+ <***>
  91.   aline $ProHLer.C3().code @ProHLer.Help Changelog $ProHLer.Version $+ :
  92.   aline @ProHLer.Help $ProHLer.C2(----- 1 -----) $ProHLer.C1(=) $ProHLer.C3(Add updatechecker)
  93.   aline @ProHLer.Help $ProHLer.C2(----- 2 -----) $ProHLer.C1(=) $ProHLer.C3(Changed a type mistake: Allowd to Allowed)
  94.   aline @ProHLer.Help $ProHLer.C2(----- 3 -----) $ProHLer.C1(=) $ProHLer.C3(Added a settings dialog)
  95.   aline @ProHLer.Help $ProHLer.C2(----- 4 -----) $ProHLer.C1(=) $ProHLer.C3(Added a question to ask if the updatechecker needs to start when the main window opens)
  96.   aline @ProHLer.Help $ProHLer.C2(----- 5 -----) $ProHLer.C1(=) $ProHLer.C3(Added a question to ask if ProHLer needs to at ur current nickname to your highlighters $+ $chr(40) $+ Only when firstrun $+ $chr(41))
  97.   aline @ProHLer.Help $ProHLer.C2(----- 6 -----) $ProHLer.C1(=) $ProHLer.C3(Added common alias /ProHLer.ChangeLog)
  98.   aline @ProHLer.Help $ProHLer.C2(----- 7 -----) $ProHLer.C1(=) $ProHLer.C3(Added "Close all ProHLer Windows" to the userhighlight listbox)
  99.   aline @ProHLer.Help $ProHLer.C2(----- 8 -----) $ProHLer.C1(=) $ProHLer.C3(Color bug solved at the highlight tips)
  100.   aline @ProHLer.Help $ProHLer.C2(----- 8 -----) $ProHLer.C1(=) $ProHLer.C3(Install/UpdateWindow bug solved)
  101. }
  102.  
  103. alias ProHLer.Duration {
  104.   return $replacecs($duration($1),hrs,Hours,hr,Hour,mins,Minutes,min,Minute,secs,Seconds,sec,Second,days,Days,day,Day,wks,Weeks,wk,Week)
  105. }
  106. alias ProHLer.Menu.NickList.1 {
  107.   set %proHler.DNoHL.nick $1
  108.   dialog -mordv ProHLer.DNoHL ProHLer.DNoHL
  109. }
  110. alias ProHLer.Menu.Window.1 {
  111.   set %proHler.DNoHL.nick $remove($1,@ProHLer.)
  112.   dialog -mordv ProHLer.DNoHL ProHLer.DNoHL
  113. }
  114. alias ProHLer.Menu.Window.2 {
  115.   if ($mouse.lb) {
  116.     if ($1 == 1) {
  117.       set %proHler.DNoHL.nick $remove($active,@ProHLer.)
  118.       dialog -mordv ProHLer.DNoHL ProHLer.DNoHL
  119.     }
  120.     elseif ($1 == 2) ProHLer.Open
  121.     elseif ($1 == 3) window -c $active
  122.     elseif ($1 == 4) ProHLer.CloseWindows
  123.   }
  124. }
  125. alias ProHLer.UpdateCheck.Start {
  126.   set %ProHLer.UpdateCheck.LastCheck $ctime
  127.   if ($sock(ProHLer.UpdateCheck)) echo -a socket is al open
  128.   else {
  129.     if ($1) set %ProHLer.UpdateCheck.Alias $1
  130.     else set %ProHLer.UpdateCheck.Alias ProHLer.UpdateCheck.Return1
  131.     if ($window(@ProHLer.UpdateCheck)) clear @ProHLer.UpdateCheck
  132.     else window -k0n2h @ProHLer.UpdateCheck
  133.     aline $ProHLer.C1().code @ProHLer.UpdateCheck <***>ProHLer HighLight detection script by: Marlinc - Version $ProHLer.Version $+ <***>
  134.     aline $ProHLer.C3().code @ProHLer.UpdateCheck Checking for new version...
  135.     sockopen ProHLer.UpdateCheck mchosts.co.cc 80
  136.   }
  137. }
  138. on *:sockopen:ProHLer.UpdateCheck*: {
  139.   sockwrite -nt $sockname GET /mirc/ProHLer-UpdateCheck.php HTTP/1.1
  140.   sockwrite -nt $sockname Host: mchosts.co.cc
  141.   sockwrite -nt $sockname User-Agent: ProHLer VersionCheck
  142.   sockwrite -nt $sockname $crlf
  143. }
  144. on *:sockread:ProHLer.UpdateCheck*: {
  145.   if ($sockerr > 0) halt
  146.   var %data
  147.   sockread %data
  148.   set %ProHLer.UpdateCheck.HTTP.Code $gettok(%data,2,32)
  149.   set %ProHLer.UpdateCheck.HTTP.Response $gettok(%data,3-,32)
  150.   while ($sockbr) {
  151.     sockread %data
  152.     if (DATA:* iswm %data) {
  153.       var %data $mid(%data,6)
  154.       set %ProHLer.UpdateCheck.Data.NewVersion $gettok(%data,1,44)
  155.       set %ProHLer.UpdateCheck.Data.SwiftIRCUrl $gettok(%data,2,44)
  156.     }
  157.   }
  158.   ProHLer.UpdateCheck.Check
  159. }
  160. alias ProHLer.UpdateCheck.Check {
  161.   if ($window(@ProHLer.UpdateCheck)) {
  162.     if (%ProHLer.UpdateCheck.HTTP.Code == 200) {
  163.       aline $ProHLer.C1().code @ProHLer.UpdateCheck Data downloaded successfull!
  164.       aline $ProHLer.C1().code @ProHLer.UpdateCheck Checking data...
  165.       aline @ProHLer.UpdateCheck $ProHLer.C1(The newest) $ProHLer.C2(ProHLer) $ProHLer.C1(version is) $ProHLer.C2(%ProHLer.UpdateCheck.Data.NewVersion)
  166.       if ($ProHLer.Version < %ProHLer.UpdateCheck.Data.NewVersion) {
  167.         aline @ProHLer.UpdateCheck $ProHLer.C1(Please go to) $ProHLer.C2(%ProHLer.UpdateCheck.Data.SwiftIRCUrl) $ProHLer.C1(and upgrade ur) $ProHLer.C2(ProHLer) $ProHLer.C1(to version) $ProHLer.C2(%ProHLer.UpdateCheck.Data.NewVersion) $+ $ProHLer.C1(!)
  168.       }
  169.       else aline @ProHLer.UpdateCheck $ProHLer.C1(You already got the newest version of) $ProHLer.C2(ProHLer) $ProHLer.C1(there no need to upgrade!)
  170.     }
  171.     else {
  172.       aline $ProHLer.C1().code @ProHLer.UpdateCheck An error has occurred while checking for a new version:
  173.       aline @ProHLer.UpdateCheck $ProHLer.C1(HTTP-Errorcode =) $c2(%ProHLer.UpdateCheck.HTTP.Code)
  174.       aline @ProHLer.UpdateCheck $ProHLer.C1(HTTP-Errorname =) $c2(%ProHLer.UpdateCheck.HTTP.Response)
  175.     }
  176.     aline $ProHLer.C3().code @ProHLer.UpdateCheck -----
  177.   }
  178.   if (%ProHLer.UpdateCheck.Alias) .timerProHLer.UpdateCheck.AliasTimer 1 0 %ProHLer.UpdateCheck.Alias @ProHLer.UpdateCheck
  179. }
  180. alias ProHLer.UpdateCheck.Return1 {
  181.   window -a $gettok($1,1,59)
  182. }
  183. alias ProHLer.UpdateCheck.Return2 {
  184.   if (%ProHLer.UpdateCheck.HTTP.Code == 200) {
  185.     if ($ProHLer.Version < %ProHLer.UpdateCheck.Data.NewVersion) {
  186.       if ($dialog(ProHLer.DMain)) dialog -n $v1
  187.       if ($input(ProHLer Version %ProHLer.UpdateCheck.Data.NewVersion is now available! Do you want to see the update url?,yqd,ProHLer - Question)) {
  188.         window -aw3 @ProHLer.UpdateCheck
  189.       }
  190.       if ($dialog(ProHLer.DMain)) dialog -o $v1
  191.     }
  192.     else window -c @ProHLer.UpdateCheck
  193.   }
  194.   else window -c @ProHLer.UpdateCheck
  195. }
  196. alias ProHler.Version { return 1.31 }
  197. alias ProHLer.Open {
  198.   if ($dialog(ProHLer.DMain)) dialog -x ProHLer.DMain
  199.   if (%ProHLer.On == $null) set %ProHLer.On $true
  200.   if (%ProHLer.Version) {
  201.     if (%ProHLer.Version < $ProHler.Version) {
  202.       var %OldVer %ProHLer.Version
  203.       if (%ProHLer.LastUpdate) var %OldUpdate %ProHLer.LastUpdate
  204.       ProHLer.Nicks.Filter
  205.       ProHLer.Chans.Filter
  206.       noop $input(Thank you for upgrading to ProHLer version " $+ $ProHLer.Version $+ "! $crlf $crlf Please wait patient while we check your current settings!,oid,ProHLer - Info)
  207.       window -xdok0g1 @ProHLer.SettingsCheck
  208.       aline $ProHLer.C1().code @ProHLer.SettingsCheck <***>ProHLer HighLight detection script by: Marlinc<***>
  209.       aline $ProHLer.C3().code @ProHLer.SettingsCheck Loading nickname's that HighLighted you:
  210.       var %i = 1
  211.       while (%i <= $lines(ProHLer.NicksOUT.txt)) {
  212.         var %name $gettok($read(ProHLer.NicksOUT.txt,n,%i),2,59)
  213.         var %times = $gettok($read(ProHLer.NicksOUT.txt,n,%i),3,59)
  214.         aline @ProHLer.SettingsCheck $ProHLer.C2(%name) $ProHLer.C1(=) $ProHLer.C1(%times)
  215.         inc %i
  216.       }
  217.       aline $ProHLer.C3().code @ProHLer.SettingsCheck -----
  218.       aline $ProHLer.C3().code @ProHLer.SettingsCheck Loading channels where you are HighLighted on:
  219.       var %i = 1
  220.       while (%i <= $lines(ProHLer.ChansOUT.txt)) {
  221.         var %name $gettok($read(ProHLer.ChansOUT.txt,n,%i),2,59)
  222.         var %times = $gettok($read(ProHLer.ChansOUT.txt,n,%i),3,59)
  223.         aline @ProHLer.SettingsCheck $ProHLer.C2(%name) $ProHLer.C1(=) $ProHLer.C1(%times)
  224.         inc %i
  225.       }
  226.       aline $ProHLer.C3().code @ProHLer.SettingsCheck -----
  227.       aline $ProHLer.C3().code @ProHLer.SettingsCheck Setting variables:
  228.       aline @ProHLer.SettingsCheck $ProHLer.C1(Setting var:) $ProHLer.C2($+(%,ProHLer.LastUpdate)) $ProHLer.C1(To) $ProHLer.C2($ctime)
  229.       set %ProHLer.LastUpdate $ctime
  230.       aline @ProHLer.SettingsCheck $ProHLer.C1(Setting var:) $ProHLer.C2($+(%,ProHLer.Version)) $ProHLer.C1(To) $ProHLer.C2($ProHLer.Version)
  231.       set %ProHLer.Version $ProHLer.Version
  232.       if (!%ProHLer.UpdateCheck.On) {
  233.         window -u @ProHLer.SettingsCheck
  234.         if ($input(Do you want ProHLer to check for a new version everytime you open the main window?,yqd,ProHLer - Question)) {
  235.           aline @ProHLer.SettingsCheck $ProHLer.C1(Setting var:) $ProHLer.C2($+(%,ProHLer.UpdateCheck.On)) $ProHLer.C1(To) $ProHLer.C2($!true)
  236.           set %ProHLer.UpdateCheck.On $true
  237.         }
  238.         else {
  239.           aline @ProHLer.SettingsCheck $ProHLer.C1(Setting var:) $ProHLer.C2($+(%,ProHLer.UpdateCheck.On)) $ProHLer.C1(To) $ProHLer.C2($!false)
  240.           set %ProHLer.UpdateCheck.On $false
  241.         }
  242.         window -o @ProHLer.SettingsCheck
  243.       }
  244.       aline $ProHLer.C3().code @ProHLer.SettingsCheck -----
  245.       aline $ProHLer.C3().code @ProHLer.SettingsCheck Thank you for upgrading to ProHLer version " $+ $ProHLer.Version $+ " from version " $+ %OldVer $+ "!  
  246.       if (%oldUpdate) aline $ProHLer.C3().code @ProHLer.SettingsCheck Your last update as on $asctime(%OldUpdate) that was $ProHLer.Duration($calc($ctime - %OldUpdate)) ago!
  247.     }
  248.     else {
  249.       if (%ProHLer.UpdateCheck.On) {
  250.         ProHLer.UpdateCheck.Start ProHLer.UpdateCheck.Return2
  251.       }
  252.     }
  253.   }
  254.   else {
  255.     noop $input(Thank you for installing ProHLer version " $+ $ProHLer.Version $+ "! $crlf $crlf Please wait patient while we set some settings!,oid,ProHLer - Info)
  256.     window -xdok0g1 @ProHLer.SettingsCheck
  257.     aline $ProHLer.C1().code @ProHLer.SettingsCheck <***>ProHLer HighLight detection script by: Marlinc<***>
  258.     aline $ProHLer.C3().code @ProHLer.SettingsCheck Setting variables:
  259.     aline @ProHLer.SettingsCheck $ProHLer.C1(Setting var:) $ProHLer.C2($+(%,ProHLer.LastUpdate)) $ProHLer.C1(To) $ProHLer.C2($ctime)
  260.     set %ProHLer.LastUpdate $ctime
  261.     aline @ProHLer.SettingsCheck $ProHLer.C1(Setting var:) $ProHLer.C2($+(%,ProHLer.Version)) $ProHLer.C1(To) $ProHLer.C2($ProHLer.Version)
  262.     set %ProHLer.Version $ProHLer.Version
  263.     window -u @ProHLer.SettingsCheck
  264.     if ($input(Do you want ProHLer to check for a new version everytime you open the main window?,yqd,ProHLer - Question)) {
  265.       aline @ProHLer.SettingsCheck $ProHLer.C1(Setting var:) $ProHLer.C2($+(%,ProHLer.UpdateCheck.On)) $ProHLer.C1(To) $ProHLer.C2($!true)
  266.       set %ProHLer.UpdateCheck.On $true
  267.     }
  268.     else {
  269.       aline @ProHLer.SettingsCheck $ProHLer.C1(Setting var:) $ProHLer.C2($+(%,ProHLer.UpdateCheck.On)) $ProHLer.C1(To) $ProHLer.C2($!false)
  270.       set %ProHLer.UpdateCheck.On $false
  271.     }
  272.     if ($input(Do you want to use " $+ $me $+ " as a highlighter?,yqd,ProHLer - Question)) {
  273.       aline @ProHLer.SettingsCheck $ProHLer.C1(Setting var:) $ProHLer.C2($+(%,ProHLer.Highlights)) $ProHLer.C1(To) $ProHLer.C2($me)
  274.       set %ProHLer.Highlights $me
  275.     }
  276.     window -o @ProHLer.SettingsCheck
  277.     aline $ProHLer.C3().code @ProHLer.SettingsCheck -----
  278.     aline $ProHLer.C3().code @ProHLer.SettingsCheck Thank you for installing ProHLer version " $+ $ProHLer.Version $+ "!
  279.   }
  280.   dialog -mordv ProHLer.DMain ProHLer.DMain
  281. }
  282. alias ProHLer.DMain.Reload {
  283.   ProHLer.Nicks.Filter
  284.   ProHLer.Chans.Filter
  285.  
  286.   if ($dialog(ProHLer.DMain)) {
  287.     did -ra ProHLer.DMain 31 $bytes($iif(%ProHLer.TotalHls isnum,%ProHLer.TotalHls,0),bd)
  288.     did -ra ProHLer.DMain 37 $bytes($iif(%ProHLer.TotalHls isnum,$var(%ProHLer.Nicks.*,0),0),bd)
  289.     did -ra ProHLer.DMain 39 $bytes($iif(%ProHLer.TotalHls isnum,$var(%ProHLer.Chans.*,0),0),bd)
  290.     var %name $gettok($read(ProHLer.NicksOUT.txt,n,1),2,59)
  291.     var %times = $gettok($read(ProHLer.NicksOUT.txt,n,1),3,59)
  292.     did -ra ProHLer.DMain 33 $iif(%name,%name,None) $+ $chr(40) $+ $bytes($iif(%times,%times,0),bd) $+ $chr(41)
  293.     var %chan $gettok($read(ProHLer.ChansOUT.txt,n,1),2,59)
  294.     var %times = $gettok($read(ProHLer.ChansOUT.txt,n,1),3,59)
  295.     did -ra ProHLer.DMain 35 $iif(%chan,%chan,None) $+ $chr(40) $+ $bytes($iif(%times,%times,0),bd) $+ $chr(41)
  296.     did -ra ProHLer.DMain 41 $bytes($iif(%ProHLer.TotalNonHls isnum,%ProHLer.TotalNonHls,0),bd)
  297.     did -h ProHLer.DMain 22
  298.     did -h ProHLer.DMain 42
  299.     did -h ProHLer.DMain 43
  300.     did -ra ProHLer.DMain 43 $bytes($calc($iif(%ProHLer.TotalHls isnum,%ProHLer.TotalHls,0) / $iif(%ProHLer.Average.Day isnum,%ProHLer.Average.Day,0)),bd)
  301.     did -ra ProHLer.DMain 55 Turn ProHLer $iif(%ProHLer.On,Off,On)
  302.   }
  303. }
  304. alias ProHLer.DHLers.Reload {
  305.   if ($dialog(ProHLer.DHLers)) {
  306.     did -ra ProHLer.DHLers 31 None
  307.     did -rm ProHLer.DHLers 33
  308.     did -r ProHLer.DHLers 70
  309.     did -r ProHLer.DHLers 71
  310.     var %i = 1
  311.     while (%i <= $numtok(%ProHLer.Highlights,59)) {
  312.       did -a ProHLer.DHLers 70 %i
  313.       did -a ProHLer.DHLers 71 $gettok(%ProHLer.Highlights,%i,59)
  314.       inc %i
  315.     }
  316.   }
  317. }
  318. alias ProHLer.DNoHL.Reload {
  319.   if ($dialog(ProHLer.DNoHL)) {
  320.     did -ra ProHLer.DNoHL 31 None
  321.     did -rm ProHLer.DNoHL 33
  322.     did -r ProHLer.DNoHL 70
  323.     did -r ProHLer.DNoHL 71
  324.     var %i = 1
  325.     while (%i <= $numtok(%ProHLer.NoHls,59)) {
  326.       did -a ProHLer.DNoHL 70 %i
  327.       did -a ProHLer.DNoHL 71 $gettok(%ProHLer.NoHls,%i,59)
  328.       inc %i
  329.     }
  330.   }
  331. }
  332. alias ProHLer.DSettings.Reload {
  333.   if ($dialog(ProHLer.DSettings)) {
  334.     did -ra ProHLer.DSettings 50 $iif(%ProHLer.UpdateCheck.On,Disable,Enable) AutoUpdate
  335.   }
  336. }
  337. alias ProHLer.Nicks.Filter {
  338.   write -c ProHLer.NicksIN.txt
  339.   write -c ProHLer.NicksOUT.txt
  340.   var %i = 1
  341.   while (%i <= $var(%ProHLer.Nicks.*,0)) {
  342.     write ProHLer.NicksIN.txt $var(%ProHLer.Nicks.*,%i) $+ $chr(59) $+ $remove($var(%ProHLer.Nicks.*,%i),%,ProHLer.Nicks.) $+ $chr(59) $+ $eval($var(%ProHLer.Nicks.*,%i),2)
  343.     inc %i
  344.   }
  345.   filter -fk ProHLer.NicksIN.txt ProHLer.Nicks.FilterGet *
  346.   write -c ProHLer.NicksIN.txt
  347. }
  348. alias ProHLer.Nicks.FilterGet {
  349.   var %data $1-
  350.   tokenize 59 %data
  351.   var %high $gettok($read(ProHLer.NicksOUT.txt,n,1),3,59)
  352.   var %high $iif(%high,%high,0)
  353.   if ($3 > %high) {
  354.     write -il1 ProHLer.NicksOUT.txt %data
  355.   }
  356.   else {
  357.     write ProHLer.NicksOUT.txt %data
  358.   }
  359. }
  360. alias ProHLer.Chans.Filter {
  361.   write -c ProHLer.ChansIN.txt
  362.   write -c ProHLer.ChansOUT.txt
  363.   var %i = 1
  364.   while (%i <= $var(%ProHLer.Chans.*,0)) {
  365.     write ProHLer.ChansIN.txt $var(%ProHLer.Chans.*,%i) $+ $chr(59) $+ $remove($var(%ProHLer.Chans.*,%i),%,ProHLer.Chans.) $+ $chr(59) $+ $eval($var(%ProHLer.Chans.*,%i),2)
  366.     inc %i
  367.   }
  368.   filter -fk ProHLer.ChansIN.txt ProHLer.Chans.FilterGet *
  369.   write -c ProHLer.ChansIN.txt
  370. }
  371. alias ProHLer.Chans.FilterGet {
  372.   var %data $1-
  373.   tokenize 59 %data
  374.   var %high $gettok($read(ProHLer.ChansOUT.txt,n,1),3,59)
  375.   var %high $iif(%high,%high,0)
  376.   if ($3 > %high) {
  377.     write -il1 ProHLer.ChansOUT.txt %data
  378.   }
  379.   else {
  380.     write ProHLer.ChansOUT.txt %data
  381.   }
  382. }
  383. alias ProHler.NoHL {
  384.   if ($1) {
  385.     var %i = 1
  386.     while (%i <= $numtok(%ProHLer.NoHls,59)) {
  387.       if ($gettok(%ProHLer.NoHls,%i,59) iswm $1) return $gettok(%ProHLer.NoHls,%i,59)
  388.       inc %i
  389.     }
  390.   }
  391.   else return %ProHLer.NoHls
  392. }
  393. alias ProHLer.Off {
  394.   set %ProHLer.On $false
  395.   echo -at $ProHLer.C1(ProHLer is now turned off!)
  396. }
  397. alias ProHLer.On {
  398.   set %ProHLer.On $true
  399.   echo -at $ProHLer.C1(ProHLer is now turned on!)
  400. }
  401. on ^*:TEXT:*:*: {
  402.   if (%ProHLer.On) {
  403.     var %hltext $replace($1-,$chr(59),-)
  404.     var %hlplace $iif($chan,$chan,$nick)
  405.     var %i = 1
  406.     while (%i <= $numtok(%ProHLer.Highlights,59)) {
  407.       var %hler $eval($gettok(%ProHLer.Highlights,%i,59),2)
  408.       if (%hler isin %hltext) {
  409.         if ($ProHler.NoHL($nick)) {
  410.           inc %ProHLer.TotalNonHls
  411.         }
  412.         else {
  413.           inc %ProHLer.TotalHls
  414.           inc %ProHLer.Nicks. $+ $nick
  415.           set %ProHLer.Last.Nick $nick
  416.           set %ProHLer.Last.Time $ctime
  417.           if (%ProHLer.Date.Day != $date(dd-mm-yy)) {
  418.             set %ProHLer.Date.Day $date(dd-mm-yy)
  419.             inc %ProHLer.Average.Day
  420.           }
  421.           var %i = 1
  422.           while (%i <= $cnick(0)) {
  423.             if ($cnick(%i) iswm $nick) { var %c $cnick(%i).color | break }
  424.             elseif (($nick isop $chan) && (@ isin $cnick(%i).modes)) { var %c $cnick(%i).color | break }
  425.             elseif (($nick ishop $chan) && (% isin $cnick(%i).modes)) { var %c $cnick(%i).color | break }
  426.             elseif (($nick isvoice $chan) && (+ isin $cnick(%i).modes)) { var %c $cnick(%i).color | break }
  427.             elseif (($nick isreg $chan) && ($cnick(%i).nomode) || (!$chan)) { var %c $cnick(%i).color | break }
  428.             inc %i
  429.           }
  430.           if (!%c) var %c $color(text)
  431.           if ($nick isop $chan) { var %cc @ }
  432.           elseif ($nick ishop $chan) { var %cc % }
  433.           elseif ($nick isvoice $chan) { var %cc + }
  434.           echo -tmg $iif($chan,$chan,$nick) $+(<,%c,%cc,$nick,>) $ProHLer.C1 $+ $replace($strip(%hltext),%hler,$ProHLer.C2(%hler) $+ $ProHLer.C1)
  435.           if ($chan) inc %ProHLer.Chans. $+ $chan
  436.           if ($window(@ProHLer. $+ $nick)) {
  437.             rline $ProHLer.C2().code @ProHLer. $+ $nick 2 --- $+ $nick HighLighted you $bytes($eval($+(%,ProHLer.Nicks.,$nick),2),bd) time $+ $iif($eval($+(%,ProHLer.Nicks.,$nick),2) != 1,s) $+ !
  438.             aline $ProHLer.C3().code @ProHLer. $+ $nick $ProHLer.C1(HL) $+ $chr(40) $+ $bytes($calc($line(@ProHLer. $+ $nick,0) - 1),bd) - %hlplace - $gmt(HH:nn:ss) $+ $chr(41) $+ $+(<,%c,%cc,$nick,>03) $+ : $ProHLer.C1 $+ $replace($strip(%hltext),%hler,$ProHLer.C4(%hler) $+ $ProHLer.C1)
  439.           }
  440.           else {
  441.             window -k0l35n2vxz @ProHLer. $+ $nick
  442.             aline -al @ProHLer. $+ $nick Add to NonHighlighting Nicknames
  443.             aline -al @ProHLer. $+ $nick Open ProHLer
  444.             aline -al @ProHLer. $+ $nick Close Window
  445.             aline -al @ProHLer. $+ $nick Close all ProHLer Windows
  446.             renwin @ProHLer. $+ $nick @ProHLer. $+ $nick HighLight info( $+ $nick $+ )
  447.             aline $ProHLer.C1().code @ProHLer. $+ $nick <***>ProHLer HighLight detection script by: Marlinc - Version $ProHLer.Version $+ <***>
  448.             aline $ProHLer.C2().code @ProHLer. $+ $nick --- $+ $nick HighLighted you $bytes($eval($+(%,ProHLer.Nicks.,$nick),2),bd) time $+ $iif($eval($+(%,ProHLer.Nicks.,$nick),2) != 1,s) $+ !
  449.             aline $ProHLer.C3().code @ProHLer. $+ $nick $ProHLer.C3(HL) $+ $chr(40) $+ 1 - %hlplace - $gmt(HH:nn:ss) $+ $chr(41) $+ $+(<,%c,%cc,$nick,> $+ $ProHLer.C2) $+ : $ProHLer.C1 $+ $replace($strip(%hltext),%hler,$ProHLer.C4(%hler) $+ $ProHLer.C1)
  450.           }
  451.           ProHLer.DMain.Reload
  452.           noop $tip(ProHLer. $+ $nick $+ . $+ $ticks,$ProHLer.C1(Pro) $+ $ProHLer.C2(HL) $+ $ProHLer.C1(er) $+ :,$ProHLer.C2($nick) $ProHLer.C1(HighLighted you!) $crlf $ProHLer.C1(Network:) $ProHLer.C2($network) $iif($chan,$crlf $ProHLer.C1(Channel:) $ProHLer.C2($chan)) $crlf $ProHLer.C1(Text:) $ProHLer.C2($replace($strip(%hltext),%hler,05 $+ %hler $+ 03),10)))
  453.           flash -b5 ProHLer: $nick HighLighted you!
  454.           window -g2 %hlplace
  455.           haltdef
  456.           break
  457.         }
  458.       }
  459.       inc %i
  460.     }
  461.   }
  462. }
  463. dialog -l ProHLer.DMain {
  464.  
  465.   ;ID Info:
  466.   ;Boxes 20-30
  467.   ;Lables(Text) 30-50
  468.   ;Buttons 50-70
  469.  
  470.   title      "ProHLer - Main(Loading...)"
  471.   size       -1 -1 320 100
  472.   option     dbu
  473.  
  474.   box        "Status"                 , 20, 5 5 150 75
  475.   box        "Settings"               , 21, 155 5 150 85
  476.   box        "Status"                 , 22, 5 5 150 85
  477.   text       "Total HighLights:"      , 30, 10 15 75 10
  478.   text       "Loading..."             , 31, 80 15 70 10
  479.   text       "Most Highlights(Nick):" , 32, 10 25 75 10
  480.   text       "Loading..."             , 33, 80 25 70 10
  481.   text       "Most Highlights(Chan):" , 34, 10 35 75 10
  482.   text       "Loading..."             , 35, 80 35 70 10
  483.   text       "Different nicks:"       , 36, 10 45 75 10
  484.   text       "Loading..."             , 37, 80 45 70 10
  485.   text       "Different channels:"    , 38, 10 55 75 10
  486.   text       "Loading..."             , 39, 80 55 70 10
  487.   text       "Ignored HighLights:"    , 40, 10 65 75 10
  488.   text       "Loading..."             , 41, 80 65 70 10
  489.   text       "Average per day:"       , 42, 10 75 75 10
  490.   text       "Loading..."             , 43, 80 75 70 10
  491.   button     "Close ProHLer Windows"  , 50, 160 25 80 10
  492.   button     "Reset Data!"            , 51, 160 35 80 10
  493.   button     "HighLighters!"          , 52, 160 45 80 10
  494.   button     "NonHighLighting nicknames!" , 53, 160 55 80 10
  495.   button     "Show extra stats"        , 54, 160 65 80 10
  496.   button     "Turn ProHLer ..."        , 55, 160 15 80 10
  497.   button     "Settings"                , 56, 160 75 80 10
  498. }
  499. on *:dialog:ProHLer.DMain:init:0: {
  500.   dialog -t $dname ProHLer(Version $ProHLer.Version $+ ) - Main
  501.  
  502.   ProHLer.DMain.Reload
  503. }
  504. on *:dialog:ProHLer.DMain:sclick:50: {
  505.   dialog -n $dname
  506.   if ($window(@ProHLer.SettingsCheck)) window -c @ProHLer.SettingsCheck
  507.   if ($input(Are you sure you want to close all the ProHLer windows?,yqd,ProHLer - Question)) {
  508.     var %total $window(@ProHLer.*,0)
  509.     close -@ProHLer.*
  510.     dialog -x $dname
  511.     if ($dialog(ProHLer.DNoHL)) dialog -x $v1
  512.     if ($dialog(ProHLer.DHLers)) dialog -x $v1
  513.     if ($dialog(ProHLer.DResetStats)) dialog -x $v1
  514.     if ($dialog(ProHLer.DSettings)) dialog -x $v1
  515.     noop $input(All ProHLer windows are closed! Total: %total,oid,ProHLer - Info)
  516.   }
  517. }
  518. on *:dialog:ProHLer.DMain:sclick:51: {
  519.   if ($window(@ProHLer.SettingsCheck)) window -c @ProHLer.SettingsCheck
  520.   dialog -mordv ProHLer.DResetStats ProHLer.DResetStats
  521. }
  522. on *:dialog:ProHLer.DMain:sclick:52: {
  523.   if ($window(@ProHLer.SettingsCheck)) window -c @ProHLer.SettingsCheck
  524.   dialog -mordv ProHLer.DHLers ProHLer.DHLers
  525. }
  526. on *:dialog:ProHLer.DMain:sclick:53: {
  527.   if ($window(@ProHLer.SettingsCheck)) window -c @ProHLer.SettingsCheck
  528.   dialog -mordv ProHLer.DNoHL ProHLer.DNoHL
  529. }
  530. on *:dialog:ProHLer.DMain:sclick:54: {
  531.   if ($did(20).visible) {
  532.     did -h $dname 20
  533.     did -v $dname 22
  534.     did -v ProHLer.DMain 42
  535.     did -v ProHLer.DMain 43
  536.     did -ra $dname $did Hide extra stats
  537.   }
  538.   else {
  539.     did -v $dname 20
  540.     did -h $dname 22
  541.     did -h ProHLer.DMain 42
  542.     did -h ProHLer.DMain 43
  543.     did -ra $dname $did Show extra stats
  544.   }
  545. }
  546. on *:dialog:ProHLer.DMain:sclick:55: {
  547.   if (%ProHLer.On) {
  548.     ProHLer.Off
  549.     did -ra ProHLer.DMain 55 Turn ProHLer On
  550.   }
  551.   else {
  552.     ProHLer.On
  553.     did -ra ProHLer.DMain 55 Turn ProHLer Off
  554.   }
  555. }
  556. on *:dialog:ProHLer.DMain:sclick:56: {
  557.   if ($window(@ProHLer.SettingsCheck)) window -c @ProHLer.SettingsCheck
  558.   dialog -mordv ProHLer.DSettings ProHLer.DSettings
  559. }
  560. on *:dialog:ProHLer.DMain:close:0: {
  561.   if ($window(@ProHLer.SettingsCheck)) window -c @ProHLer.SettingsCheck
  562. }
  563. dialog -l ProHLer.DHLers {
  564.  
  565.   ;ID Info:
  566.   ;Boxes 20-30
  567.   ;Lables(Text&Edit) 30-50
  568.   ;Buttons 50-70
  569.   ;Lists 70-80
  570.  
  571.   title      "ProHLer - HighLighters(Loading...)"
  572.   size       -1 -1 270 170
  573.   option     dbu
  574.  
  575.   box        "HighLighter Editor"     , 20, 5 5 250 60
  576.   box        "HighLighters"           , 21, 5 65 250 85
  577.   text       "Nr:"                    , 30, 10 15 50 10
  578.   text       "Loading..."             , 31, 80 15 50 10
  579.   text       "Edit:"                  , 32, 10 25 50 10
  580.   edit       "Loading..."             , 33, 77 25 150 10
  581.   text       "Things like $me or $mnick are allowd!" , 34, 10 37 100 20
  582.   list                                  70, 10 75 10 60
  583.   list                                  71, 77 75 150 60
  584.   button     "Delete Selected"        , 50, 10 135 80 10
  585.   button     "Add one"                , 51, 90 135 80 10
  586.   button     "Save"                   , 52, 10 45 80 10
  587.   button     "Save all / Exit"        , 53, 5 155 80 10
  588. }
  589. on *:dialog:ProHLer.DHLers:init:0: {
  590.   if ($dialog(ProHLer.DMain)) dialog -n ProHLer.DMain
  591.   ProHLer.DHLers.Reload
  592.   dialog -t $dname ProHLer(Version $ProHLer.Version $+ ) - HighLighters
  593. }
  594. on *:dialog:ProHLer.DHLers:sclick:50: {
  595.   dialog -n $dname
  596.   if ($did(71).sel) {
  597.     var %nr $did(71).sel
  598.     var %text $did(71).seltext
  599.     if ($input(Are you sure you want to delete the folowing HighLighter: $+ $crlf $+ Nr: %nr $+ $crlf $+ Text: %text,yqd,ProHLer - Question)) {
  600.       did -d $dname 70 %nr
  601.       did -d $dname 71 %nr
  602.       var %i = 1
  603.       while (%i <= $did(70).lines) {
  604.         did -o $dname 70 %i %i
  605.         inc %i
  606.       }
  607.       did -ra $dname 31 None
  608.       did -rma $dname 33
  609.     }
  610.   }
  611.   else {
  612.     noop $input(There is no HighLighter selected!,oid,ProHLer - Info)
  613.   }
  614.   dialog -o $dname
  615. }
  616. on *:dialog:ProHLer.DHLers:sclick:51: {
  617.   dialog -n $dname
  618.   var %nr $calc($did(70).lines + 1)
  619.   if (%nr <= 30) {
  620.     did -a $dname 70 %nr
  621.     did -a $dname 71 New HighLighter: %nr
  622.     did -c $dname 70 %nr
  623.     did -c $dname 71 %nr
  624.  
  625.     did -ra $dname 31 $did(70).sel
  626.     did -ra $dname 33 $did(71).seltext
  627.     did -fn $dname 33
  628.   }
  629.   else {
  630.     noop $input(Sorry we only accept 30 HighLighters!,oid,ProHLer - Info)
  631.   }
  632.   dialog -o $dname
  633. }
  634. on *:dialog:ProHLer.DHLers:sclick:52: {
  635.   dialog -n $dname
  636.   if ($did(71).sel) {
  637.     var %nr $did(31).text
  638.     var %text $did(33).text
  639.     did -o $dname 70 %nr %nr
  640.     did -o $dname 71 %nr %text
  641.     did -c $dname 70 %nr
  642.     did -c $dname 71 %nr
  643.   }
  644.   else {
  645.     noop $input(There is no HighLighter selected!,oid,ProHLer - Info)
  646.   }
  647.   dialog -o $dname
  648. }
  649. on *:dialog:ProHLer.DHLers:sclick:53: {
  650.   dialog -n $dname
  651.   set %ProHLer.Highlights $didtok($dname,71,59)
  652.   noop $input(Your HighLighters are saved!,oid,ProHLer - Info)
  653.   dialog -x $dname
  654.   if ($dialog(ProHLer.DMain)) dialog -o ProHLer.DMain
  655. }
  656. on *:dialog:ProHLer.DHLers:sclick:70: {
  657.   did -ra $dname 31 $did($did).sel
  658.   did -ran $dname 33 $did(71,$did($did).sel).text
  659.   did -c $dname 71 $did($did).sel
  660. }
  661. on *:dialog:ProHLer.DHLers:sclick:71: {
  662.   did -ra $dname 31 $did($did).sel
  663.   did -ran $dname 33 $did($did).seltext
  664.   did -c $dname 70 $did($did).sel
  665. }
  666. on *:dialog:ProHLer.DHLers:close:0: {
  667.   if ($didtok($dname,71,59) != %ProHLer.Highlights) {
  668.     if ($input(You made some changes! Do you want to save them?,yqd,ProHLer - Question)) {
  669.       set %ProHLer.Highlights $didtok($dname,71,59)
  670.       noop $input(Your HighLighters are saved!,oid,ProHLer - Info)
  671.     }
  672.   }
  673.   if ($dialog(ProHLer.DMain)) dialog -o ProHLer.DMain
  674. }
  675. dialog -l ProHLer.DNoHL {
  676.  
  677.   ;ID Info:
  678.   ;Boxes 20-30
  679.   ;Lables(Text&Edit) 30-50
  680.   ;Buttons 50-70
  681.   ;Lists 70-80
  682.  
  683.   title      "ProHLer - NonHighLighting nicknames(Loading...)"
  684.   size       -1 -1 300 170
  685.   option     dbu
  686.  
  687.   box        "Nickname Editor"     , 20, 5 5 250 60
  688.   box        "Nicknames"           , 21, 5 65 250 85
  689.   text       "Nr:"                    , 30, 10 15 50 10
  690.   text       "Loading..."             , 31, 80 15 50 10
  691.   text       "Edit:"                  , 32, 10 25 50 10
  692.   edit       "Loading..."             , 33, 77 25 150 10
  693.   text       "Wildcards(*) are allowed at nicknames!" , 34, 10 37 100 20
  694.   list                                  70, 10 75 10 60
  695.   list                                  71, 77 75 150 60
  696.   button     "Delete Selected"        , 50, 10 135 80 10
  697.   button     "Add one"                , 51, 90 135 80 10
  698.   button     "Save"                   , 52, 10 45 80 10
  699.   button     "Save all / Exit"        , 53, 5 155 80 10
  700. }
  701. on *:dialog:ProHLer.DNoHL:init:0: {
  702.   if ($dialog(ProHLer.DMain)) dialog -n ProHLer.DMain
  703.   ProHLer.DNoHL.Reload
  704.   dialog -t $dname ProHLer(Version $ProHLer.Version $+ ) - NonHighLight nicknames
  705.   if (%proHler.DNoHL.nick) {
  706.     dialog -n $dname
  707.     if (!$didwm($dname,71,%proHler.DNoHL.nick)) {
  708.       var %nr $calc($did(70).lines + 1)
  709.       if (%nr <= 40) {
  710.         did -a $dname 70 %nr
  711.         did -a $dname 71 %proHler.DNoHL.nick
  712.         did -c $dname 70 %nr
  713.         did -c $dname 71 %nr
  714.  
  715.         did -ra $dname 31 $did(70).sel
  716.         did -ranf $dname 33 $did(71).seltext
  717.       }
  718.       else {
  719.         noop $input(Sorry we only accept 40 nicknames!,oid,ProHLer - Info)
  720.       }
  721.     }
  722.     else {
  723.       noop $input(The nickname " $+ %proHler.DNoHL.nick $+ " is already at your NonHighLighting nickname list! $+ $crlf $+ At nr: $didwm($dname,71,%proHler.DNoHL.nick),oid,ProHLer - Info)
  724.       dialog -x $dname
  725.     }
  726.     dialog -o $dname
  727.     unset %proHler.DNoHL.nick
  728.   }
  729. }
  730. on *:dialog:ProHLer.DNoHL:sclick:50: {
  731.   dialog -n $dname
  732.   if ($did(71).sel) {
  733.     var %nr $did(71).sel
  734.     var %text $did(71).seltext
  735.     if ($input(Are you sure you want to delete the folowing nickname: $+ $crlf $+ Nr: %nr $+ $crlf $+ Text: %text,yqd,ProHLer - Question)) {
  736.       did -d $dname 70 %nr
  737.       did -d $dname 71 %nr
  738.       var %i = 1
  739.       while (%i <= $did(70).lines) {
  740.         did -o $dname 70 %i %i
  741.         inc %i
  742.       }
  743.       did -ra $dname 31 None
  744.       did -ram $dname 33
  745.     }
  746.   }
  747.   else {
  748.     noop $input(There is no nickname selected!,oid,ProHLer - Info)
  749.   }
  750.   dialog -o $dname
  751. }
  752. on *:dialog:ProHLer.DNoHL:sclick:51: {
  753.   dialog -n $dname
  754.   var %nr $calc($did(70).lines + 1)
  755.   if (%nr <= 40) {
  756.     did -a $dname 70 %nr
  757.     did -a $dname 71 Nickname %nr
  758.     did -c $dname 70 %nr
  759.     did -c $dname 71 %nr
  760.  
  761.     did -ra $dname 31 $did(70).sel
  762.     did -rafn $dname 33 $did(71).seltext
  763.   }
  764.   else {
  765.     noop $input(Sorry we only accept 40 nicknames!,oid,ProHLer - Info)
  766.   }
  767.   dialog -o $dname
  768. }
  769. on *:dialog:ProHLer.DNoHL:sclick:52: {
  770.   dialog -n $dname
  771.   if ($did(71).sel) {
  772.     var %nr $did(31).text
  773.     var %text $did(33).text
  774.     did -o $dname 70 %nr %nr
  775.     did -o $dname 71 %nr %text
  776.     did -c $dname 70 %nr
  777.     did -c $dname 71 %nr
  778.   }
  779.   else {
  780.     noop $input(There is no nickname selected!,oid,ProHLer - Info)
  781.   }
  782.   dialog -o $dname
  783. }
  784. on *:dialog:ProHLer.DNoHL:sclick:53: {
  785.   dialog -n $dname
  786.   set %ProHLer.NoHls $didtok($dname,71,59)
  787.   var %i = 1
  788.   while (%i <= $numtok(%ProHLer.NoHls,59)) {
  789.     if ($window(@ProHLer. $+ $gettok(%ProHLer.NoHls,%i,59))) window -c @ProHLer. $+ $gettok(%ProHLer.NoHls,%i,59))
  790.     inc %i
  791.   }
  792.   noop $input(Your non highlighting nicknames are saved!,oid,ProHLer - Info)
  793.   dialog -x $dname
  794.   if ($dialog(ProHLer.DMain)) dialog -o ProHLer.DMain
  795. }
  796. on *:dialog:ProHLer.DNoHL:sclick:70: {
  797.   did -ra $dname 31 $did($did).sel
  798.   did -ran $dname 33 $did(71,$did($did).sel).text
  799.   did -c $dname 71 $did($did).sel
  800. }
  801. on *:dialog:ProHLer.DNoHL:sclick:71: {
  802.   did -ra $dname 31 $did($did).sel
  803.   did -ran $dname 33 $did($did).seltext
  804.   did -c $dname 70 $did($did).sel
  805. }
  806. on *:dialog:ProHLer.DNoHL:close:0: {
  807.   if ($didtok($dname,71,59) != %ProHLer.NoHls) {
  808.     if ($input(You made some changes! Do you want to save them?,yqd,ProHLer - Question)) {
  809.       set %ProHLer.NoHls $didtok($dname,71,59)
  810.       noop $input(Your non highlighting nicknames are saved!,oid,ProHLer - Info)
  811.     }
  812.   }
  813.   if ($dialog(ProHLer.DMain)) dialog -o ProHLer.DMain
  814. }
  815. dialog -l ProHLer.DResetStats {
  816.  
  817.   ;ID Info:
  818.   ;Boxes 20-30
  819.   ;Lables(Text&Edit) 30-50
  820.   ;Buttons 50-70
  821.   ;Lists 70-80
  822.  
  823.   title      "ProHLer - Reseting(Loading...)"
  824.   size       -1 -1 120 90
  825.   option     dbu
  826.  
  827.   box        "Reset"     , 20, 5 5 90 60
  828.   button     "Reset Stats(nicknames)" , 50, 10 15 80 10
  829.   button     "Reset Stats(Channels)"  , 51, 10 25 80 10
  830.   button     "Reset All ignored HighLights" , 52, 10 35 80 10
  831.   button     "Reset All HighLight stats" , 53, 10 45 80 10
  832.   button     "Exit"                   , 54, 5 70 80 10
  833. }
  834. on *:dialog:ProHLer.DResetStats:init:0: {
  835.   if ($dialog(ProHLer.DMain)) dialog -n ProHLer.DMain
  836.   dialog -t $dname ProHLer(Version $ProHLer.Version $+ ) - Reseting
  837. }
  838. on *:dialog:ProHLer.DResetStats:sclick:50: {
  839.   dialog -n $dname
  840.   if ($input(Are you sure you want to reset the nickname HighLight stats?,yqd,ProHLer - Question)) {
  841.     var %total $bytes($iif(%ProHLer.TotalHls isnum,$var(%ProHLer.Nicks.*,0),0),bd)
  842.     unset %ProHLer.Nicks.*
  843.     noop $input(All Nickname HighLight stats are reseted! Total: %total,oid,ProHLer - Info)
  844.     ProHLer.DMain.Reload
  845.   }
  846.   dialog -o $dname
  847. }
  848. on *:dialog:ProHLer.DResetStats:sclick:51: {
  849.   dialog -n $dname
  850.   if ($input(Are you sure you want to reset the Channel HighLight stats?,yqd,ProHLer - Question)) {
  851.     var %total $bytes($iif(%ProHLer.TotalHls isnum,$var(%ProHLer.Chans.*,0),0),bd)
  852.     unset %ProHLer.Chans.*
  853.     noop $input(All Channel HighLight stats are reseted! Total: %total,oid,ProHLer - Info)
  854.     ProHLer.DMain.Reload
  855.   }
  856.   dialog -o $dname
  857. }
  858. on *:dialog:ProHLer.DResetStats:sclick:52: {
  859.   dialog -n $dname
  860.   if ($input(Are you sure you want to reset the ignored HighLight stats?,yqd,ProHLer - Question)) {
  861.     unset %ProHLer.TotalNonHls
  862.     noop $input(Your ignored HighLight stats are reseted!,oid,ProHLer - Info)
  863.     ProHLer.DMain.Reload
  864.   }
  865.   dialog -o $dname
  866. }
  867. on *:dialog:ProHLer.DResetStats:sclick:53: {
  868.   dialog -n $dname
  869.   if ($input(Are you sure you want to reset the all HighLight stats?,yqd,ProHLer - Question)) {
  870.     var %total $bytes($iif(%ProHLer.TotalHls isnum,$var(%ProHLer.Nicks.*,0),0),bd)
  871.     var %totalc $bytes($iif(%ProHLer.TotalHls isnum,$var(%ProHLer.Chans.*,0),0),bd)
  872.     var %totaltot $iif(%ProHLer.TotalHls isnum,%ProHLer.TotalHls,0)
  873.     var %totaligtot $iif(%ProHLer.TotalNonHls isnum,%ProHLer.TotalNonHls,0)
  874.     unset %ProHLer.Nicks.*
  875.     unset %ProHLer.Chans.*
  876.     unset %ProHLer.TotalHls
  877.     unset %ProHLer.TotalNonHls
  878.     unset %ProHLer.Date.Day
  879.     unset %ProHLer.Average.Day
  880.     unset %ProHLer.Last.Nick
  881.     unset %ProHLer.Last.Time
  882.     noop $input(All HighLight stats are reseted! Total(Nicknames): %total $crlf Total(Channels): %totalc $crlf Total(All HighLights): %totaltot $crlf Total(All Ignored HighLights): %totaligtot,oid,ProHLer - Info)
  883.     ProHLer.DMain.Reload
  884.   }
  885.   dialog -o $dname
  886. }
  887. on *:dialog:ProHLer.DResetStats:sclick:54: {
  888.   dialog -x $dname
  889.   ProHLer.DMain.Reload
  890.   if ($dialog(ProHLer.DMain)) dialog -o ProHLer.DMain
  891. }
  892. on *:dialog:ProHLer.DResetStats:close:0: {
  893.   ProHLer.DMain.Reload
  894.   if ($dialog(ProHLer.DMain)) dialog -o ProHLer.DMain
  895. }
  896. dialog -l ProHLer.DSettings {
  897.  
  898.   ;ID Info:
  899.   ;Boxes 20-30
  900.   ;Lables(Text&Edit) 30-50
  901.   ;Buttons 50-70
  902.   ;Lists 70-80
  903.  
  904.   title      "ProHLer - Settings(Loading...)"
  905.   size       -1 -1 120 90
  906.   option     dbu
  907.  
  908.   box        "Settings"     , 20, 5 5 90 60
  909.   button     "... UpdateCheck"              , 50, 10 15 80 10
  910.   button     "Exit"                         , 54, 5 70 80 10
  911. }
  912. on *:dialog:ProHLer.DSettings:init:0: {
  913.   if ($dialog(ProHLer.DMain)) dialog -n ProHLer.DMain
  914.   ProHLer.DSettings.Reload
  915.   dialog -t $dname ProHLer(Version $ProHLer.Version $+ ) - Settings
  916. }
  917. on *:dialog:ProHLer.DSettings:sclick:50: {
  918.   dialog -n $dname
  919.   if (%ProHLer.UpdateCheck.On) {
  920.     set %ProHLer.UpdateCheck.On $false
  921.     did -ra ProHLer.DSettings 50 Enable UpdateCheck
  922.     noop $input(ProHLer will nolonger check for a new version if you open the main window,oid,ProHLer - Info)
  923.   }
  924.   else {
  925.     set %ProHLer.UpdateCheck.On $true
  926.     did -ra ProHLer.DSettings 50 Disable UpdateCheck
  927.     noop $input(ProHLer will now check for a new version everytime you open the main window,oid,ProHLer - Info)
  928.   }
  929.   dialog -o $dname
  930. }
  931. on *:dialog:ProHLer.DSettings:sclick:54: {
  932.   dialog -x $dname
  933.   ProHLer.DMain.Reload
  934.   if ($dialog(ProHLer.DMain)) dialog -o ProHLer.DMain
  935. }
  936. on *:dialog:ProHLer.DSettings:close:0: {
  937.   ProHLer.DMain.Reload
  938.   if ($dialog(ProHLer.DMain)) dialog -o ProHLer.DMain
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top