Advertisement
Guest User

Untitled

a guest
Aug 9th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 57.14 KB | None | 0 0
  1. on *:START: {
  2. if (!$hget(ProHLer.Tmp)) hmake ProHLer.Tmp 1
  3. if (!$hget(ProHLer)) hmake ProHLer 3
  4. }
  5.  
  6. menu * {
  7. ProHLer
  8. .$iif(!%ProHLer.On,$style(2))Turn ProHLer Off:/ProHLer.Off
  9. .$iif(%ProHLer.On,$style(2))Turn ProHLer On:/ProHLer.On
  10. .-
  11. .Open ProHler:/ProHLer.Open
  12. }
  13. menu nicklist {
  14. ProHLer
  15. .$iif($1 == $null,$style(2)) Add to NonHighlighting Nicknames:/ProHLer.Menu.NickList.1 $1
  16. }
  17. menu @ProHLer.* {
  18. dclick:/ProHLer.Menu.Window.2 $1-
  19. ProHLer
  20. .Add to NonHighlighting Nicknames:ProHLer.Menu.Window.1 $active
  21. }
  22.  
  23. ;If You have your own color identifers you can replace the ProHLer identifers with something like this:
  24. ;alias ProHLer.C1 {
  25. ; var %c = $c1(MSG)
  26. ; %c = $gettok($remove(%c,,MSG),1,44)
  27. ; return $iif($prop == code,%c,$iif($1,$+(,%c,$1),$+(,%c)))
  28. ;}
  29. alias ProHLer.C1 {
  30. if (%ProHLer.CustomColors.On) {
  31. if (%ProHLer.CustomColors.1 != $false) var %c $iif($v1 < 10, $+(0,$v1), $v1))
  32. }
  33. else var %c = 04
  34. %c = $gettok($remove(%c,,MSG),1,44)
  35. return $iif($prop == code,%c,$iif($1,$+(,%c,$1),$+(,%c)))
  36. }
  37. alias ProHLer.C2 {
  38. if (%ProHLer.CustomColors.On) {
  39. if (%ProHLer.CustomColors.2 != $false) var %c $iif($v1 < 10, $+(0,$v1), $v1))
  40. }
  41. else var %c = 03
  42. %c = $gettok($remove(%c,,MSG),1,44)
  43. return $iif($prop == code,%c,$iif($1,$+(,%c,$1),$+(,%c)))
  44. }
  45. alias ProHLer.C3 {
  46. var %c = 02
  47. %c = $gettok($remove(%c,,MSG),1,44)
  48. return $iif($prop == code,%c,$iif($1,$+(,%c,$1),$+(,%c)))
  49. }
  50. alias ProHLer.C4 {
  51. var %c = 05
  52. %c = $gettok($remove(%c,,MSG),1,44)
  53. return $iif($prop == code,%c,$iif($1,$+(,%c,$1),$+(,%c)))
  54. }
  55. alias ProHLer.CloseWindows {
  56. if ($input(Are you sure you want to close all the ProHLer windows?,yqd,ProHLer - Question)) {
  57. var %total $window(@ProHLer.*,0)
  58. close -@ProHLer.*
  59. if ($dialog(ProHLer.DMain)) dialog -x $v1
  60. if ($dialog(ProHLer.DNoHL)) dialog -x $v1
  61. if ($dialog(ProHLer.DHLers)) dialog -x $v1
  62. if ($dialog(ProHLer.DResetStats)) dialog -x $v1
  63. if ($dialog(ProHLer.DSettings)) dialog -x $v1
  64. noop $input(All ProHLer windows are closed! Total: %total,oid,ProHLer - Info)
  65. }
  66. }
  67. alias ProHLer.Help {
  68. if ($window(@ProHLer.Help)) {
  69. clear @ProHLer.Help
  70. }
  71. else window -k0vxz @ProHLer.Help
  72. aline $ProHLer.C1().code @ProHLer.Help <***>ProHLer HighLight detection script by: Marlinc - Version $ProHLer.Version $+ <***>
  73. aline $ProHLer.C3().code @ProHLer.Help Common aliases:
  74. aline @ProHLer.Help $ProHLer.C2(/ProHLer.Open) $ProHLer.C1(=) $ProHLer.C3(Opens the main screen of ProHLer wich provides Stats and Settings)
  75. aline @ProHLer.Help $ProHLer.C2(/ProHLer.CloseWindows) $ProHLer.C1(=) $ProHLer.C3(Closes all the ProHLer windows)
  76. aline @ProHLer.Help $ProHLer.C2(/ProHLer.Help) $ProHLer.C1(=) $ProHLer.C3(Opens this help screen)
  77. aline @ProHLer.Help $ProHLer.C2(/ProHLer.On) $ProHLer.C1(=) $ProHLer.C3(This will turn ProHLer on)
  78. aline @ProHLer.Help $ProHLer.C2(/ProHLer.Off) $ProHLer.C1(=) $ProHLer.C3(This will turn ProHLer off)
  79. aline @ProHLer.Help $ProHLer.C2(/ProHLer.Changelog) $ProHLer.C1(=) $ProHLer.C3(Opens the ProHLer changelog)
  80. aline $ProHLer.C3().code @ProHLer.Help -----
  81. aline $ProHLer.C3().code @ProHLer.Help Developer aliases/identifiers/variables:
  82. 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)
  83. 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)
  84. aline @ProHLer.Help $ProHLer.C2($!ProHLer.Version) $ProHLer.C1(=) $ProHLer.C3(Returns the current ProHLer version)
  85. aline @ProHLer.Help $ProHLer.C2($!ProHLer.Duration) $ProHLer.C1(=) $ProHLer.C3(Returns a $ProHLer.Duration(12345) format of $!duration)
  86. aline @ProHLer.Help $ProHLer.C2($!ProHLer.C1) $ProHLer.C1(=) $ProHLer.C3(Returns ProHLer color 1)
  87. aline @ProHLer.Help $ProHLer.C2($!ProHLer.C2) $ProHLer.C1(=) $ProHLer.C3(Returns ProHLer color 2)
  88. aline @ProHLer.Help $ProHLer.C2($!ProHLer.C3) $ProHLer.C1(=) $ProHLer.C3(Returns ProHLer color 3)
  89. aline @ProHLer.Help $ProHLer.C2($!ProHLer.C4) $ProHLer.C1(=) $ProHLer.C3(Returns ProHLer color 4)
  90. aline @ProHLer.Help $ProHLer.C2($!ProHLer.C5) $ProHLer.C1(=) $ProHLer.C3(Returns ProHLer color 5)
  91. 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)
  92. aline @ProHLer.Help $ProHLer.C2($+(%,ProHLer.LastUpdate)) $ProHLer.C1(=) $ProHLer.C3(Returns the time of the last update in $!ctime format)
  93. 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)
  94. aline @ProHLer.Help $ProHLer.C2($+(%,ProHLer.TotalHls)) $ProHLer.C1(=) $ProHLer.C3(Returns the total of highlights you got)
  95. }
  96. alias ProHLer.ChangeLog {
  97. if ($window(@ProHLer.Help)) {
  98. clear @ProHLer.Help
  99. }
  100. else window -k0vxz @ProHLer.Help
  101. aline $ProHLer.C1().code @ProHLer.Help <***>ProHLer HighLight detection script by: Marlinc - Version $ProHLer.Version $+ <***>
  102. aline $ProHLer.C3().code @ProHLer.Help Changelog $ProHLer.Version $+ :
  103. aline @ProHLer.Help $ProHLer.C2(----- 1 -----) $ProHLer.C1(=) $ProHLer.C3(Add updatechecker bug fixed)
  104. aline @ProHLer.Help $ProHLer.C2(----- 2 -----) $ProHLer.C1(=) $ProHLer.C3(Added a ACTION HighLight checkbox to turn it off)
  105. aline @ProHLer.Help $ProHLer.C2(----- 3 -----) $ProHLer.C1(=) $ProHLer.C3(Added custom color support)
  106. aline @ProHLer.Help $ProHLer.C2(----- 4 -----) $ProHLer.C1(=) $ProHLer.C3(Added spam protect)
  107. aline @ProHLer.Help $ProHLer.C2(----- 5 -----) $ProHLer.C1(=) $ProHLer.C3(Added a question to ask if you want HighLight on ACTION enabled)
  108. }
  109.  
  110. alias ProHLer.Duration {
  111. return $replacecs($duration($1),hrs,Hours,hr,Hour,mins,Minutes,min,Minute,secs,Seconds,sec,Second,days,Days,day,Day,wks,Weeks,wk,Week)
  112. }
  113. alias ProHLer.Menu.NickList.1 {
  114. set %proHler.DNoHL.nick $1
  115. dialog -mordv ProHLer.DNoHL ProHLer.DNoHL
  116. }
  117. alias ProHLer.Menu.Window.1 {
  118. set %proHler.DNoHL.nick $remove($1,@ProHLer.)
  119. dialog -mordv ProHLer.DNoHL ProHLer.DNoHL
  120. }
  121. alias ProHLer.Menu.Window.2 {
  122. if ($mouse.lb) {
  123. if ($1 == 1) {
  124. set %proHler.DNoHL.nick $remove($active,@ProHLer.)
  125. dialog -mordv ProHLer.DNoHL ProHLer.DNoHL
  126. }
  127. elseif ($1 == 2) ProHLer.Open
  128. elseif ($1 == 3) window -c $active
  129. elseif ($1 == 4) ProHLer.CloseWindows
  130. }
  131. }
  132. alias ProHLer.UpdateCheck.Start {
  133. set %ProHLer.UpdateCheck.LastCheck $ctime
  134. if ($sock(ProHLer.UpdateCheck)) echo -a socket is al open
  135. else {
  136. if ($1) set %ProHLer.UpdateCheck.Alias $1
  137. else set %ProHLer.UpdateCheck.Alias ProHLer.UpdateCheck.Return1
  138. if ($window(@ProHLer.UpdateCheck)) clear @ProHLer.UpdateCheck
  139. else window -k0n2h @ProHLer.UpdateCheck
  140. aline $ProHLer.C1().code @ProHLer.UpdateCheck <***>ProHLer HighLight detection script by: Marlinc - Version $ProHLer.Version $+ <***>
  141. aline $ProHLer.C3().code @ProHLer.UpdateCheck Checking for new version...
  142. sockopen ProHLer.UpdateCheck mchosts.co.cc 80
  143. }
  144. }
  145. on *:sockopen:ProHLer.UpdateCheck*: {
  146. sockwrite -nt $sockname GET /mirc/ProHLer-UpdateCheck.php HTTP/1.1
  147. sockwrite -nt $sockname Host: mchosts.co.cc
  148. sockwrite -nt $sockname User-Agent: ProHLer VersionCheck
  149. sockwrite -nt $sockname $crlf
  150. }
  151. on *:sockread:ProHLer.UpdateCheck*: {
  152. if ($sockerr > 0) halt
  153. var %data
  154. sockread %data
  155. set %ProHLer.UpdateCheck.HTTP.Code $gettok(%data,2,32)
  156. set %ProHLer.UpdateCheck.HTTP.Response $gettok(%data,3-,32)
  157. while ($sockbr) {
  158. sockread %data
  159. if (DATA:* iswm %data) {
  160. var %data $mid(%data,6)
  161. set %ProHLer.UpdateCheck.Data.NewVersion $gettok(%data,1,44)
  162. set %ProHLer.UpdateCheck.Data.SwiftIRCUrl $gettok(%data,2,44)
  163. }
  164. }
  165. ProHLer.UpdateCheck.Check
  166. }
  167. alias ProHLer.UpdateCheck.Check {
  168. if ($window(@ProHLer.UpdateCheck)) {
  169. if (%ProHLer.UpdateCheck.HTTP.Code == 200) {
  170. aline $ProHLer.C1().code @ProHLer.UpdateCheck Data downloaded successfull!
  171. aline $ProHLer.C1().code @ProHLer.UpdateCheck Checking data...
  172. aline @ProHLer.UpdateCheck $ProHLer.C1(The newest) $ProHLer.C2(ProHLer) $ProHLer.C1(version is) $ProHLer.C2(%ProHLer.UpdateCheck.Data.NewVersion)
  173. if ($ProHLer.Version < %ProHLer.UpdateCheck.Data.NewVersion) {
  174. 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(!)
  175. }
  176. else aline @ProHLer.UpdateCheck $ProHLer.C1(You already got the newest version of) $ProHLer.C2(ProHLer) $ProHLer.C1(there no need to upgrade!)
  177. }
  178. else {
  179. aline $ProHLer.C1().code @ProHLer.UpdateCheck An error has occurred while checking for a new version:
  180. aline @ProHLer.UpdateCheck $ProHLer.C1(HTTP-Errorcode =) $c2(%ProHLer.UpdateCheck.HTTP.Code)
  181. aline @ProHLer.UpdateCheck $ProHLer.C1(HTTP-Errorname =) $c2(%ProHLer.UpdateCheck.HTTP.Response)
  182. }
  183. aline $ProHLer.C3().code @ProHLer.UpdateCheck -----
  184. }
  185. if (%ProHLer.UpdateCheck.Alias) .timerProHLer.UpdateCheck.AliasTimer 1 0 %ProHLer.UpdateCheck.Alias @ProHLer.UpdateCheck
  186. }
  187. alias ProHLer.UpdateCheck.Return1 {
  188. window -a $gettok($1,1,59)
  189. }
  190. alias ProHLer.UpdateCheck.Return2 {
  191. if (%ProHLer.UpdateCheck.HTTP.Code == 200) {
  192. if ($ProHLer.Version < %ProHLer.UpdateCheck.Data.NewVersion) {
  193. if ($dialog(ProHLer.DMain)) dialog -n $v1
  194. if ($input(ProHLer Version %ProHLer.UpdateCheck.Data.NewVersion is now available! Do you want to see the update url?,yqd,ProHLer - Question)) {
  195. window -aw3 @ProHLer.UpdateCheck
  196. }
  197. if ($dialog(ProHLer.DMain)) dialog -o $v1
  198. }
  199. else window -c @ProHLer.UpdateCheck
  200. }
  201. else window -c @ProHLer.UpdateCheck
  202. }
  203. alias ProHler.Version { return 1.32 }
  204. alias ProHLer.Open {
  205. if ($dialog(ProHLer.DMain)) dialog -x ProHLer.DMain
  206. if (%ProHLer.On == $null) set %ProHLer.On $true
  207. if (%ProHLer.Version) {
  208. if (%ProHLer.Version < $ProHler.Version) {
  209. var %OldVer %ProHLer.Version
  210. if (%ProHLer.LastUpdate) var %OldUpdate %ProHLer.LastUpdate
  211. ProHLer.Nicks.Filter
  212. ProHLer.Chans.Filter
  213. 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)
  214. window -xdok0g1 @ProHLer.SettingsCheck
  215. aline $ProHLer.C1().code @ProHLer.SettingsCheck <***>ProHLer HighLight detection script by: Marlinc<***>
  216. aline $ProHLer.C3().code @ProHLer.SettingsCheck Loading nickname's that HighLighted you:
  217. var %i = 1
  218. while (%i <= $lines(ProHLer.NicksOUT.txt)) {
  219. var %name $gettok($read(ProHLer.NicksOUT.txt,n,%i),2,59)
  220. var %times = $gettok($read(ProHLer.NicksOUT.txt,n,%i),3,59)
  221. aline @ProHLer.SettingsCheck $ProHLer.C2(%name) $ProHLer.C1(=) $ProHLer.C1(%times)
  222. inc %i
  223. }
  224. aline $ProHLer.C3().code @ProHLer.SettingsCheck -----
  225. aline $ProHLer.C3().code @ProHLer.SettingsCheck Loading channels where you are HighLighted on:
  226. var %i = 1
  227. while (%i <= $lines(ProHLer.ChansOUT.txt)) {
  228. var %name $gettok($read(ProHLer.ChansOUT.txt,n,%i),2,59)
  229. var %times = $gettok($read(ProHLer.ChansOUT.txt,n,%i),3,59)
  230. aline @ProHLer.SettingsCheck $ProHLer.C2(%name) $ProHLer.C1(=) $ProHLer.C1(%times)
  231. inc %i
  232. }
  233. aline $ProHLer.C3().code @ProHLer.SettingsCheck -----
  234. aline $ProHLer.C3().code @ProHLer.SettingsCheck Setting variables:
  235. aline @ProHLer.SettingsCheck $ProHLer.C1(Setting var:) $ProHLer.C2($+(%,ProHLer.LastUpdate)) $ProHLer.C1(To) $ProHLer.C2($ctime)
  236. set %ProHLer.LastUpdate $ctime
  237. aline @ProHLer.SettingsCheck $ProHLer.C1(Setting var:) $ProHLer.C2($+(%,ProHLer.Version)) $ProHLer.C1(To) $ProHLer.C2($ProHLer.Version)
  238. set %ProHLer.Version $ProHLer.Version
  239. if (!%ProHLer.UpdateCheck.On) {
  240. window -u @ProHLer.SettingsCheck
  241. if ($input(Do you want ProHLer to check for a new version everytime you open the main window?,yqd,ProHLer - Question)) {
  242. aline @ProHLer.SettingsCheck $ProHLer.C1(Setting var:) $ProHLer.C2($+(%,ProHLer.UpdateCheck.On)) $ProHLer.C1(To) $ProHLer.C2($!true)
  243. set %ProHLer.UpdateCheck.On $true
  244. }
  245. else {
  246. aline @ProHLer.SettingsCheck $ProHLer.C1(Setting var:) $ProHLer.C2($+(%,ProHLer.UpdateCheck.On)) $ProHLer.C1(To) $ProHLer.C2($!false)
  247. set %ProHLer.UpdateCheck.On $false
  248. }
  249. window -o @ProHLer.SettingsCheck
  250. }
  251. if (!%ProHLer.ActionHighLight) {
  252. window -u @ProHLer.SettingsCheck
  253. if ($input(Do you want to get HighLighted on ACTION?,yqd,ProHLer - Question)) {
  254. aline @ProHLer.SettingsCheck $ProHLer.C1(Setting var:) $ProHLer.C2($+(%,ProHLer.ActionHighLight)) $ProHLer.C1(To) $ProHLer.C2($!true)
  255. set %ProHLer.ActionHighLight $true
  256. }
  257. else {
  258. aline @ProHLer.SettingsCheck $ProHLer.C1(Setting var:) $ProHLer.C2($+(%,ProHLer.ActionHighLight)) $ProHLer.C1(To) $ProHLer.C2($!false)
  259. set %ProHLer.ActionHighLight $false
  260. }
  261. window -o @ProHLer.SettingsCheck
  262. }
  263. aline $ProHLer.C3().code @ProHLer.SettingsCheck -----
  264. aline $ProHLer.C3().code @ProHLer.SettingsCheck Creating hashtables:
  265. if (!$hget(ProHLer.Tmp)) {
  266. aline @ProHLer.SettingsCheck $ProHLer.C1(Creating hashtable:) $ProHLer.C2(ProHLer.Tmp)
  267. hmake ProHLer.Tmp 1
  268. }
  269. if (!$hget(ProHLer)) {
  270. aline @ProHLer.SettingsCheck $ProHLer.C1(Creating hashtable:) $ProHLer.C2(ProHLer)
  271. hmake ProHLer 3
  272. }
  273. aline $ProHLer.C3().code @ProHLer.SettingsCheck -----
  274. aline $ProHLer.C3().code @ProHLer.SettingsCheck Thank you for upgrading to ProHLer version " $+ $ProHLer.Version $+ " from version " $+ %OldVer $+ "!
  275. if (%oldUpdate) aline $ProHLer.C3().code @ProHLer.SettingsCheck Your last update was on $asctime(%OldUpdate) that was $ProHLer.Duration($calc($ctime - %OldUpdate)) ago!
  276. }
  277. else {
  278. if (%ProHLer.UpdateCheck.On) {
  279. ProHLer.UpdateCheck.Start ProHLer.UpdateCheck.Return2
  280. }
  281. }
  282. }
  283. else {
  284. noop $input(Thank you for installing ProHLer version " $+ $ProHLer.Version $+ "! $crlf $crlf Please wait patient while we set some settings!,oid,ProHLer - Info)
  285. window -xdok0g1 @ProHLer.SettingsCheck
  286. aline $ProHLer.C1().code @ProHLer.SettingsCheck <***>ProHLer HighLight detection script by: Marlinc<***>
  287. aline $ProHLer.C3().code @ProHLer.SettingsCheck Setting variables:
  288. aline @ProHLer.SettingsCheck $ProHLer.C1(Setting var:) $ProHLer.C2($+(%,ProHLer.LastUpdate)) $ProHLer.C1(To) $ProHLer.C2($ctime)
  289. set %ProHLer.LastUpdate $ctime
  290. aline @ProHLer.SettingsCheck $ProHLer.C1(Setting var:) $ProHLer.C2($+(%,ProHLer.Version)) $ProHLer.C1(To) $ProHLer.C2($ProHLer.Version)
  291. set %ProHLer.Version $ProHLer.Version
  292. window -u @ProHLer.SettingsCheck
  293. if ($input(Do you want ProHLer to check for a new version everytime you open the main window?,yqd,ProHLer - Question)) {
  294. aline @ProHLer.SettingsCheck $ProHLer.C1(Setting var:) $ProHLer.C2($+(%,ProHLer.UpdateCheck.On)) $ProHLer.C1(To) $ProHLer.C2($!true)
  295. set %ProHLer.UpdateCheck.On $true
  296. }
  297. else {
  298. aline @ProHLer.SettingsCheck $ProHLer.C1(Setting var:) $ProHLer.C2($+(%,ProHLer.UpdateCheck.On)) $ProHLer.C1(To) $ProHLer.C2($!false)
  299. set %ProHLer.UpdateCheck.On $false
  300. }
  301. if ($input(Do you want to use " $+ $me $+ " as a highlighter?,yqd,ProHLer - Question)) {
  302. aline @ProHLer.SettingsCheck $ProHLer.C1(Setting var:) $ProHLer.C2($+(%,ProHLer.Highlights)) $ProHLer.C1(To) $ProHLer.C2($me)
  303. set %ProHLer.Highlights $me
  304. }
  305. window -u @ProHLer.SettingsCheck
  306. if ($input(Do you want to get HighLighted on ACTION?,yqd,ProHLer - Question)) {
  307. aline @ProHLer.SettingsCheck $ProHLer.C1(Setting var:) $ProHLer.C2($+(%,ProHLer.ActionHighLight)) $ProHLer.C1(To) $ProHLer.C2($!true)
  308. set %ProHLer.ActionHighLight $true
  309. }
  310. else {
  311. aline @ProHLer.SettingsCheck $ProHLer.C1(Setting var:) $ProHLer.C2($+(%,ProHLer.ActionHighLight)) $ProHLer.C1(To) $ProHLer.C2($!false)
  312. set %ProHLer.ActionHighLight $false
  313. }
  314. window -o @ProHLer.SettingsCheck
  315. aline $ProHLer.C3().code @ProHLer.SettingsCheck -----
  316. aline $ProHLer.C3().code @ProHLer.SettingsCheck Creating hashtables:
  317. if (!$hget(ProHLer.Tmp)) {
  318. aline @ProHLer.SettingsCheck $ProHLer.C1(Creating hashtable:) $ProHLer.C2(ProHLer.Tmp)
  319. hmake ProHLer.Tmp 1
  320. }
  321. if (!$hget(ProHLer)) {
  322. aline @ProHLer.SettingsCheck $ProHLer.C1(Creating hashtable:) $ProHLer.C2(ProHLer)
  323. hmake ProHLer 3
  324. }
  325. aline $ProHLer.C3().code @ProHLer.SettingsCheck -----
  326. aline $ProHLer.C3().code @ProHLer.SettingsCheck Thank you for installing ProHLer version " $+ $ProHLer.Version $+ "!
  327. }
  328. dialog -mordv ProHLer.DMain ProHLer.DMain
  329. }
  330. alias ProHLer.DMain.Reload {
  331. ProHLer.Nicks.Filter
  332. ProHLer.Chans.Filter
  333.  
  334. if ($dialog(ProHLer.DMain)) {
  335. did -ra ProHLer.DMain 31 $bytes($iif(%ProHLer.TotalHls isnum,%ProHLer.TotalHls,0),bd)
  336. did -ra ProHLer.DMain 37 $bytes($iif(%ProHLer.TotalHls isnum,$var(%ProHLer.Nicks.*,0),0),bd)
  337. did -ra ProHLer.DMain 39 $bytes($iif(%ProHLer.TotalHls isnum,$var(%ProHLer.Chans.*,0),0),bd)
  338. var %name $gettok($read(ProHLer.NicksOUT.txt,n,1),2,59)
  339. var %times = $gettok($read(ProHLer.NicksOUT.txt,n,1),3,59)
  340. did -ra ProHLer.DMain 33 $iif(%name,%name,None) $+ $chr(40) $+ $bytes($iif(%times,%times,0),bd) $+ $chr(41)
  341. var %chan $gettok($read(ProHLer.ChansOUT.txt,n,1),2,59)
  342. var %times = $gettok($read(ProHLer.ChansOUT.txt,n,1),3,59)
  343. did -ra ProHLer.DMain 35 $iif(%chan,%chan,None) $+ $chr(40) $+ $bytes($iif(%times,%times,0),bd) $+ $chr(41)
  344. did -ra ProHLer.DMain 41 $bytes($iif(%ProHLer.TotalNonHls isnum,%ProHLer.TotalNonHls,0),bd)
  345. did -h ProHLer.DMain 22
  346. did -h ProHLer.DMain 42
  347. did -h ProHLer.DMain 43
  348. did -ra ProHLer.DMain 43 $bytes($calc($iif(%ProHLer.TotalHls isnum,%ProHLer.TotalHls,0) / $iif(%ProHLer.Average.Day isnum,%ProHLer.Average.Day,0)),bd)
  349. did -ra ProHLer.DMain 55 Turn ProHLer $iif(%ProHLer.On,Off,On)
  350. }
  351. }
  352. alias ProHLer.DHLers.Reload {
  353. if ($dialog(ProHLer.DHLers)) {
  354. did -ra ProHLer.DHLers 31 None
  355. did -rm ProHLer.DHLers 33
  356. did -r ProHLer.DHLers 70
  357. did -r ProHLer.DHLers 71
  358. var %i = 1
  359. while (%i <= $numtok(%ProHLer.Highlights,59)) {
  360. did -a ProHLer.DHLers 70 %i
  361. did -a ProHLer.DHLers 71 $gettok(%ProHLer.Highlights,%i,59)
  362. inc %i
  363. }
  364. }
  365. }
  366. alias ProHLer.DNoHL.Reload {
  367. if ($dialog(ProHLer.DNoHL)) {
  368. did -ra ProHLer.DNoHL 31 None
  369. did -rm ProHLer.DNoHL 33
  370. did -r ProHLer.DNoHL 70
  371. did -r ProHLer.DNoHL 71
  372. var %i = 1
  373. while (%i <= $numtok(%ProHLer.NoHls,59)) {
  374. did -a ProHLer.DNoHL 70 %i
  375. did -a ProHLer.DNoHL 71 $gettok(%ProHLer.NoHls,%i,59)
  376. inc %i
  377. }
  378. }
  379. }
  380. alias ProHLer.DSettings.Reload {
  381. if ($dialog(ProHLer.DSettings)) {
  382. if (%ProHLer.ActionHighLight == $true) did -c ProHLer.DSettings 10
  383. if (%ProHLer.UpdateCheck.On == $true) did -c ProHLer.DSettings 11
  384. did -a ProHLer.DSettings 70 Default
  385. did -a ProHLer.DSettings 71 Default
  386. var %i = 0
  387. while (%i <= 15) {
  388. did -a ProHLer.DSettings 70 %i
  389. did -a ProHLer.DSettings 71 %i
  390. inc %i
  391. }
  392. if (%ProHLer.CustomColors.1) && (%ProHLer.CustomColors.1 != $false) did -c ProHLer.DSettings 70 $calc($v1 + 2)
  393. else did -c ProHLer.DSettings 70 1
  394. if (%ProHLer.CustomColors.2) && (%ProHLer.CustomColors.2 != $false) did -c ProHLer.DSettings 71 $calc($v1 + 2)
  395. else did -c ProHLer.DSettings 71 1
  396. if (%ProHLer.CustomColors.On == $true) {
  397. did -c ProHLer.DSettings 12
  398. }
  399. else {
  400. did -b ProHLer.DSettings 70
  401. did -b ProHLer.DSettings 71
  402. }
  403. if (%ProHLer.SpamProtect.On == $true) did -c ProHLer.DSettings 13
  404. if (%ProHLer.Sounds.OnHighLight.File) {
  405. did -ra ProHLer.DSettings 36 $nopath($v1)
  406. if (%ProHLer.Sounds.OnHighLight.On == $true) did -c ProHLer.DSettings 15
  407. }
  408. if (%ProHLer.Sounds.On == $true) did -c ProHLer.DSettings 14
  409. else {
  410. did -b ProHLer.DSettings 51
  411. did -b ProHLer.DSettings 15
  412. }
  413. }
  414. }
  415. alias ProHLer.DAdvancedSound.Reload {
  416. if ($dialog(ProHLer.DAdvancedSound)) {
  417. did -ra ProHLer.DAdvancedSound 31 None
  418. did -rm ProHLer.DAdvancedSound 33
  419. did -r ProHLer.DAdvancedSound 70
  420. did -r ProHLer.DAdvancedSound 71
  421. did -b ProHLer.DAdvancedSound 10
  422. hdel -w ProHLer.Tmp AdvancedSound.*
  423. var %i = 1
  424. while (%i <= $hfind(ProHler, $+(AdvancedSound.*), 0, w)) {
  425. var %key = $hfind(ProHler, $+(AdvancedSound.*), %i, w),%value = $hget(ProHLer, $+(AdvancedSound., %i))
  426. tokenize 59 %value
  427. did -a ProHLer.DAdvancedSound 70 $1
  428. did -a ProHLer.DAdvancedSound 71 $2
  429. hadd ProHLer.Tmp $+(AdvancedSound.,%i) %value
  430. inc %i
  431. }
  432. }
  433. }
  434. alias ProHLer.Nicks.Filter {
  435. write -c ProHLer.NicksIN.txt
  436. write -c ProHLer.NicksOUT.txt
  437. var %i = 1
  438. while (%i <= $var(%ProHLer.Nicks.*,0)) {
  439. 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)
  440. inc %i
  441. }
  442. filter -fk ProHLer.NicksIN.txt ProHLer.Nicks.FilterGet *
  443. write -c ProHLer.NicksIN.txt
  444. }
  445. alias ProHLer.Nicks.FilterGet {
  446. var %data $1-
  447. tokenize 59 %data
  448. var %high $gettok($read(ProHLer.NicksOUT.txt,n,1),3,59)
  449. var %high $iif(%high,%high,0)
  450. if ($3 > %high) {
  451. write -il1 ProHLer.NicksOUT.txt %data
  452. }
  453. else {
  454. write ProHLer.NicksOUT.txt %data
  455. }
  456. }
  457. alias ProHLer.Chans.Filter {
  458. write -c ProHLer.ChansIN.txt
  459. write -c ProHLer.ChansOUT.txt
  460. var %i = 1
  461. while (%i <= $var(%ProHLer.Chans.*,0)) {
  462. 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)
  463. inc %i
  464. }
  465. filter -fk ProHLer.ChansIN.txt ProHLer.Chans.FilterGet *
  466. write -c ProHLer.ChansIN.txt
  467. }
  468. alias ProHLer.Chans.FilterGet {
  469. var %data $1-
  470. tokenize 59 %data
  471. var %high $gettok($read(ProHLer.ChansOUT.txt,n,1),3,59)
  472. var %high $iif(%high,%high,0)
  473. if ($3 > %high) {
  474. write -il1 ProHLer.ChansOUT.txt %data
  475. }
  476. else {
  477. write ProHLer.ChansOUT.txt %data
  478. }
  479. }
  480. alias ProHler.NoHL {
  481. if ($1) {
  482. var %i = 1
  483. while (%i <= $numtok(%ProHLer.NoHls,59)) {
  484. if ($gettok(%ProHLer.NoHls,%i,59) iswm $1) return $gettok(%ProHLer.NoHls,%i,59)
  485. inc %i
  486. }
  487. }
  488. else return %ProHLer.NoHls
  489. }
  490. alias ProHLer.Off {
  491. set %ProHLer.On $false
  492. echo -at $ProHLer.C1(ProHLer is now turned off!)
  493. }
  494. alias ProHLer.On {
  495. set %ProHLer.On $true
  496. echo -at $ProHLer.C1(ProHLer is now turned on!)
  497. }
  498. on ^*:TEXT:*:*: {
  499. if (%ProHLer.On) {
  500. var %hltext $replace($1-,$chr(59),-)
  501. var %hlplace $iif($chan,$chan,$nick)
  502. var %i = 1
  503. while (%i <= $numtok(%ProHLer.Highlights,59)) {
  504. var %hler $eval($gettok(%ProHLer.Highlights,%i,59),2)
  505. if (%hler isin %hltext) {
  506. if ($ProHler.NoHL($nick)) {
  507. inc %ProHLer.TotalNonHls
  508. }
  509. else {
  510. if (%ProHLer.SpamProtect.On) {
  511. if ($hget(ProHLer.Tmp, $+(SpamProtect., $nick))) {
  512. hadd -z ProHLer.Tmp $+(SpamProtect., $nick) 5
  513. var %i = 1
  514. while (%i <= $cnick(0)) {
  515. if ($cnick(%i) iswm $nick) { var %c $cnick(%i).color | break }
  516. elseif (($nick isop $chan) && (@ isin $cnick(%i).modes)) { var %c $cnick(%i).color | break }
  517. elseif (($nick ishop $chan) && (% isin $cnick(%i).modes)) { var %c $cnick(%i).color | break }
  518. elseif (($nick isvoice $chan) && (+ isin $cnick(%i).modes)) { var %c $cnick(%i).color | break }
  519. elseif (($nick isreg $chan) && ($cnick(%i).nomode) || (!$chan)) { var %c $cnick(%i).color | break }
  520. inc %i
  521. }
  522. if (!%c) var %c $color(text)
  523. if ($nick isop $chan) { var %cc @ }
  524. elseif ($nick ishop $chan) { var %cc % }
  525. elseif ($nick isvoice $chan) { var %cc + }
  526. echo -tmg $iif($chan,$chan,$nick) $+(<,%c,%cc,$nick,>) $ProHLer.C1($1-)
  527. halt
  528. }
  529. hadd -z ProHLer.Tmp $+(SpamProtect., $nick) 5
  530. }
  531. inc %ProHLer.TotalHls
  532. inc %ProHLer.Nicks. $+ $nick
  533. set %ProHLer.Last.Nick $nick
  534. set %ProHLer.Last.Time $ctime
  535. if (%ProHLer.Date.Day != $date(dd-mm-yy)) {
  536. set %ProHLer.Date.Day $date(dd-mm-yy)
  537. inc %ProHLer.Average.Day
  538. }
  539. var %i = 1
  540. while (%i <= $cnick(0)) {
  541. if ($cnick(%i) iswm $nick) { var %c $cnick(%i).color | break }
  542. elseif (($nick isop $chan) && (@ isin $cnick(%i).modes)) { var %c $cnick(%i).color | break }
  543. elseif (($nick ishop $chan) && (% isin $cnick(%i).modes)) { var %c $cnick(%i).color | break }
  544. elseif (($nick isvoice $chan) && (+ isin $cnick(%i).modes)) { var %c $cnick(%i).color | break }
  545. elseif (($nick isreg $chan) && ($cnick(%i).nomode) || (!$chan)) { var %c $cnick(%i).color | break }
  546. inc %i
  547. }
  548. if (!%c) var %c $color(text)
  549. if ($nick isop $chan) { var %cc @ }
  550. elseif ($nick ishop $chan) { var %cc % }
  551. elseif ($nick isvoice $chan) { var %cc + }
  552. echo -tmg $iif($chan,$chan,$nick) $+(<,%c,%cc,$nick,>) $ProHLer.C1 $+ $replace($strip(%hltext),%hler,$ProHLer.C2(%hler) $+ $ProHLer.C1)
  553. if ($chan) inc %ProHLer.Chans. $+ $chan
  554. if ($window(@ProHLer. $+ $nick)) {
  555. 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) $+ !
  556. 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)
  557. }
  558. else {
  559. window -k0l35n2vxz @ProHLer. $+ $nick
  560. aline -al @ProHLer. $+ $nick Add to NonHighlighting Nicknames
  561. aline -al @ProHLer. $+ $nick Open ProHLer
  562. aline -al @ProHLer. $+ $nick Close Window
  563. aline -al @ProHLer. $+ $nick Close all ProHLer Windows
  564. renwin @ProHLer. $+ $nick @ProHLer. $+ $nick HighLight info( $+ $nick $+ )
  565. aline $ProHLer.C1().code @ProHLer. $+ $nick <***>ProHLer HighLight detection script by: Marlinc - Version $ProHLer.Version $+ <***>
  566. 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) $+ !
  567. 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)
  568. }
  569. ProHLer.DMain.Reload
  570. 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,$ProHLer.C1(%hler) $+ $ProHLer.C2),10)))
  571. flash -b5 ProHLer: $nick HighLighted you!
  572. if ((%ProHLer.Sounds.OnHighLight.File) && (%ProHLer.Sounds.OnHighLight.On == $true)) splay $qt(%ProHLer.Sounds.OnHighLight.File)
  573. window -g2 %hlplace
  574. haltdef
  575. break
  576. }
  577. }
  578. inc %i
  579. }
  580. }
  581. }
  582. on ^*:ACTION:*:*: {
  583. if ((%ProHLer.On) && (%ProHLer.ActionHighLight)) {
  584. var %hltext $replace($1-,$chr(59),-)
  585. var %hlplace $iif($chan,$chan,$nick)
  586. var %i = 1
  587. while (%i <= $numtok(%ProHLer.Highlights,59)) {
  588. var %hler $eval($gettok(%ProHLer.Highlights,%i,59),2)
  589. if (%hler isin %hltext) {
  590. if ($ProHler.NoHL($nick)) {
  591. inc %ProHLer.TotalNonHls
  592. }
  593. else {
  594. inc %ProHLer.TotalHls
  595. inc %ProHLer.Nicks. $+ $nick
  596. set %ProHLer.Last.Nick $nick
  597. set %ProHLer.Last.Time $ctime
  598. if (%ProHLer.Date.Day != $date(dd-mm-yy)) {
  599. set %ProHLer.Date.Day $date(dd-mm-yy)
  600. inc %ProHLer.Average.Day
  601. }
  602. var %i = 1
  603. while (%i <= $cnick(0)) {
  604. if ($cnick(%i) iswm $nick) { var %c $cnick(%i).color | break }
  605. elseif (($nick isop $chan) && (@ isin $cnick(%i).modes)) { var %c $cnick(%i).color | break }
  606. elseif (($nick ishop $chan) && (% isin $cnick(%i).modes)) { var %c $cnick(%i).color | break }
  607. elseif (($nick isvoice $chan) && (+ isin $cnick(%i).modes)) { var %c $cnick(%i).color | break }
  608. elseif (($nick isreg $chan) && ($cnick(%i).nomode) || (!$chan)) { var %c $cnick(%i).color | break }
  609. inc %i
  610. }
  611. if (!%c) var %c $color(text)
  612. if ($nick isop $chan) { var %cc @ }
  613. elseif ($nick ishop $chan) { var %cc % }
  614. elseif ($nick isvoice $chan) { var %cc + }
  615. echo -tmg $iif($chan,$chan,$nick) $+(06* %cc,$nick,) $ProHLer.C1 $+ $replace($strip(%hltext),%hler,$ProHLer.C2(%hler) $+ $ProHLer.C1)
  616. if ($chan) inc %ProHLer.Chans. $+ $chan
  617. if ($window(@ProHLer. $+ $nick)) {
  618. 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) $+ !
  619. 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) $+ $+(06* %cc,$nick,) $+ : $ProHLer.C1 $+ $replace($strip(%hltext),%hler,$ProHLer.C4(%hler) $+ $ProHLer.C1)
  620. }
  621. else {
  622. window -k0l35n2vxz @ProHLer. $+ $nick
  623. aline -al @ProHLer. $+ $nick Add to NonHighlighting Nicknames
  624. aline -al @ProHLer. $+ $nick Open ProHLer
  625. aline -al @ProHLer. $+ $nick Close Window
  626. aline -al @ProHLer. $+ $nick Close all ProHLer Windows
  627. renwin @ProHLer. $+ $nick @ProHLer. $+ $nick HighLight info( $+ $nick $+ )
  628. aline $ProHLer.C1().code @ProHLer. $+ $nick <***>ProHLer HighLight detection script by: Marlinc - Version $ProHLer.Version $+ <***>
  629. 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) $+ !
  630. aline $ProHLer.C3().code @ProHLer. $+ $nick $ProHLer.C3(HL) $+ $chr(40) $+ 1 - %hlplace - $gmt(HH:nn:ss) $+ $chr(41) $+ $+(06* %cc,$nick,> $+ $ProHLer.C2) $+ : $ProHLer.C1 $+ $replace($strip(%hltext),%hler,$ProHLer.C4(%hler) $+ $ProHLer.C1)
  631. }
  632. ProHLer.DMain.Reload
  633. 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,$ProHLer.C1(%hler) $+ $ProHLer.C2),10)))
  634. flash -b5 ProHLer: $nick HighLighted you!
  635. window -g2 %hlplace
  636. haltdef
  637. break
  638. }
  639. }
  640. inc %i
  641. }
  642. }
  643. }
  644. dialog -l ProHLer.DMain {
  645.  
  646. ;ID Info:
  647. ;Boxes 20-30
  648. ;Lables(Text) 30-50
  649. ;Buttons 50-70
  650.  
  651. title "ProHLer - Main(Loading...)"
  652. size -1 -1 320 100
  653. option dbu
  654.  
  655. box "Status" , 20, 5 5 150 75
  656. box "Settings" , 21, 155 5 150 85
  657. box "Status" , 22, 5 5 150 85
  658. text "Total HighLights:" , 30, 10 15 75 10
  659. text "Loading..." , 31, 80 15 70 10
  660. text "Most Highlights(Nick):" , 32, 10 25 75 10
  661. text "Loading..." , 33, 80 25 70 10
  662. text "Most Highlights(Chan):" , 34, 10 35 75 10
  663. text "Loading..." , 35, 80 35 70 10
  664. text "Different nicks:" , 36, 10 45 75 10
  665. text "Loading..." , 37, 80 45 70 10
  666. text "Different channels:" , 38, 10 55 75 10
  667. text "Loading..." , 39, 80 55 70 10
  668. text "Ignored HighLights:" , 40, 10 65 75 10
  669. text "Loading..." , 41, 80 65 70 10
  670. text "Average per day:" , 42, 10 75 75 10
  671. text "Loading..." , 43, 80 75 70 10
  672. button "Close ProHLer Windows" , 50, 160 25 80 10
  673. button "Reset Data!" , 51, 160 35 80 10
  674. button "HighLighters!" , 52, 160 45 80 10
  675. button "NonHighLighting nicknames!" , 53, 160 55 80 10
  676. button "Show extra stats" , 54, 160 65 80 10
  677. button "Turn ProHLer ..." , 55, 160 15 80 10
  678. button "Settings" , 56, 160 75 80 10
  679. }
  680. on *:dialog:ProHLer.DMain:init:0: {
  681. dialog -t $dname ProHLer(Version $ProHLer.Version $+ ) - Main
  682.  
  683. ProHLer.DMain.Reload
  684. }
  685. on *:dialog:ProHLer.DMain:sclick:50: {
  686. dialog -n $dname
  687. if ($window(@ProHLer.SettingsCheck)) window -c @ProHLer.SettingsCheck
  688. if ($input(Are you sure you want to close all the ProHLer windows?,yqd,ProHLer - Question)) {
  689. var %total $window(@ProHLer.*,0)
  690. close -@ProHLer.*
  691. dialog -x $dname
  692. if ($dialog(ProHLer.DNoHL)) dialog -x $v1
  693. if ($dialog(ProHLer.DHLers)) dialog -x $v1
  694. if ($dialog(ProHLer.DResetStats)) dialog -x $v1
  695. if ($dialog(ProHLer.DSettings)) dialog -x $v1
  696. noop $input(All ProHLer windows are closed! Total: %total,oid,ProHLer - Info)
  697. }
  698. }
  699. on *:dialog:ProHLer.DMain:sclick:51: {
  700. if ($window(@ProHLer.SettingsCheck)) window -c @ProHLer.SettingsCheck
  701. dialog -mordv ProHLer.DResetStats ProHLer.DResetStats
  702. }
  703. on *:dialog:ProHLer.DMain:sclick:52: {
  704. if ($window(@ProHLer.SettingsCheck)) window -c @ProHLer.SettingsCheck
  705. dialog -mordv ProHLer.DHLers ProHLer.DHLers
  706. }
  707. on *:dialog:ProHLer.DMain:sclick:53: {
  708. if ($window(@ProHLer.SettingsCheck)) window -c @ProHLer.SettingsCheck
  709. dialog -mordv ProHLer.DNoHL ProHLer.DNoHL
  710. }
  711. on *:dialog:ProHLer.DMain:sclick:54: {
  712. if ($did(20).visible) {
  713. did -h $dname 20
  714. did -v $dname 22
  715. did -v ProHLer.DMain 42
  716. did -v ProHLer.DMain 43
  717. did -ra $dname $did Hide extra stats
  718. }
  719. else {
  720. did -v $dname 20
  721. did -h $dname 22
  722. did -h ProHLer.DMain 42
  723. did -h ProHLer.DMain 43
  724. did -ra $dname $did Show extra stats
  725. }
  726. }
  727. on *:dialog:ProHLer.DMain:sclick:55: {
  728. if (%ProHLer.On) {
  729. ProHLer.Off
  730. did -ra ProHLer.DMain 55 Turn ProHLer On
  731. }
  732. else {
  733. ProHLer.On
  734. did -ra ProHLer.DMain 55 Turn ProHLer Off
  735. }
  736. }
  737. on *:dialog:ProHLer.DMain:sclick:56: {
  738. if ($window(@ProHLer.SettingsCheck)) window -c @ProHLer.SettingsCheck
  739. dialog -mordv ProHLer.DSettings ProHLer.DSettings
  740. }
  741. on *:dialog:ProHLer.DMain:close:0: {
  742. if ($window(@ProHLer.SettingsCheck)) window -c @ProHLer.SettingsCheck
  743. }
  744. dialog -l ProHLer.DHLers {
  745.  
  746. ;ID Info:
  747. ;Boxes 20-30
  748. ;Lables(Text&Edit) 30-50
  749. ;Buttons 50-70
  750. ;Lists 70-80
  751.  
  752. title "ProHLer - HighLighters(Loading...)"
  753. size -1 -1 270 170
  754. option dbu
  755.  
  756. box "HighLighter Editor" , 20, 5 5 250 60
  757. box "HighLighters" , 21, 5 65 250 85
  758. text "Nr:" , 30, 10 15 50 10
  759. text "Loading..." , 31, 80 15 50 10
  760. text "Edit:" , 32, 10 25 50 10
  761. edit "Loading..." , 33, 77 25 150 10
  762. text "Things like $me or $mnick are allowd!" , 34, 10 37 100 20
  763. list 70, 10 75 10 60
  764. list 71, 77 75 150 60
  765. button "Delete Selected" , 50, 10 135 80 10
  766. button "Add one" , 51, 90 135 80 10
  767. button "Save" , 52, 10 45 80 10
  768. button "Save all / Exit" , 53, 5 155 80 10
  769. }
  770. on *:dialog:ProHLer.DHLers:init:0: {
  771. if ($dialog(ProHLer.DMain)) dialog -n ProHLer.DMain
  772. ProHLer.DHLers.Reload
  773. dialog -t $dname ProHLer(Version $ProHLer.Version $+ ) - HighLighters
  774. }
  775. on *:dialog:ProHLer.DHLers:sclick:50: {
  776. dialog -n $dname
  777. if ($did(71).sel) {
  778. var %nr $did(71).sel
  779. var %text $did(71).seltext
  780. if ($input(Are you sure you want to delete the folowing HighLighter: $+ $crlf $+ Nr: %nr $+ $crlf $+ Text: %text,yqd,ProHLer - Question)) {
  781. did -d $dname 70 %nr
  782. did -d $dname 71 %nr
  783. var %i = 1
  784. while (%i <= $did(70).lines) {
  785. did -o $dname 70 %i %i
  786. inc %i
  787. }
  788. did -ra $dname 31 None
  789. did -rma $dname 33
  790. }
  791. }
  792. else {
  793. noop $input(There is no HighLighter selected!,oid,ProHLer - Info)
  794. }
  795. dialog -o $dname
  796. }
  797. on *:dialog:ProHLer.DHLers:sclick:51: {
  798. dialog -n $dname
  799. var %nr $calc($did(70).lines + 1)
  800. if (%nr <= 30) {
  801. did -a $dname 70 %nr
  802. did -a $dname 71 New HighLighter: %nr
  803. did -c $dname 70 %nr
  804. did -c $dname 71 %nr
  805.  
  806. did -ra $dname 31 $did(70).sel
  807. did -ra $dname 33 $did(71).seltext
  808. did -fn $dname 33
  809. }
  810. else {
  811. noop $input(Sorry we only accept 30 HighLighters!,oid,ProHLer - Info)
  812. }
  813. dialog -o $dname
  814. }
  815. on *:dialog:ProHLer.DHLers:sclick:52: {
  816. dialog -n $dname
  817. if ($did(71).sel) {
  818. var %nr $did(31).text
  819. var %text $did(33).text
  820. did -o $dname 70 %nr %nr
  821. did -o $dname 71 %nr %text
  822. did -c $dname 70 %nr
  823. did -c $dname 71 %nr
  824. }
  825. else {
  826. noop $input(There is no HighLighter selected!,oid,ProHLer - Info)
  827. }
  828. dialog -o $dname
  829. }
  830. on *:dialog:ProHLer.DHLers:sclick:53: {
  831. dialog -n $dname
  832. set %ProHLer.Highlights $didtok($dname,71,59)
  833. noop $input(Your HighLighters are saved!,oid,ProHLer - Info)
  834. dialog -x $dname
  835. if ($dialog(ProHLer.DMain)) dialog -o ProHLer.DMain
  836. }
  837. on *:dialog:ProHLer.DHLers:sclick:70: {
  838. did -ra $dname 31 $did($did).sel
  839. did -ran $dname 33 $did(71,$did($did).sel).text
  840. did -c $dname 71 $did($did).sel
  841. }
  842. on *:dialog:ProHLer.DHLers:sclick:71: {
  843. did -ra $dname 31 $did($did).sel
  844. did -ran $dname 33 $did($did).seltext
  845. did -c $dname 70 $did($did).sel
  846. }
  847. on *:dialog:ProHLer.DHLers:close:0: {
  848. if ($didtok($dname,71,59) != %ProHLer.Highlights) {
  849. if ($input(You made some changes! Do you want to save them?,yqd,ProHLer - Question)) {
  850. set %ProHLer.Highlights $didtok($dname,71,59)
  851. noop $input(Your HighLighters are saved!,oid,ProHLer - Info)
  852. }
  853. }
  854. if ($dialog(ProHLer.DMain)) dialog -o ProHLer.DMain
  855. }
  856. dialog -l ProHLer.DNoHL {
  857.  
  858. ;ID Info:
  859. ;Boxes 20-30
  860. ;Lables(Text&Edit) 30-50
  861. ;Buttons 50-70
  862. ;Lists 70-80
  863.  
  864. title "ProHLer - NonHighLighting nicknames(Loading...)"
  865. size -1 -1 300 170
  866. option dbu
  867.  
  868. box "Nickname Editor" , 20, 5 5 250 60
  869. box "Nicknames" , 21, 5 65 250 85
  870. text "Nr:" , 30, 10 15 50 10
  871. text "Loading..." , 31, 80 15 50 10
  872. text "Edit:" , 32, 10 25 50 10
  873. edit "Loading..." , 33, 77 25 150 10
  874. text "Wildcards(*) are allowed at nicknames!" , 34, 10 37 100 20
  875. list 70, 10 75 10 60
  876. list 71, 77 75 150 60
  877. button "Delete Selected" , 50, 10 135 80 10
  878. button "Add one" , 51, 90 135 80 10
  879. button "Save" , 52, 10 45 80 10
  880. button "Save all / Exit" , 53, 5 155 80 10
  881. }
  882. on *:dialog:ProHLer.DNoHL:init:0: {
  883. if ($dialog(ProHLer.DMain)) dialog -n ProHLer.DMain
  884. ProHLer.DNoHL.Reload
  885. dialog -t $dname ProHLer(Version $ProHLer.Version $+ ) - NonHighLight nicknames
  886. if (%proHler.DNoHL.nick) {
  887. dialog -n $dname
  888. if (!$didwm($dname,71,%proHler.DNoHL.nick)) {
  889. var %nr $calc($did(70).lines + 1)
  890. if (%nr <= 40) {
  891. did -a $dname 70 %nr
  892. did -a $dname 71 %proHler.DNoHL.nick
  893. did -c $dname 70 %nr
  894. did -c $dname 71 %nr
  895.  
  896. did -ra $dname 31 $did(70).sel
  897. did -ranf $dname 33 $did(71).seltext
  898. }
  899. else {
  900. noop $input(Sorry we only accept 40 nicknames!,oid,ProHLer - Info)
  901. }
  902. }
  903. else {
  904. 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)
  905. dialog -x $dname
  906. }
  907. dialog -o $dname
  908. unset %proHler.DNoHL.nick
  909. }
  910. }
  911. on *:dialog:ProHLer.DNoHL:sclick:50: {
  912. dialog -n $dname
  913. if ($did(71).sel) {
  914. var %nr $did(71).sel
  915. var %text $did(71).seltext
  916. if ($input(Are you sure you want to delete the folowing nickname: $+ $crlf $+ Nr: %nr $+ $crlf $+ Text: %text,yqd,ProHLer - Question)) {
  917. did -d $dname 70 %nr
  918. did -d $dname 71 %nr
  919. var %i = 1
  920. while (%i <= $did(70).lines) {
  921. did -o $dname 70 %i %i
  922. inc %i
  923. }
  924. did -ra $dname 31 None
  925. did -ram $dname 33
  926. }
  927. }
  928. else {
  929. noop $input(There is no nickname selected!,oid,ProHLer - Info)
  930. }
  931. dialog -o $dname
  932. }
  933. on *:dialog:ProHLer.DNoHL:sclick:51: {
  934. dialog -n $dname
  935. var %nr $calc($did(70).lines + 1)
  936. if (%nr <= 40) {
  937. did -a $dname 70 %nr
  938. did -a $dname 71 Nickname %nr
  939. did -c $dname 70 %nr
  940. did -c $dname 71 %nr
  941.  
  942. did -ra $dname 31 $did(70).sel
  943. did -rafn $dname 33 $did(71).seltext
  944. }
  945. else {
  946. noop $input(Sorry we only accept 40 nicknames!,oid,ProHLer - Info)
  947. }
  948. dialog -o $dname
  949. }
  950. on *:dialog:ProHLer.DNoHL:sclick:52: {
  951. dialog -n $dname
  952. if ($did(71).sel) {
  953. var %nr $did(31).text
  954. var %text $did(33).text
  955. did -o $dname 70 %nr %nr
  956. did -o $dname 71 %nr %text
  957. did -c $dname 70 %nr
  958. did -c $dname 71 %nr
  959. }
  960. else {
  961. noop $input(There is no nickname selected!,oid,ProHLer - Info)
  962. }
  963. dialog -o $dname
  964. }
  965. on *:dialog:ProHLer.DNoHL:sclick:53: {
  966. dialog -n $dname
  967. set %ProHLer.NoHls $didtok($dname,71,59)
  968. var %i = 1
  969. while (%i <= $numtok(%ProHLer.NoHls,59)) {
  970. if ($window(@ProHLer. $+ $gettok(%ProHLer.NoHls,%i,59))) window -c @ProHLer. $+ $gettok(%ProHLer.NoHls,%i,59))
  971. inc %i
  972. }
  973. noop $input(Your non highlighting nicknames are saved!,oid,ProHLer - Info)
  974. dialog -x $dname
  975. if ($dialog(ProHLer.DMain)) dialog -o ProHLer.DMain
  976. }
  977. on *:dialog:ProHLer.DNoHL:sclick:70: {
  978. did -ra $dname 31 $did($did).sel
  979. did -ran $dname 33 $did(71,$did($did).sel).text
  980. did -c $dname 71 $did($did).sel
  981. }
  982. on *:dialog:ProHLer.DNoHL:sclick:71: {
  983. did -ra $dname 31 $did($did).sel
  984. did -ran $dname 33 $did($did).seltext
  985. did -c $dname 70 $did($did).sel
  986. }
  987. on *:dialog:ProHLer.DNoHL:close:0: {
  988. if ($didtok($dname,71,59) != %ProHLer.NoHls) {
  989. if ($input(You made some changes! Do you want to save them?,yqd,ProHLer - Question)) {
  990. set %ProHLer.NoHls $didtok($dname,71,59)
  991. noop $input(Your non highlighting nicknames are saved!,oid,ProHLer - Info)
  992. }
  993. }
  994. if ($dialog(ProHLer.DMain)) dialog -o ProHLer.DMain
  995. }
  996. dialog -l ProHLer.DResetStats {
  997.  
  998. ;ID Info:
  999. ;Boxes 20-30
  1000. ;Lables(Text&Edit) 30-50
  1001. ;Buttons 50-70
  1002. ;Lists 70-80
  1003.  
  1004. title "ProHLer - Reseting(Loading...)"
  1005. size -1 -1 120 90
  1006. option dbu
  1007.  
  1008. box "Reset" , 20, 5 5 90 60
  1009. button "Reset Stats(nicknames)" , 50, 10 15 80 10
  1010. button "Reset Stats(Channels)" , 51, 10 25 80 10
  1011. button "Reset All ignored HighLights" , 52, 10 35 80 10
  1012. button "Reset All HighLight stats" , 53, 10 45 80 10
  1013. button "Exit" , 54, 5 70 80 10
  1014. }
  1015. on *:dialog:ProHLer.DResetStats:init:0: {
  1016. if ($dialog(ProHLer.DMain)) dialog -n ProHLer.DMain
  1017. dialog -t $dname ProHLer(Version $ProHLer.Version $+ ) - Reseting
  1018. }
  1019. on *:dialog:ProHLer.DResetStats:sclick:50: {
  1020. dialog -n $dname
  1021. if ($input(Are you sure you want to reset the nickname HighLight stats?,yqd,ProHLer - Question)) {
  1022. var %total $bytes($iif(%ProHLer.TotalHls isnum,$var(%ProHLer.Nicks.*,0),0),bd)
  1023. unset %ProHLer.Nicks.*
  1024. noop $input(All Nickname HighLight stats are reseted! Total: %total,oid,ProHLer - Info)
  1025. ProHLer.DMain.Reload
  1026. }
  1027. dialog -o $dname
  1028. }
  1029. on *:dialog:ProHLer.DResetStats:sclick:51: {
  1030. dialog -n $dname
  1031. if ($input(Are you sure you want to reset the Channel HighLight stats?,yqd,ProHLer - Question)) {
  1032. var %total $bytes($iif(%ProHLer.TotalHls isnum,$var(%ProHLer.Chans.*,0),0),bd)
  1033. unset %ProHLer.Chans.*
  1034. noop $input(All Channel HighLight stats are reseted! Total: %total,oid,ProHLer - Info)
  1035. ProHLer.DMain.Reload
  1036. }
  1037. dialog -o $dname
  1038. }
  1039. on *:dialog:ProHLer.DResetStats:sclick:52: {
  1040. dialog -n $dname
  1041. if ($input(Are you sure you want to reset the ignored HighLight stats?,yqd,ProHLer - Question)) {
  1042. unset %ProHLer.TotalNonHls
  1043. noop $input(Your ignored HighLight stats are reseted!,oid,ProHLer - Info)
  1044. ProHLer.DMain.Reload
  1045. }
  1046. dialog -o $dname
  1047. }
  1048. on *:dialog:ProHLer.DResetStats:sclick:53: {
  1049. dialog -n $dname
  1050. if ($input(Are you sure you want to reset the all HighLight stats?,yqd,ProHLer - Question)) {
  1051. var %total $bytes($iif(%ProHLer.TotalHls isnum,$var(%ProHLer.Nicks.*,0),0),bd)
  1052. var %totalc $bytes($iif(%ProHLer.TotalHls isnum,$var(%ProHLer.Chans.*,0),0),bd)
  1053. var %totaltot $iif(%ProHLer.TotalHls isnum,%ProHLer.TotalHls,0)
  1054. var %totaligtot $iif(%ProHLer.TotalNonHls isnum,%ProHLer.TotalNonHls,0)
  1055. unset %ProHLer.Nicks.*
  1056. unset %ProHLer.Chans.*
  1057. unset %ProHLer.TotalHls
  1058. unset %ProHLer.TotalNonHls
  1059. unset %ProHLer.Date.Day
  1060. unset %ProHLer.Average.Day
  1061. unset %ProHLer.Last.Nick
  1062. unset %ProHLer.Last.Time
  1063. 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)
  1064. ProHLer.DMain.Reload
  1065. }
  1066. dialog -o $dname
  1067. }
  1068. on *:dialog:ProHLer.DResetStats:sclick:54: {
  1069. dialog -x $dname
  1070. ProHLer.DMain.Reload
  1071. if ($dialog(ProHLer.DMain)) dialog -o ProHLer.DMain
  1072. }
  1073. on *:dialog:ProHLer.DResetStats:close:0: {
  1074. ProHLer.DMain.Reload
  1075. if ($dialog(ProHLer.DMain)) dialog -o ProHLer.DMain
  1076. }
  1077. dialog -l ProHLer.DSettings {
  1078.  
  1079. ;ID Info:
  1080. ;Boxes 20-30
  1081. ;Lables(Text&Edit) 30-50
  1082. ;Buttons 50-70
  1083. ;Lists 70-80
  1084.  
  1085. title "ProHLer - Settings(Loading...)"
  1086. size -1 -1 220 145
  1087. option dbu
  1088.  
  1089. box "Options" , 20, 5 5 100 60
  1090. box "Color Options" , 21, 105 5 100 60
  1091. box "Sound Options" , 22, 5 65 200 60
  1092. check "Enable UpdateCheck" , 11, 10 15 80 10
  1093. check "Enable HighLight on ACTION(/me)" , 10, 10 25 100 10
  1094. check "Enable Spamprotect" , 13, 10 35 100 10
  1095. check "Enable custom colors" , 12, 110 15 100 10
  1096. check "Enable sounds" , 14, 10 75 100 10
  1097. text "Sound on HighLight:" , 34, 10 85 50 10
  1098. button "Select" , 51, 70 85 30 10
  1099. check "Enable" , 15, 105 85 100 10
  1100. text "File:" , 35, 10 95 50 10
  1101. text "..." , 36, 70 95 150 10
  1102. button "Advanced sound settings" , 52, 10 110 100 10
  1103. text "ProHLer Color 1:" , 32, 110 25 50 10
  1104. combo 70, 160 25 30 10, drop
  1105. text "ProHLer Color 2:" , 33, 110 35 50 10
  1106. combo 71, 160 35 30 10, drop
  1107. button "Save all / Exit" , 50, 5 130 80 10
  1108. }
  1109. on *:dialog:ProHLer.DSettings:init:0: {
  1110. if ($dialog(ProHLer.DMain)) dialog -n ProHLer.DMain
  1111. ProHLer.DSettings.Reload
  1112. dialog -t $dname ProHLer(Version $ProHLer.Version $+ ) - Settings
  1113. }
  1114. on *:dialog:ProHLer.DSettings:sclick:11: {
  1115. dialog -n $dname
  1116. if (%ProHLer.UpdateCheck.On) {
  1117. set %ProHLer.UpdateCheck.On $false
  1118. did -u ProHLer.DSettings 11
  1119. noop $input(ProHLer will nolonger check for a new version if you open the main window,oid,ProHLer - Info)
  1120. }
  1121. else {
  1122. set %ProHLer.UpdateCheck.On $true
  1123. did -c ProHLer.DSettings 11
  1124. noop $input(ProHLer will now check for a new version everytime you open the main window,oid,ProHLer - Info)
  1125. }
  1126. dialog -o $dname
  1127. }
  1128. on *:dialog:ProHLer.DSettings:sclick:10: {
  1129. dialog -n $dname
  1130. if (%ProHLer.ActionHighLight) {
  1131. set %ProHLer.ActionHighLight $false
  1132. did -u ProHLer.DSettings 10
  1133. noop $input(You will nolonger get HighLighted on ACTION,oid,ProHLer - Info)
  1134. }
  1135. else {
  1136. set %ProHLer.ActionHighLight $true
  1137. did -c ProHLer.DSettings 10
  1138. noop $input(You will now get HighLighted on ACTION,oid,ProHLer - Info)
  1139. }
  1140. dialog -o $dname
  1141. }
  1142. on *:dialog:ProHLer.DSettings:sclick:12: {
  1143. dialog -n $dname
  1144. if (%ProHLer.CustomColors.On) {
  1145. set %ProHLer.CustomColors.On $false
  1146. did -u ProHLer.DSettings 12
  1147. did -b ProHLer.DSettings 70
  1148. did -b ProHLer.DSettings 71
  1149. noop $input(Your custom ProHLer colors are now disabled,oid,ProHLer - Info)
  1150. }
  1151. else {
  1152. set %ProHLer.CustomColors.On $true
  1153. did -c ProHLer.DSettings 12
  1154. did -e ProHLer.DSettings 70
  1155. did -e ProHLer.DSettings 71
  1156. noop $input(Your custom ProHLer colors are now enabled,oid,ProHLer - Info)
  1157. }
  1158. dialog -o $dname
  1159. }
  1160. on *:dialog:ProHLer.DSettings:sclick:13: {
  1161. dialog -n $dname
  1162. if (%ProHLer.SpamProtect.On) {
  1163. set %ProHLer.SpamProtect.On $false
  1164. did -u ProHLer.DSettings 13
  1165. noop $input(ProHLer spam protect is now disabled,oid,ProHLer - Info)
  1166. }
  1167. else {
  1168. set %ProHLer.SpamProtect.On $true
  1169. did -c ProHLer.DSettings 13
  1170. noop $input(ProHLer spam protect is now enabled,oid,ProHLer - Info)
  1171. }
  1172. dialog -o $dname
  1173. }
  1174. on *:dialog:ProHLer.DSettings:sclick:15: {
  1175. dialog -n $dname
  1176. if (%ProHLer.Sounds.OnHighLight.On) {
  1177. set %ProHLer.Sounds.OnHighLight.On $false
  1178. noop $input(This sound is disables,oid,ProHLer - Info)
  1179. }
  1180. else {
  1181. set %ProHLer.Sounds.OnHighLight.On $true
  1182. noop $input(This sound is enabled,oid,ProHLer - Info)
  1183. }
  1184. dialog -o $dname
  1185. }
  1186. on *:dialog:ProHLer.DSettings:sclick:14: {
  1187. dialog -n $dname
  1188. if (%ProHLer.Sounds.On) {
  1189. set %ProHLer.Sounds.On $false
  1190. did -u ProHLer.DSettings 14
  1191. did -b ProHLer.DSettings 51
  1192. did -b ProHLer.DSettings 15
  1193. noop $input(The sounds are disabled,oid,ProHLer - Info)
  1194. }
  1195. else {
  1196. set %ProHLer.Sounds.On $true
  1197. did -c ProHLer.DSettings 14
  1198. did -e ProHLer.DSettings 51
  1199. did -e ProHLer.DSettings 15
  1200. noop $input(The sounds are enabled,oid,ProHLer - Info)
  1201. }
  1202. dialog -o $dname
  1203. }
  1204. on *:dialog:ProHLer.DSettings:sclick:14: {
  1205. dialog -n $dname
  1206. if (%ProHLer.Sounds.On) {
  1207. set %ProHLer.Sounds.On $false
  1208. did -u ProHLer.DSettings 14
  1209. did -b ProHLer.DSettings 51
  1210. did -b ProHLer.DSettings 15
  1211. noop $input(The sounds are disabled,oid,ProHLer - Info)
  1212. }
  1213. else {
  1214. set %ProHLer.Sounds.On $true
  1215. did -c ProHLer.DSettings 14
  1216. did -e ProHLer.DSettings 51
  1217. did -e ProHLer.DSettings 15
  1218. noop $input(The sounds are enabled,oid,ProHLer - Info)
  1219. }
  1220. dialog -o $dname
  1221. }
  1222. on *:dialog:ProHLer.DSettings:sclick:51: {
  1223. dialog -n $dname
  1224. if ($sfile($mircdir, Select a sound`, Select)) {
  1225. set %ProHLer.Sounds.OnHighLight.File $v1
  1226. did -ra ProHLer.DSettings 36 $nopath($v1)
  1227. }
  1228. dialog -o $dname
  1229. }
  1230. on *:dialog:ProHLer.DSettings:sclick:50: {
  1231. dialog -n $dname
  1232. if (%ProHLer.CustomColors.On) {
  1233. if ($did($dname, 70).sel == 1) set %ProHLer.CustomColors.1 $false
  1234. else set %ProHLer.CustomColors.1 $calc($did($dname, 70).sel - 2)
  1235. if ($did($dname, 71).sel == 1) set %ProHLer.CustomColors.2 $false
  1236. else set %ProHLer.CustomColors.2 $calc($did($dname, 71).sel - 2)
  1237. }
  1238. dialog -x $dname
  1239. ProHLer.DMain.Reload
  1240. if ($dialog(ProHLer.DMain)) dialog -o ProHLer.DMain
  1241. }
  1242. on *:dialog:ProHLer.DSettings:sclick:52: {
  1243. dialog -mordv ProHLer.DAdvancedSound ProHLer.DAdvancedSound
  1244. }
  1245. on *:dialog:ProHLer.DSettings:close:0: {
  1246. ProHLer.DMain.Reload
  1247. if ($dialog(ProHLer.DMain)) dialog -o ProHLer.DMain
  1248. }
  1249. dialog -l ProHLer.DAdvancedSound {
  1250.  
  1251. ;ID Info:
  1252. ;Boxes 20-30
  1253. ;Lables(Text&Edit) 30-50
  1254. ;Buttons 50-70
  1255. ;Lists 70-80
  1256.  
  1257. title "ProHLer - Advanced Sound(Loading...)"
  1258. size -1 -1 300 200
  1259. option dbu
  1260.  
  1261. box "Nickname Editor" , 20, 5 5 250 90
  1262. box "Nicknames " , 21, 5 95 250 85
  1263. text "Nr:" , 30, 10 15 50 10
  1264. text "Loading..." , 31, 80 15 50 10
  1265. text "Edit:" , 32, 10 25 50 10
  1266. text "File:" , 36, 10 45 50 10
  1267. text "Select file:" , 37, 10 35 50 10
  1268. edit "Loading..." , 33, 77 25 150 10
  1269. text "None" , 35, 77 45 150 10
  1270. check "Enable" , 10, 77 55 100 10
  1271. text "Wildcards(*) are allowed at nicknames and hosts" , 34, 10 67 120 20
  1272. list 70, 10 105 10 60
  1273. list 71, 77 105 150 60
  1274. button "Select" , 54, 77 35 30 10
  1275. button "Delete Selected" , 50, 10 165 80 10
  1276. button "Add one" , 51, 90 165 80 10
  1277. button "Save" , 52, 10 75 80 10
  1278. button "Save all / Exit" , 53, 5 185 80 10
  1279. }
  1280. on *:dialog:ProHLer.DAdvancedSound:init:0: {
  1281. if ($dialog(ProHLer.DSettings)) dialog -n ProHLer.DSettings
  1282. ProHLer.DAdvancedSound.Reload
  1283. dialog -t $dname ProHLer(Version $ProHLer.Version $+ ) - Advanced Sound
  1284. }
  1285. on *:dialog:ProHLer.DAdvancedSound:sclick:50: {
  1286. dialog -n $dname
  1287. if ($did(71).sel) {
  1288. var %nr $did(71).sel
  1289. var %text $did(71).seltext
  1290. if ($input(Are you sure you want to delete the folowing nickname: $+ $crlf $+ Nr: %nr $+ $crlf $+ Text: %text,yqd,ProHLer - Question)) {
  1291. did -d $dname 70 %nr
  1292. did -d $dname 71 %nr
  1293. var %i = 1
  1294. while (%i <= $did(70).lines) {
  1295. did -o $dname 70 %i %i
  1296. inc %i
  1297. }
  1298. did -ra $dname 31 None
  1299. did -ra $dname 35 None
  1300. did -u $dname 10
  1301. did -ram $dname 33
  1302. hdel ProHLer.Tmp $+(AdvancedSound., %nr)
  1303. }
  1304. }
  1305. else {
  1306. noop $input(There is no nickname selected!,oid,ProHLer - Info)
  1307. }
  1308. dialog -o $dname
  1309. }
  1310. on *:dialog:ProHLer.DAdvancedSound:sclick:51: {
  1311. dialog -n $dname
  1312. var %nr $calc($did(70).lines + 1)
  1313. if (%nr <= 40) {
  1314. did -a $dname 70 %nr
  1315. did -a $dname 71 Nickname %nr
  1316. did -c $dname 70 %nr
  1317. did -c $dname 71 %nr
  1318. did -u $dname 10
  1319. did -ra $dname 35 None
  1320.  
  1321. did -ra $dname 31 $did(70).sel
  1322. did -rafn $dname 33 $did(71).seltext
  1323. hadd ProHLer.Tmp $+(AdvancedSound., %nr) $+(%nr, $chr(59), Nickname %nr, $chr(59), -, $chr(59), $false)
  1324. }
  1325. else {
  1326. noop $input(Sorry we only accept 40 nicknames!,oid,ProHLer - Info)
  1327. }
  1328. dialog -o $dname
  1329. }
  1330. on *:dialog:ProHLer.DAdvancedSound:sclick:52: {
  1331. dialog -n $dname
  1332. if ($did(71).sel) {
  1333. var %nr $did(31).text
  1334. var %text $did(33).text
  1335. var %text2 $did(35).text
  1336. var %state $iif($did($dname, 10).state == 1, $true, $false)
  1337. tokenize 59 $hget(ProHLer.Tmp, $+(AdvancedSound., %nr))
  1338. did -o $dname 70 %nr %nr
  1339. did -o $dname 71 %nr %text
  1340. did -c $dname 70 %nr
  1341. did -c $dname 71 %nr
  1342. hadd ProHLer.Tmp $+(AdvancedSound., %nr) $+(%nr, $chr(59), %text, $chr(59), %text2, $chr(59), %state)
  1343. }
  1344. else {
  1345. noop $input(There is no nickname selected!,oid,ProHLer - Info)
  1346. }
  1347. dialog -o $dname
  1348. }
  1349. on *:dialog:ProHLer.DAdvancedSound:sclick:53: {
  1350. dialog -n $dname
  1351. hdel -w ProHLer AdvancedSound.*
  1352. var %i = 1
  1353. while (%i <= $hfind(ProHler.Tmp, AdvancedSound.*, 0, w)) {
  1354. var %key = $hfind(ProHler.Tmp, AdvancedSound.*, %i, w), %value = $hget(ProHLer.Tmp, %key)
  1355. hadd ProHLer %key %value
  1356. inc %i
  1357. }
  1358. noop $input(Your advanced sound settings are saved!,oid,ProHLer - Info)
  1359. hdel -w ProHLer.Tmp AdvancedSound.*
  1360. dialog -x $dname
  1361. if ($dialog(ProHLer.DSettings)) dialog -o ProHLer.DSettings
  1362. }
  1363. on *:dialog:ProHLer.DAdvancedSound:sclick:70: {
  1364. tokenize 59 $hget(ProHLer.Tmp, $+(AdvancedSound., $did($did).sel))
  1365. did -ra $dname 31 $did($did).sel
  1366. did -ran $dname 33 $did(71,$did($did).sel).text
  1367. did -ran $dname 35 $3
  1368. if ($4 == $true) did -c $dname 10
  1369. else did -u $dname 10
  1370. did -c $dname 71 $did($did).sel
  1371. }
  1372. on *:dialog:ProHLer.DAdvancedSound:sclick:71: {
  1373. tokenize 59 $hget(ProHLer.Tmp, $+(AdvancedSound., $did($did).sel))
  1374. did -ra $dname 31 $did($did).sel
  1375. did -ran $dname 33 $did($did).seltext
  1376. did -ran $dname 35 $3
  1377. if ($4 == $true) did -c $dname 10
  1378. else did -u $dname 10
  1379. did -c $dname 70 $did($did).sel
  1380. }
  1381. on *:dialog:ProHLer.DAdvancedSound:sclick:54: {
  1382. dialog -n $dname
  1383. if ($sfile($mircdir, Select a sound`, Select)) {
  1384. did -ran $dname 35 $v1
  1385. }
  1386. dialog -o $dname
  1387. }
  1388. on *:dialog:ProHLer.DAdvancedSound:close:0: {
  1389. ProHLer.DMain.Reload
  1390. ProHLer.DSettings.Reload
  1391. hdel -w ProHLer.Tmp AdvancedSound.*
  1392. if ($dialog(ProHLer.DSettings)) dialog -o ProHLer.DSettings
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement