Addons
  • Uploaded By: entropy
  • Author: entropy
  • Added: 5 months ago
  • Updated: 4 days ago
  • mIRC Version: 7.52+
  • Hits: 1,205
  • Size: 312.59KB
  • Downloads: 151
  • Review By: maroon



My Theme v4.9.8

This is my personal theme system i use.
It has many useful options and some stylish ones.
I hope others will like and use this Addon!
Screenshot...

    
  4    0  Login to Vote.


Source Code:
  1. ; My Theme v4.9.8 - by entropy 2018
  2. ; Before installing this script, make sure you have installed the fixed width font Liberation Mono!
  3. ; Works well with Channels/Queries maximized.
  4.  
  5. alias -l sversion {
  6. return v4.9.8
  7. }
  8.  
  9. alias swap {
  10. msg $1 $replace($2-,$+($chr(32),$chr(32)),$chr(160))
  11. }
  12.  
  13. on *:load:{
  14. if ($version < 7.52) {
  15. echo $color(own) -tag [ERROR] * You must be using mIRC version: 7.52 or greater to use this theme system!
  16. .unload -rs $qt($script)
  17. return
  18. }
  19.  
  20. window -x $qt($active)
  21.  
  22. %theme_services = Q X NS CS HS OS HS MS NickServ ChanServ HostServ OperServ MemoServ X@channels.undernet.org
  23.  
  24. %theme_oldfont = $qt($window($active).font)
  25. %theme_oldsize = $window($active).fontsize
  26.  
  27. %theme_font = "Liberation Mono"
  28. %theme_size = 18
  29. %theme_mycolor = 07
  30. %theme_spaces = Yes
  31.  
  32. font -z %theme_size %theme_font
  33.  
  34. %theme_bg = On
  35. %theme_black = On
  36. %theme_acro = On
  37. %theme_left = (
  38. %theme_right = )
  39. %theme_oper = 00
  40. %theme_away = 71
  41. %theme_fix = On
  42. %theme_censor = Off
  43. %theme_caps = Off
  44. %theme_style = 13
  45. %theme_stylestatus = On
  46. %theme_percent = 85
  47. %theme_swears = fuck shit cunt asshole gay faggot whore slut pussy nigger dick cock vagina
  48. %theme_image = $qt($scriptdirImages\bg.jpg)
  49.  
  50. if (!$isdir($qt($scriptdirImages))) { mkdir $qt($scriptdirImages) }
  51.  
  52. %theme_treebar = $replace($treebar,1,On,0,Off)
  53. %theme_switchbar = $replace($switchbar,1,On,0,Off)
  54. %theme_toolbar = $replace($toolbar,1,On,0,Off)
  55.  
  56. %theme_keep = Off
  57. %theme_prefix = On
  58. %theme_global = On
  59.  
  60. %theme_oldformat = $timestampfmt
  61. %theme_format = [hh:nn:sst]
  62.  
  63. %theme_oldtreebar = $replace($treebar,1,On,0,Off)
  64. %theme_oldswitchbar = $replace($switchbar,1,On,0,Off)
  65. %theme_oldtoolbar = $replace($toolbar,1,On,0,Off)
  66.  
  67. .treebar on
  68. %theme_treebar = On
  69.  
  70. .switchbar off
  71. %theme_switchbar = Off
  72.  
  73. .toolbar on
  74. %theme_toolbar = On
  75.  
  76. .cnick on
  77. getcolor
  78. restorecolor
  79. restoreacronyms
  80. saveoriginalsettings
  81.  
  82. .timestamp on
  83. .timestamp -f %theme_format
  84. .timestamp -g %theme_format
  85.  
  86. whoall
  87.  
  88. if (!$network) { background -fs $qt($scriptdirImages\default.bmp) }
  89. else { bgall }
  90. echos load
  91. }
  92.  
  93. on *:unload:{
  94.  
  95. var %a = 1, %b
  96. while ($scon(%a)) {
  97. .scid $v1
  98. background -xs
  99. inc %a
  100. }
  101. .scid -r
  102.  
  103.  
  104. .scon -at1 clearall
  105. echos unload
  106.  
  107. if (%theme_oldtoolbar == On) { .toolbar on }
  108. else { .toolbar off }
  109.  
  110. if (%theme_oldswitchbar == On) { .switchbar on }
  111. else { .switchbar off }
  112.  
  113. if (%theme_oldtreebar == On) { .treebar on }
  114. else { .treebar off }
  115.  
  116. .timestamp -f %theme_oldformat
  117. .timestamp -g %theme_oldformat
  118.  
  119. bgclearall
  120. cleanup
  121. .cnick off
  122.  
  123. .timerstate off
  124. window -r $qt($active)
  125.  
  126.  
  127. var %a = 1, %b
  128. while ($findfile($scriptdirImages\,*.bmp, %a)) {
  129. var %b = $v1
  130. if ($nopath(%b) != default.bmp) { .remove $qt(%b) }
  131. inc %a
  132. }
  133. remini $mircini windows
  134. remini $mircini chanhist
  135. remini $mircini backgrounds
  136. remini $mircini fonts
  137. flushini $mircini
  138.  
  139. font -z %theme_oldfont %theme_oldsize
  140. }
  141.  
  142.  
  143. alias -l b {
  144. if (!$isid) { return }
  145. return $+(%theme_bl,$upper($1),%theme_br)
  146. }
  147.  
  148.  
  149. alias -l echos {
  150. var %a = 1
  151. while ($scon(%a)) {
  152. .scid $v1
  153. if ($1 == load) { echo $color(notify) -tsg * [LOAD] Welcome to My Theme $sversion - by entropy 2018 }
  154. if ($1 == unload) { echo $color(notify) -tsg * [UNLOAD] Thank you for using My Theme $sversion - by entropy 2018 }
  155. inc %a
  156. }
  157. .scid -r
  158. }
  159.  
  160.  
  161. alias -l acolor {
  162. if (!%result) { return }
  163. window -c @colors
  164. if (%result isin oper away) {
  165. set $eval($+(%,theme_,%result),1) $1
  166. echo $color(info) -tag * $iif(%result == oper,Oper,$iif(%result == away,Away)) color is now: $+($chr(3),$1,$1,$chr(3))
  167. ;who $active
  168. }
  169. else {
  170. %theme_mycolor = $1
  171. echo $color(info) -tag * BG Text color is now: $+($chr(3),$1,$1,$chr(3))
  172. bgall
  173. }
  174. unset %result
  175. }
  176.  
  177. alias -l showcolors {
  178. if (!$exists($qt($scriptdirImages\colors.png))) { return }
  179. if ($1 == oper) { %result = oper }
  180. elseif ($1 == away) { %result = away }
  181. elseif ($1 == text) { %result = text }
  182. else { return }
  183. window -c @Colors
  184. window -dpfCw0ok0 +tn @Colors -1 -1 317 242
  185.  
  186. if (%result == text) {
  187. titlebar @Colors BG Text (Current: %theme_mycolor $+ )
  188. }
  189. else {
  190. titlebar @Colors $+($upper($mid(%result,1,1)),$lower($mid(%result,2))) (Current: $eval($+(%,theme_,%result),3) $+ )
  191. }
  192. drawpic -sc @Colors 0 0 $qt($scriptdirImages\colors.png)
  193. }
  194.  
  195. on *:close:@Colors:{ unset %result }
  196.  
  197. alias -l domouse {
  198. if ($mouse.x isnum $1 && $mouse.y isnum $2) { acolor $3 }
  199. }
  200.  
  201. menu @Colors {
  202. sclick {
  203. ;OLD COLORS (top)
  204. domouse 5-28 5-28 00
  205. domouse 32-54 5-28 01
  206. domouse 58-78 5-28 02
  207. domouse 82-107 5-28 03
  208. domouse 111-132 5-28 04
  209. domouse 136-157 5-28 05
  210. domouse 162-183 5-28 06
  211. domouse 188-209 5-28 07
  212.  
  213. ;OLD COLORS (bottom)
  214. domouse 5-28 32-54 08
  215. domouse 32-54 32-54 09
  216. domouse 58-78 32-54 10
  217. domouse 82-107 32-54 11
  218. domouse 111-132 32-54 12
  219. domouse 136-157 32-54 13
  220. domouse 162-183 32-54 14
  221. domouse 188-209 32-54 15
  222.  
  223. ;NEW COLORS
  224.  
  225.  
  226. ;ROW 1
  227. domouse 5-28 61-81 16
  228. domouse 32-54 61-81 17
  229. domouse 58-78 61-81 18
  230. domouse 82-107 61-81 19
  231. domouse 111-132 61-81 20
  232. domouse 136-157 61-81 21
  233. domouse 162-183 61-81 22
  234. domouse 188-209 61-81 23
  235. domouse 214-235 61-81 24
  236. domouse 240-261 61-81 25
  237. domouse 267-287 61-81 26
  238. domouse 293-313 61-81 27
  239.  
  240.  
  241. ;ROW 2
  242. domouse 5-28 87-108 28
  243. domouse 32-54 87-108 29
  244. domouse 58-78 87-108 30
  245. domouse 82-107 87-108 31
  246. domouse 111-132 87-108 32
  247. domouse 136-157 87-108 33
  248. domouse 162-183 87-108 34
  249. domouse 188-209 87-108 35
  250. domouse 214-235 87-108 36
  251. domouse 240-261 87-108 37
  252. domouse 267-287 87-108 38
  253. domouse 293-313 87-108 39
  254.  
  255.  
  256. ;ROW 3
  257. domouse 5-28 113-134 40
  258. domouse 32-54 113-134 41
  259. domouse 58-78 113-134 42
  260. domouse 82-107 113-134 43
  261. domouse 111-132 113-134 44
  262. domouse 136-157 113-134 45
  263. domouse 162-183 113-134 46
  264. domouse 188-209 113-134 47
  265. domouse 214-235 113-134 48
  266. domouse 240-261 113-134 49
  267. domouse 267-287 113-134 50
  268. domouse 293-313 113-134 51
  269.  
  270.  
  271. ;ROW 4
  272. domouse 5-28 140-161 52
  273. domouse 32-54 140-161 53
  274. domouse 58-78 140-161 54
  275. domouse 82-107 140-161 55
  276. domouse 111-132 140-161 56
  277. domouse 136-157 140-161 57
  278. domouse 162-183 140-161 58
  279. domouse 188-209 140-161 59
  280. domouse 214-235 140-161 60
  281. domouse 240-261 140-161 61
  282. domouse 267-287 140-161 62
  283. domouse 293-313 140-161 63
  284.  
  285.  
  286. ;ROW 5
  287. domouse 5-28 165-187 64
  288. domouse 32-54 165-187 65
  289. domouse 58-78 165-187 66
  290. domouse 82-107 165-187 67
  291. domouse 111-132 165-187 68
  292. domouse 136-157 165-187 69
  293. domouse 162-183 165-187 70
  294. domouse 188-209 165-187 71
  295. domouse 214-235 165-187 72
  296. domouse 240-261 165-187 73
  297. domouse 267-287 165-187 74
  298. domouse 293-313 165-187 75
  299.  
  300.  
  301. ;ROW 6
  302. domouse 5-28 192-213 76
  303. domouse 32-54 192-213 77
  304. domouse 58-78 192-213 78
  305. domouse 82-107 192-213 79
  306. domouse 111-132 192-213 80
  307. domouse 136-157 192-213 81
  308. domouse 162-183 192-213 82
  309. domouse 188-209 192-213 83
  310. domouse 214-235 192-213 84
  311. domouse 240-261 192-213 85
  312. domouse 267-287 192-213 86
  313. domouse 293-313 192-213 87
  314.  
  315.  
  316. ;ROW 7
  317. domouse 5-28 217-238 88
  318. domouse 32-54 217-238 89
  319. domouse 58-78 217-238 90
  320. domouse 82-107 217-238 91
  321. domouse 111-132 217-238 92
  322. domouse 136-157 217-238 93
  323. domouse 162-183 217-238 94
  324. domouse 188-209 217-238 95
  325. domouse 214-235 217-238 96
  326. domouse 240-261 217-238 97
  327. domouse 267-287 217-238 98
  328.  
  329. unset %result
  330. }
  331. }
  332.  
  333.  
  334. alias -l whoaway {
  335. if ($1 ischan && $server) {
  336. who $1
  337. }
  338. }
  339. alias -l default {
  340. if ($1 ischan) {
  341. var %a = 1
  342. while ($nick($1,%a)) {
  343. .cline -r $1 $v1
  344. inc %a
  345. }
  346. }
  347. }
  348.  
  349.  
  350. alias -l whoisscon {
  351. if ($query($1)) { echo $color(whois) -tg $1 * [WHOIS] $1- }
  352. else { echo $color(whois) $iif($activecid == $cid,-a,-s) $+ tg * [WHOIS] $1- }
  353. halt
  354. }
  355. alias whoisfirst {
  356. if ($query($1)) { echo $color(whois) $1 - }
  357. else { echo $color(whois) $iif($activecid == $cid,-a,-s) $+ g - }
  358. }
  359.  
  360. ; WHOIS RAWS
  361. raw 311:*:{ whoisscon $2 Host: $+($3,@,$4) $5- }
  362. raw 319:*:{ whoisscon $2 Channels: $3- }
  363. raw 312:*:{ whoisscon $2 Server: $remove($3-,:) }
  364. raw 330:*:{ whoisscon $2 Logged in as: $2 }
  365. raw 317:*:{ whoisscon $2 Idle: $remove($replace($duration($3),wks,w,wk,w,days,d,day,d,hrs,h,hr,h,mins,m,min,m,secs,s,sec,s),$chr(32)) $+ , Signon: $asctime($4) ( $+ $remove($replace($duration($calc($ctime - $4)),wks,w,wk,w,days,d,day,d,hrs,h,hr,h,mins,m,min,m,secs,s,sec,s),$chr(32)) ago) }
  366. raw 338:*:{ whoisscon $2 is actually: $3- }
  367. raw 307:*:{ whoisscon $remove($2-,:) }
  368. raw 671:*:{ whoisscon $2 is using a secure connection (SSL) }
  369. raw 313:*:{ whoisscon $2 is an IRC Operator $iif($4-6 != an IRC Operator,$+($chr(40),$4-,$chr(41))) }
  370. raw 301:*:{ whoisscon $2 is away: $+(",$remove($3-,:),") }
  371. raw 378:*:{ whoisscon $remove($2-,:) }
  372. raw 379:*:{ whoisscon $2 $remove($3-,:) }
  373. raw 320:*:{ whoisscon $2 $remove($3-,:) }
  374. raw 318:*:{ whoisscon $2 $remove($3-,:) }
  375. raw 401:*:{ whoisscon $2 $remove($3-,:) }
  376. raw 301:*:{ whoisscon $2 $remove($3-,:) }
  377.  
  378.  
  379. ; Connect RAWS
  380.  
  381. raw 001:*:{ echo $color(info2) -tsg * [RAWS] $remove($2-,:) | halt }
  382. raw 002:*:{ echo $color(info2) -tsg * [RAWS] $remove($2-,:) | halt }
  383. raw 003:*:{ echo $color(info2) -tsg * [RAWS] $remove($2-,:) | halt }
  384. raw 004:*:{ echo $color(info2) -tsg * [RAWS] $remove($2-,:) | halt }
  385. raw 005:*:{ echo $color(info2) -tsg * [RAWS] $remove($2-,:) | halt }
  386. raw 251:*:{ echo $color(info2) -tsg * [RAWS] $remove($2-,:) | halt }
  387. raw 252:*:{ echo $color(info2) -tsg * [RAWS] $remove($2-,:) | halt }
  388. raw 254:*:{ echo $color(info2) -tsg * [RAWS] $remove($2-,:) | halt }
  389. raw 255:*:{ echo $color(info2) -tsg * [RAWS] $remove($2-,:) | halt }
  390. raw 265:*:{ echo $color(info2) -tsg * [RAWS] $remove($2-,:) | halt }
  391. raw 266:*:{ echo $color(info2) -tsg * [RAWS] $remove($2-,:) | halt }
  392. raw 250:*:{ echo $color(info2) -tsg * [RAWS] $remove($2-,:) | halt }
  393. raw 253:*:{ echo $color(info2) -tsg * [RAWS] $remove($2-,:) | halt }
  394.  
  395. raw 422:*:{ echo $color(info) -tsg * [MOTD] - MOTD file is missing | halt }
  396. raw 375:*:{ echo $color(info) -tsg * [MOTD] $remove($2-,:) | halt }
  397. raw 372:*:{ echo $color(info) -tsg * [MOTD] $replace($parms,$chr(32),$chr(160)) | halt }
  398. raw 376:*:{ echo $color(info) -tsg * [MOTD] - $remove($2-,:) | halt }
  399.  
  400. raw 396:*:{ echo $color(info2) -tsg * [HOST] $remove($2-,:) | halt }
  401.  
  402. ;NOTIFY
  403. on ^*:notify:{
  404. if ($isfile($notify($nick).sound)) { .splay $qt($notify($nick).sound) }
  405. echo $color(notify) -tsg * [ONLINE] $nick ( $+ $notify($nick).addr $+ )
  406. halt
  407. }
  408. on ^*:unotify:{ echo $color(notify) -tsg * [OFFLINE] $nick has left IRC | halt }
  409.  
  410. ;WHO RAWS
  411.  
  412. raw 352:*:{
  413. var %r = $fline($2,$+(*,$6,*),1,1)
  414. if ($2 !ischan) { return }
  415. elseif ($chr(42) isin $7) { if ($6 != $me) { .cline %theme_oper $2 %r } }
  416. elseif (G isincs $7) { if ($6 != $me) { .cline %theme_away $2 %r } }
  417. elseif (H isincs $7 && $2 && %r) { .cline -r $2 %r }
  418. halt
  419. }
  420. raw 315:*:{ halt }
  421.  
  422. alias -l whoall {
  423. var %a = 1, %b
  424. while ($scon(%a)) {
  425. .scid $v1
  426. var %x = 1, %y
  427. while ($chan(%x)) {
  428. %y = $v1
  429. whoaway %y
  430. .timer $+ who $+ %y 0 3600 whoaway %y
  431. inc %x
  432. }
  433. inc %a
  434. }
  435. .scid -r
  436. }
  437.  
  438. on * :start:{
  439. if (!$hget(acronyms)) { hmake acronyms 100 }
  440. if (!$hget(settings)) { hmake settings 100 }
  441.  
  442. if ($exists($qt($scriptdiracronyms.dat))) { hload acronyms $qt($scriptdiracronyms.dat) }
  443. if ($exists($qt($scriptdirsettings.dat))) { hload settings $qt($scriptdirsettings.dat) }
  444.  
  445. if ($scon(0) == 1 && !$server) { bg $network -s }
  446. }
  447.  
  448. menu menubar,status,channel,query {
  449. -
  450. Theme $sversion
  451. .Theme Status $chr(9) $iif($group(#theme).status == on,On,Off) {
  452. $iif($group(#theme).status == on,.disable,.enable) #theme
  453. echo $color(info) -tag * Theme is now: $replace($group(#theme).status,on,On,off,Off)
  454. }
  455. .-
  456. .Font/Size $chr(9) $+($remove(%theme_font,"),/,%theme_size) {
  457. font
  458. %theme_font = $qt($window($active).font)
  459. %theme_size = $window($active).fontsize
  460.  
  461. font -z %theme_size %theme_font
  462. if (%theme_bg == On) { bgall }
  463. else { bgclearall }
  464. echo $color(info) -tag * Font is now: %theme_font - Size is now: %theme_size
  465. }
  466. .-
  467. .Nick
  468. ..Spaces $chr(9) $replace(%theme_spaces,yes,Yes,no,No) {
  469. %theme_spaces = $iif(%theme_spaces == Yes,No,Yes)
  470. echo $color(info) -tag * Spaces are now: %theme_spaces
  471. }
  472. ..-
  473. ..Brackets $chr(9) $iif(!%theme_left && !%theme_right,None,%theme_left $+ $me $+ %theme_right)
  474. ...$iif(%theme_left == $chr(40),$style(1)) 1 ( $+ $me $+ ) { %theme_left = $chr(40) | %theme_right = $chr(41) | echo -tag [BRACKETS) * Are now: [%theme_left %theme_right) }
  475. ...$iif(%theme_left == $chr(91),$style(1)) 2 $chr(91) $+ $me $+ $chr(93) { %theme_left = $chr(91) | %theme_right = $chr(93) | echo -tag [BRACKETS) * Are now: [%theme_left %theme_right) }
  476. ...$iif(%theme_left == $chr(123),$style(1)) 3 $chr(123) $+ $me $+ $chr(125) { %theme_left = $chr(123) | %theme_right = $chr(125) | echo -tag [BRACKETS) * Are now: [%theme_left %theme_right) }
  477. ...$iif(%theme_left == $chr(171),$style(1)) 4 $chr(171) $+ $me $+ $chr(187) { %theme_left = $chr(171) | %theme_right = $chr(187) | echo -tag [BRACKETS) * Are now: [%theme_left %theme_right) }
  478. ...$iif(%theme_left == <,$style(1)) 5 < $+ $me $+ > { %theme_left = < | %theme_right = > | echo -tag [BRACKETS) * Are now: [%theme_left %theme_right) }
  479. ...-
  480. ...$iif(%theme_left == $null,$style(1)) None { %theme_left = "" | %theme_right = "" | echo -tag [BRACKETS) * Are now: None }
  481. ..-
  482. ..Oper Color $chr(9) %theme_oper {
  483. showcolors oper
  484. }
  485. ..-
  486. ..Away Color $chr(9) %theme_away {
  487. showcolors away
  488. }
  489. ..-
  490. ..Styler $chr(9) %theme_stylestatus {
  491. %theme_stylestatus = $iif(%theme_stylestatus == On,Off,On)
  492. echo $color(info) -tag * Nick Styler is now: %theme_stylestatus
  493. }
  494. ..Style $chr(9) %theme_style { styles }
  495. ..-
  496. ..Show Mode Prefix $chr(9) %theme_prefix {
  497. %theme_prefix = $iif(%theme_prefix == On,Off,On)
  498. echo $color(info) -tag * Show Mode Prefix is now: %theme_prefix
  499. }
  500. .-
  501. .Text Manipulators
  502. ..Sentence Correction $chr(9) %theme_fix {
  503. %theme_fix = $iif(%theme_fix == On,Off,On)
  504. echo $color(info) -tag * Sentence Correction is now: %theme_fix
  505. }
  506. ..Censor Correction $chr(9) %theme_censor {
  507. %theme_censor = $iif(%theme_censor == On,Off,On)
  508. echo $color(info) -tag * Censor Correction is now: %theme_censor
  509. }
  510. ..Acronyms Correction $chr(9) %theme_acro {
  511. %theme_acro = $iif(%theme_acro == On,Off,On)
  512. echo $color(info) -tag * Acronyms are now: %theme_acro
  513. }
  514. ..All Caps Correction $chr(9) %theme_caps {
  515. %theme_caps = $iif(%theme_caps == On,Off,On)
  516. echo $color(info) -tag * All Caps Correction is now: %theme_caps
  517. }
  518. ..-
  519. ..All Manipulators On {
  520. %theme_fix = On
  521. %theme_censor = On
  522. %theme_acro = On
  523. %theme_caps = On
  524. echo $color(info) -tag * Text Manipulators are now: On
  525. }
  526. ..All Manipulators Off {
  527. %theme_fix = Off
  528. %theme_censor = Off
  529. %theme_acro = Off
  530. %theme_caps = Off
  531. echo $color(info) -tag * Text Manipulators are now: Off
  532. }
  533. .-
  534. .Dynamic Backgrounds
  535. ..Text Background Status $chr(9) %theme_bg {
  536. %theme_bg = $iif(%theme_bg == On,Off,On)
  537. echo $color(info) -tag * Text Background Status is now: %theme_bg
  538. bgclearall
  539. bgall
  540. }
  541. ..Background Text Color $chr(9) %theme_mycolor {
  542. showcolors text
  543. }
  544. ..-
  545. ..Image Background Status $chr(9) %theme_black {
  546. %theme_black = $iif(%theme_black == On,Off,On)
  547. echo $color(info) -tag * Image Background Status is now: %theme_black
  548. bgclearall
  549. bgall
  550. }
  551. ..Image $chr(9) $mid(%theme_image,1,20) $+ ... {
  552. %theme_image = $qt($sfile($scriptdirImages\*.jpg,Theme Background Image:,Got it!))
  553. if ($pic(%theme_image).width < 1000 || $pic(%theme_image).height < 1000) {
  554. echo $color(info) -tag * Theme Background Image must at least be 1000px (width and height)!
  555. return
  556. }
  557. echo $color(info) -tag * Theme Background Image is now: %theme_image
  558. bgall
  559. }
  560. .-
  561. .Restore Colors
  562. ..Theme { restorecolor }
  563. ..Default { restoredefault }
  564. .-
  565. .Settings
  566. ..Save Settings { saveoriginalsettings | echo $color(info) -tag * Saved All Settings. }
  567. ..Restore Settings { reloadoriginalsettings | echo $color(info) -tag * Restored All Settings. }
  568. ..-
  569. ..Global Timestamp $chr(9) %theme_global {
  570. %theme_global = $iif(%theme_global == On,Off,On)
  571. if (%theme_global == On) { .timestamp on }
  572. else { .timestamp off }
  573. echo $color(info) -tag * Global Timestamp is now: %theme_global
  574. }
  575. ..Timestamp Format $chr(9) %theme_format {
  576. %theme_format = $input(New Timestamp Format?,5)
  577. echo $color(info) -tag * Timestamp Format is now: %theme_format
  578. }
  579. ..-
  580. ..Keep Channels Open On Disconnect $chr(9) %theme_keep {
  581. %theme_keep = $iif(%theme_keep == On,Off,On)
  582. echo $color(info) -tag * Keep Channels Open On Disconnect is now: %theme_keep
  583. }
  584. ..-
  585. ..Caps Correction Percent $chr(9) $iif(%theme_percent,$v1,0) $+ % {
  586. %theme_percent = $remove($input(Max percent caps?,5),%)
  587. echo $color(info) -tag * Caps Percent is now: %theme_percent $+ %
  588. }
  589. ..-
  590. ..Acronyms List { doacronyms }
  591. ..-
  592. ..Services Nicknames List
  593. ... %theme_services
  594. ...-
  595. ...Add {
  596. var %a = $input(Add Services nicknames? $+ $crlf $+ %theme_services,5)
  597. if (%a) {
  598. var %s = 1, %b
  599. while ($gettok(%a,%s,32)) { %b = $v1 | if (!$istok(%theme_services,%b,32)) { %theme_services = $addtok(%theme_services,%b,32) } | inc %s }
  600. noop $input(Services Nickname list: $+ $crlf $+ %theme_services,4)
  601. }
  602. }
  603. ...Delete {
  604. var %a = $input(Delete Services nicknames? $+ $crlf $+ %theme_services,5)
  605. if (%a) {
  606. var %s = 1, %b
  607. while ($gettok(%a,%s,32)) { %b = $v1 | if ($istok(%theme_services,%b,32)) { %theme_services = $remtok(%theme_services,%b,1,32) } | inc %s }
  608. noop $input(Services Nickname list: $+ $crlf $+ %theme_services,4)
  609. }
  610. }
  611. ...-
  612. ...Clear {
  613. unset %theme_services
  614. noop $input(Services Nicknames list cleared!,4)
  615. }
  616. ..-
  617. ..Censor List
  618. ... %theme_swears
  619. ...-
  620. ...Add {
  621. var %a = $input(Add Swear words? $+ $crlf $+ %theme_swears,5)
  622. if (%a) {
  623. var %s = 1, %b
  624. while ($gettok(%a,%s,32)) { %b = $v1 | if (!$istok(%theme_swears,%b,32)) { %theme_swears = $addtok(%theme_swears,%b,32) } | inc %s }
  625. noop $input(Swears list: $+ $crlf $+ %theme_swears,4)
  626. }
  627. }
  628. ...Delete {
  629. var %a = $input(Delete Swear words? $+ $crlf $+ %theme_swears,5)
  630. if (%a) {
  631. var %s = 1, %b
  632. while ($gettok(%a,%s,32)) { %b = $v1 | if ($istok(%theme_swears,%b,32)) { %theme_swears = $remtok(%theme_swears,%b,1,32) } | inc %s }
  633. noop $input(Swears list: $+ $crlf $+ %theme_swears,4)
  634. }
  635. }
  636. ...-
  637. ...Clear {
  638. unset %theme_swears
  639. noop $input(Swears list cleared!,4)
  640. }
  641. .-
  642. .Check for Updates $chr(9) $iif(%theme_last,(last upgraded $remove($replace($duration($calc($ctime - %theme_last)),wks,w,wk,w,days,d,day,d,hrs,hr,mins,m,min,m,secs,s,sec,s),$chr(32)) ago)) { check }
  643. .-
  644. .Credits { echo $color(info) -tag * My Theme $sversion was created by entropy in 2018 }
  645. .-
  646. .Unload { .unload -rs $qt($script) }
  647. -
  648. }
  649.  
  650.  
  651. alias doacronyms {
  652. window -c @acronyms
  653. window -ldpfCw0ok0s +tn @acronyms -1 -1 400 690
  654.  
  655. var %a = 1, %b, %c, %d = 1
  656. while ($hget(acronyms,%a).item) {
  657. %b = $v1
  658. %c = $hget(acronyms,%b)
  659. aline -l @acronyms %b $chr(9) %c
  660. inc %d
  661. inc %a
  662. }
  663. }
  664. menu @acronyms {
  665. dclick {
  666. var %r = $gettok($sline(@acronyms,1),1,9)
  667. var %r2 = $gettok($sline(@acronyms,1),3-,9)
  668. var %t = $input(New value for: %r ,5)
  669. if (%t) {
  670. hadd -m acronyms %r %t
  671. doacronyms
  672. }
  673. }
  674. -
  675. Add {
  676. var %r = $input(New Acronym and definintion: (space delimited),5)
  677. var %s = $gettok(%r,1,32)
  678. if ($hget(acronyms,%s)) { noop $input(Acronym Exists!,4) }
  679. elseif ($gettok(%r,2-,32)) {
  680. hadd -m acronyms %r
  681. doacronyms
  682. }
  683. }
  684. -
  685. Remove Selected {
  686. var %a = 1, %b, %total
  687. while ($line(@acronyms,%a)) {
  688. var %all = $gettok($line(@acronyms,$sline(@acronyms,%a).ln,1),1,9)
  689. if (%all) { inc %total | hdel acronyms %all }
  690. inc %a
  691. }
  692. doacronyms
  693. }
  694. Remove All {
  695. var %a = $line(@acronyms,0), %b
  696. while ($line(@acronyms,%a)) {
  697. dline @acronyms %a
  698. inc %a
  699. }
  700. hfree acronyms
  701. hmake acronyms 100
  702. doacronyms
  703. }
  704. -
  705. Select All {
  706. var %a = 1, %b
  707. while (%a <= $line(@acronyms,0)) {
  708. sline -a @acronyms %a
  709. inc %a
  710. }
  711. }
  712. -
  713. Save Database {
  714. hsave -o acronyms $qt($scriptdiracronyms.dat)
  715. noop $input(Database has been saved.,4)
  716. }
  717. -
  718. Restore Last Updated Database { noop $input(Last updated database has been restored.,4) | restorelastacronyms | doacronyms }
  719. -
  720. Restore Default Database { noop $input(Default database has been restored.,4) | restoreacronyms | doacronyms }
  721. -
  722. Close { window -c @acronyms }
  723. }
  724.  
  725. alias -l getcolor {
  726. %get_bg = $color(background)
  727. %get_editbox = $color(editbox)
  728. %get_treebar = $color(treebar)
  729. %get_treebartext = $color(treebar text)
  730. %get_editboxtext = $color(editbox text)
  731. %get_listboxtext = $color(listbox text)
  732. %get_action = $color(action)
  733. %get_ctcp = $color(ctcp)
  734. %get_highlight = $color(highlight)
  735. %get_info = $color(info)
  736. %get_info2 = $color(info2)
  737. %get_inactive = $color(inactive)
  738. %get_invite = $color(invite)
  739. %get_join = $color(join)
  740. %get_kick = $color(kick)
  741. %get_list = $color(list)
  742. %get_mode = $color(mode)
  743. %get_nick = $color(nick)
  744. %get_normal = $color(normal)
  745. %get_notice = $color(notice)
  746. %get_notify = $color(notify)
  747. %get_other = $color(other)
  748. %get_own = $color(own)
  749. %get_part = $color(part)
  750. %get_quit = $color(quit)
  751. %get_topic = $color(topic)
  752. %get_wallops = $color(wallops)
  753. %get_whois = $color(whois)
  754. %get_titletext = $color(title text)
  755. %get_gray = $color(gray)
  756. }
  757.  
  758. alias -l restoreoriginal {
  759. color background %get_bg
  760. color editbox %get_editbox
  761. color list %get_list
  762. color treebar %get_treebar
  763. color treebar text %get_treebartext
  764. color editbox text %get_editboxtext
  765. color inactive %get_inactive
  766. color listbox text %get_listboxtext
  767. color action %get_action
  768. color ctcp %get_ctcp
  769. color highlight %get_highlight
  770. color info %get_info
  771. color info2 %get_info2
  772. color invite %get_invite
  773. color join %get_join
  774. color kick %get_kick
  775. color mode %get_mode
  776. color nick %get_nick
  777. color normal %get_normal
  778. color notice %get_notice
  779. color notify %get_notify
  780. color other %get_other
  781. color own %get_own
  782. color part %get_part
  783. color quit %get_quit
  784. color topic %get_topic
  785. color wallops %get_wallops
  786. color whois %get_whois
  787. color title text %get_titletext
  788. color gray %get_gray
  789. if (%theme_oldsize && %theme_oldfont) { font -z %theme_oldsize %theme_oldfont }
  790. }
  791.  
  792. alias -l saveoriginalsettings {
  793. var %y = hadd -m settings
  794. %y oldfont %theme_oldfont
  795. %y oldsize %theme_oldsize
  796. %y font %theme_font
  797. %y size %theme_size
  798. %y mycolor %theme_mycolor
  799. %y spaces %theme_spaces
  800. %y bg %theme_bg
  801. %y black %theme_black
  802. %y acro %theme_acro
  803. %y left %theme_left
  804. %y right %theme_right
  805. %y oper %theme_oper
  806. %y away %theme_away
  807. %y fix %theme_fix
  808. %y censor %theme_censor
  809. %y caps %theme_caps
  810. %y style %theme_style
  811. %y stylestatus %theme_stylestatus
  812. %y percent %theme_percent
  813. %y swears %theme_swears
  814. %y image %theme_image
  815. %y treebar %theme_treebar
  816. %y switchbar %theme_switchbar
  817. %y toolbar %theme_toolbar
  818. %y keep %theme_keep
  819. %y prefix %theme_prefix
  820. %y oldformat %theme_oldformat
  821. %y format %theme_format
  822. %y global %theme_global
  823. %y oldtreebar %theme_oldtreebar
  824. %y oldtoolbar %theme_oldtoolbar
  825. %y oldswitchbar %theme_oldswitchbar
  826. hsave -o settings $qt($scriptdirsettings.dat)
  827. }
  828.  
  829. alias -l reloadoriginalsettings {
  830. %theme_oldfont = $hget(settings,oldfont)
  831. %theme_oldsize = $hget(settings,oldsize)
  832. %theme_font = $hget(settings,font)
  833. %theme_size = $hget(settings,size)
  834. %theme_mycolor = $hget(settings,mycolor)
  835. %theme_spaces = $hget(settings,spaces)
  836. %theme_bg = $hget(settings,bg)
  837. %theme_black = $hget(settings,black)
  838. %theme_acro = $hget(settings,acro)
  839. %theme_left = $hget(settings,left)
  840. %theme_right = $hget(settings,right)
  841. %theme_oper = $hget(settings,oper)
  842. %theme_away = $hget(settings,away)
  843. %theme_fix = $hget(settings,fix)
  844. %theme_censor = $hget(settings,censor)
  845. %theme_caps = $hget(settings,caps)
  846. %theme_style = $hget(settings,style)
  847. %theme_stylestatus = $hget(settings,stylestatus)
  848. %theme_percent = $hget(settings,percent)
  849. %theme_swears = $hget(settings,swears)
  850. %theme_image = $hget(settings,image)
  851. %theme_treebar = $hget(settings,treebar)
  852. %theme_switchbar = $hget(settings,switchbar)
  853. %theme_toolbar = $hget(settings,toolbar)
  854. %theme_keep = $hget(settings,keep)
  855. %theme_prefix = $hget(settings,prefix)
  856. %theme_oldformat = $hget(settings,oldformat)
  857. %theme_format = $hget(settings,format)
  858. %theme_global = $hget(settings,global)
  859. %theme_oldtreebar = $hget(settings,oldtreebar)
  860. %theme_oldtoolbar = $hget(settings,oldtoolbar)
  861. %theme_oldswitchbar = $hget(settings,oldswitchbar)
  862. }
  863.  
  864. alias -l b { return $+($chr(2),$1-,$chr(2)) }
  865.  
  866. alias -l restoredefault {
  867. var %i = $cnick(0)
  868. while (%i) { .cnick -r $iif($cnick(%i) != $null,$v1,*) | dec %i }
  869.  
  870. color background 0
  871. color editbox 0
  872. color list 0
  873. color treebar 0
  874. color treebar text 1
  875. color editbox text 1
  876. color inactive 0
  877. color listbox text 1
  878. color action 6
  879. color ctcp 4
  880. color highlight 5
  881. color info 12
  882. color info2 3
  883. color invite 3
  884. color join 3
  885. color kick 3
  886. color mode 3
  887. color nick 3
  888. color normal 1
  889. color notice 4
  890. color notify 7
  891. color other 6
  892. color own 1
  893. color part 3
  894. color quit 12
  895. color topic 3
  896. color wallops 5
  897. color whois 1
  898. color title text 6
  899. color gray 14
  900.  
  901.  
  902. bgclearall
  903. }
  904.  
  905. alias -l restoreacronyms {
  906. if ($hget(acronyms)) { hfree acronyms }
  907. hmake acronyms 100
  908. if ($exists($qt($scriptdiracronyms.dat))) { .remove $qt($scriptdiracronyms.dat) }
  909.  
  910. var %t = hadd -m acronyms
  911. %t tyt take your time
  912. %t afk away from keyboard
  913. %t bbl be back later
  914. %t ffs for fucks sake
  915. %t cba can't be assed
  916. %t ic i see
  917. %t prolly probably
  918. %t yvw you're very welcome
  919. %t ltns long time no see
  920. %t fu fuck you
  921. %t l8r later
  922. %t n1 nice one
  923. %t ppl people
  924. %t bbs be back soon
  925. %t ttyl talk to you later
  926. %t ikr i know right
  927. %t atm at the moment
  928. %t omg oh my god
  929. %t wtf what the fuck
  930. %t idk i don't know
  931. %t wb welcome back
  932. %t sup what's up
  933. %t bbiab be back in a bit
  934. %t ty thank you
  935. %t brb be right back
  936. %t bbl be back later
  937. %t afk away from keyboard
  938. %t tyvm thank you very much
  939. %t btw by the way
  940. %t gg good game
  941. %t nvm nevermind
  942. %t np no problem
  943. %t ofc of fucking course
  944. %t nm not much
  945. %t ftw for the win
  946. %t imho in my humble opinion
  947. %t imo in my opinion
  948. %t yw you're welcome
  949. %t wyd what are you doing
  950. %t smh shake my head
  951. %t afaik as far as i know
  952. %t af as fuck
  953. %t nini night night
  954. %t tc take care
  955. %t gn good night
  956. %t fml fuck my life
  957. %t hb hurry back
  958. %t <3 $chr(10084)
  959. %t mirc mIRC
  960. %t w8 wait
  961. %t wanna want to
  962. %t gl good luck
  963. %t ru are you
  964. %t ur you are
  965. %t = bbiaf be back in a few
  966. %t = g2g got to go
  967. %t = stfu shut the fuck up
  968. %t = pos point of sale
  969. hsave -o acronyms $qt($scriptdiracronyms.dat)
  970. }
  971. alias -l restorelastacronyms {
  972. if (!$exists($qt($scriptdiracronyms.dat))) { return }
  973. if ($hget(acronyms)) { hfree acronyms }
  974. hmake acronyms 100
  975. hload acronyms $qt($scriptdiracronyms.dat)
  976. hsave -o acronyms $qt($scriptdiracronyms.dat)
  977. }
  978.  
  979. alias -l restorecolor {
  980. var %i = $cnick(0)
  981. while (%i) { .cnick -r $iif($cnick(%i) != $null,$v1,*) | dec %i }
  982.  
  983. .cnick $!me 7
  984. .cnick -l60 * 5 ~
  985. .cnick * 4 ~
  986. .cnick -l60 * 42 &
  987. .cnick * 8 &
  988. .cnick -l60 * 3 @
  989. .cnick * 9 @
  990. .cnick -l60 * 6 %
  991. .cnick * 13 %
  992. .cnick -l60 * 10 +
  993. .cnick * 11 +
  994. .cnick -l60 * 93
  995. .cnick * 95
  996.  
  997. color background 1
  998. color editbox 1
  999. color list 1
  1000. color treebar 1
  1001. color treebar text 0
  1002. color editbox text 0
  1003. color inactive 1
  1004. color listbox text 0
  1005. color action 13
  1006. color ctcp 4
  1007. color highlight 7
  1008. color info 11
  1009. color info2 3
  1010. color invite 11
  1011. color join 9
  1012. color kick 9
  1013. color mode 9
  1014. color nick 9
  1015. color normal 0
  1016. color notice 4
  1017. color notify 7
  1018. color other 6
  1019. color own 0
  1020. color part 3
  1021. color quit 3
  1022. color topic 9
  1023. color wallops 5
  1024. color whois 7
  1025. color title text 6
  1026. color gray 14
  1027. if (%theme_bg == On || %theme_black == On) { bgall }
  1028. }
  1029.  
  1030.  
  1031.  
  1032. #theme on
  1033.  
  1034. alias -l cleanup {
  1035. var %a = 1, %b
  1036. while ($findfile($scriptdirImages,*.bmp,%a)) {
  1037. %b = $v1
  1038. if ($nopath(%b) != default.bmp) { .remove $qt($v1) }
  1039. inc %a
  1040. }
  1041. restoreoriginal
  1042. unset %get_*
  1043. unset %theme_*
  1044. if ($exists($qt($scriptdiracronyms.dat))) { .remove $qt($scriptdiracronyms.dat) }
  1045.  
  1046. var %i = $cnick(0)
  1047. while (%i) { .cnick -r $iif($cnick(%i) != $null,$v1,*) | dec %i }
  1048.  
  1049. var %a = 1, %b, %y, %s
  1050. while ($scon(%a)) {
  1051. .scid $v1
  1052. var %x = 1, %y, %s
  1053. while ($chan(%x)) {
  1054. %y = $v1
  1055. %s = 1
  1056. while ($nick(%y,%s)) {
  1057. .cline -r %y %s
  1058. inc %s
  1059. }
  1060. inc %x
  1061. }
  1062. inc %a
  1063. }
  1064. .scid -r
  1065.  
  1066. if ($scon(0) == 1 && !$network) { background -x "Status Window" }
  1067. .timerwho#* off
  1068. }
  1069.  
  1070. alias -l bgclearall {
  1071. var %a = 1
  1072. while ($scon(%a)) {
  1073. .scid $v1
  1074. var %b = 1, %c
  1075. while ($window(*,%b)) {
  1076. %c = $v1
  1077. if (!$istok(chanlist notify picture listbox custom,$window(%c).type,32)) {
  1078. background -x $qt(%c)
  1079. }
  1080. inc %b
  1081. }
  1082. inc %a
  1083. }
  1084. .scid -r
  1085.  
  1086. var %a = 1, %b
  1087. while ($findfile($qt($scriptdirImages),*.bmp,%a)) {
  1088. %b = $v1
  1089. if ($nopath(%b) != default.bmp) { .remove $qt(%b) }
  1090. inc %a
  1091. }
  1092. }
  1093.  
  1094. on *:input:*:{
  1095. if ($active == Status Window && /* !iswm $1-) { echo $color(info) -tsg * You can't chat in this window! | haltdef | return }
  1096. elseif ($left($active,1) == $chr(35) && !$server) { echo $color(info) -tag * You aren't connected to any server! | haltdef | return }
  1097.  
  1098. var -n %xx = $1-
  1099.  
  1100.  
  1101. ; Rest
  1102.  
  1103. if ($server) {
  1104. if ($inpaste) {
  1105. %ctrl = No
  1106. msg $target $1-
  1107. haltdef
  1108. }
  1109. elseif ($ctrlenter) {
  1110. %ctrl = Yes
  1111. msg $target $1-
  1112. haltdef
  1113. }
  1114. elseif (/* !iswm $1-) {
  1115. %ctrl = No
  1116. msg $target %xx
  1117. haltdef
  1118. }
  1119. }
  1120. }
  1121.  
  1122. alias play {
  1123. if (!$server) { echo $color(info) -tsg * You can't /play offline! }
  1124. elseif ($1 == $me) { echo $color(info) -tsg * You can't /play to yourself! }
  1125. elseif (-a !isin $1) {
  1126. if (!$query($1) && $1 !ischan) { if (. !isin $1) { query $1 } | play -a msg $1- | haltdef }
  1127. else {
  1128. play -a msg $1-
  1129. haltdef
  1130. }
  1131. }
  1132. else { !play $1- | haltdef }
  1133. }
  1134.  
  1135.  
  1136. alias -l acronyms {
  1137. if (!$hget(acronyms)) { hmake acronyms 100 }
  1138. var -n %a = 1
  1139. var -n %b = $1-
  1140. var -n %c, %new, %rest, %d
  1141. while ($gettok(%b,%a,32) != $null) {
  1142. %c = $ifmatch
  1143. %new = $remove(%c,!,.,$chr(44),?)
  1144. %rest = $remove(%c,%new)
  1145. if ($hget(acronyms,%new)) {
  1146. %d = $ifmatch
  1147. var %lo = $+(!.? $+ $chr(44))
  1148. if ($left(%c,1) !isin %lo) {
  1149. %b = $replace(%b,%c,$+(%d,%rest))
  1150. }
  1151. }
  1152. inc %a
  1153. }
  1154. return $iif(%theme_acro == On,%b,$1-)
  1155. }
  1156.  
  1157. alias -l pa { return $mid($1,1,$2) $+ $chr(31) $+ $mid($1,$calc($2 + 1),1) $+ $chr(31) $+ $mid($1,$+(-,$2)) }
  1158.  
  1159. alias msg {
  1160. if (!$server) { echo $color(info) -tag * [ERROR] You can't /msg offline! | unset %ctrl | return }
  1161. elseif ($2 == $null) { echo $color(join) -tag * /msg: No Parameter Specified! | unset %ctrl }
  1162. else {
  1163. var -n %txt = $2-
  1164.  
  1165. if (%ctrl == Yes) { goto done }
  1166.  
  1167. if ($left(%txt,1) !isin .!@) {
  1168. %txt = $censor(%txt)
  1169. %txt = $apos(%txt)
  1170. %txt = $fixit(%txt)
  1171. %txt = $acronyms(%txt)
  1172. %txt = $fixsentences(%txt)
  1173. %txt = $eye(%txt)
  1174. }
  1175.  
  1176. :done
  1177.  
  1178. if (!%theme_percent) { %theme_percent = 65 }
  1179. if ($caps(%txt) >= %theme_percent && $len(%txt) > 20 && %theme_caps == On) { %txt = $lower(%txt) }
  1180.  
  1181. if (c isincs $chan($1).mode) { %txt = $strip(%txt) }
  1182.  
  1183. var %mode = $left($remove($nick($1,$me).pnick,$me),1)
  1184.  
  1185.  
  1186. var %color = $line($1,$fline($1,$me,1,1),1).color
  1187. var %t = $strip($+($chr(40),$chr(3),%color,%mode,$me,$chr(3),$chr(41)))
  1188. var %p = $len($timestamp)
  1189.  
  1190. ; Styler (new as of v4.0)
  1191. if (%theme_stylestatus == On && $left(%txt,1) !isin .!@) {
  1192. var %a = 1, %b, %snick, %nick, %modex, %fullnick, %c = $iif(%theme_style == $null,12,%theme_style), %rest
  1193. while ($gettok(%txt,%a,32) != $null) {
  1194. %b = $strip($v1)
  1195. %nick = $remove(%b,~,&,@,%,+,!,?,$chr(44),.,:)
  1196.  
  1197. if ($chr(35) isin $1) { %nick = $line($1,$fline($1,%nick,1,1).ln,1) }
  1198. if ($query($1)) { %nick = $v1 }
  1199.  
  1200.  
  1201. %rest = $remove(%b,%nick)
  1202. %nick = $remove(%nick,%rest)
  1203. if (%nick ison $1 || $query(%nick)) {
  1204.  
  1205. if (%theme_prefix == On) { %modex = $left($remove($nick($1,%nick).pnick,%nick),1) }
  1206. else { %modex = "" }
  1207.  
  1208. %fullnick = $+(%modex,%nick,%rest)
  1209.  
  1210. if (%ctrl == No) { %txt = $replace(%txt,$+(%nick,%rest),$styler(%c,$+(%modex,%nick)) $+ %rest) }
  1211. else { %txt = $2- }
  1212.  
  1213. }
  1214. inc %a
  1215. }
  1216. }
  1217.  
  1218. if (%theme_left == $null && %theme_right == $null) { var %q = * [MESG] $iif(%theme_spaces == yes,$str($chr(160),$calc(21 - $len(%t)))) $+(%theme_left,$chr(3),%color,%mode,$me,$chr(3),%theme_right) %txt }
  1219. else { var %q = * [MESG] $iif(%theme_spaces == yes,$str($chr(160),$calc(19 - $len(%t)))) $+(%theme_left,$chr(3),%color,%mode,$me,$chr(3),%theme_right) %txt }
  1220.  
  1221. if ($window($1).stamp == $false) { var %s = 30 }
  1222. else { var %s = $len($timestamp) + 31 }
  1223. if ($show) {
  1224. if ($1 ischan || $query($1)) { echo $color(own) $iif(%theme_spaces == yes,$+(-ti,%s),-t) $1 %q }
  1225. elseif (!$query($1)) { echo $color(own) -tag -> $+(*,$chr(3),$color(treebar text),$1,$chr(3),*) $2- }
  1226. }
  1227.  
  1228. unset %ctrl
  1229.  
  1230. if ($1 == $me) { echo $color(info) -tag * [ERROR] You cannot message yourself! }
  1231. elseif ($left($1,1) != $chr(35) && $istok(%theme_services,$1,32)) { !.msg $1 $remove(%txt,.,?,,!,$chr(44),:) }
  1232. else { !.msg $1 %txt }
  1233.  
  1234. haltdef
  1235. }
  1236. }
  1237.  
  1238. alias amsg {
  1239. if ($chan(1) && $1) {
  1240. var %a = 1, %b
  1241. while ($chan(%a)) {
  1242. %b = $v1
  1243. msg %b $1-
  1244. inc %a
  1245. }
  1246. haltdef
  1247. }
  1248. }
  1249. alias ame {
  1250. if ($chan(1) && $1) {
  1251. var %a = 1, %b
  1252. while ($chan(%a)) {
  1253. %b = $v1
  1254. describe %b $1-
  1255. inc %a
  1256. }
  1257. haltdef
  1258. }
  1259. }
  1260.  
  1261.  
  1262. alias uwho {
  1263. echo $color(join) -tag * Looking up $1 user info...
  1264. .!uwho $1-
  1265. haltdef
  1266. }
  1267.  
  1268. alias -l hl {
  1269. var %a = 1, %b, %c = $1-
  1270. while ($gettok(%c,%a,32)) {
  1271. %b = $v1
  1272. if ($len(%b) == 3) { %c = $replace(%c,%b, $+($mid(%b,1,1) $+ $chr(31) $+ $mid(%b,2,1) $+ $chr(31) $+ $mid(%b,3,1))) }
  1273. elseif ($len(%b) == 5) { %c = $replace(%c,%b, $+($mid(%b,1,2) $+ $chr(31) $+ $mid(%b,3,1) $+ $chr(31) $+ $mid(%b,4,2))) }
  1274. elseif ($len(%b) == 7) { %c = $replace(%c,%b, $+($mid(%b,1,3) $+ $chr(31) $+ $mid(%b,4,1) $+ $chr(31) $+ $mid(%b,5,3))) }
  1275. elseif ($len(%b) == 9) { %c = $replace(%c,%b, $+($mid(%b,1,4) $+ $chr(31) $+ $mid(%b,5,1) $+ $chr(31) $+ $mid(%b,6,4))) }
  1276. elseif ($len(%b) == 11) { %c = $replace(%c,%b, $+($mid(%b,1,5) $+ $chr(31) $+ $mid(%b,6,1) $+ $chr(31) $+ $mid(%b,7,5))) }
  1277. inc %a
  1278. }
  1279. return %c
  1280. }
  1281.  
  1282. on ^*:text:*:#:{
  1283.  
  1284. var -n %text = $1-
  1285.  
  1286. var %mode = $left($remove($nick(#,$nick).pnick,$nick),1)
  1287. var %color = $line(#,$fline(#,$nick,1,1),1).color
  1288. var %t = $strip($+($chr(40),$chr(3),%color,%mode,$nick,$chr(3),$chr(41)))
  1289.  
  1290. if (%theme_left == $null && %theme_right == $null) { var %q = * [MESG] $iif(%theme_spaces == yes,$str($chr(160),$calc(21 - $len(%t)))) $+(%theme_left,$chr(3),%color,%mode,$nick,$chr(3),%theme_right) %text }
  1291. else { var %q = * [MESG] $iif(%theme_spaces == yes,$str($chr(160),$calc(19 - $len(%t)))) $+(%theme_left,$chr(3),%color,%mode,$nick,$chr(3),%theme_right) %text }
  1292.  
  1293. if ($window(#).stamp == $false) { var %s = 30 }
  1294. else { var %s = $len($timestamp) + 31 }
  1295.  
  1296.  
  1297. var %a = $highlight($me).color
  1298. if (%a && $istok($strip(%text),$me,32)) {
  1299. echo %a $iif(%theme_spaces == yes,$+(-tli,%s),-tl) $target %q
  1300. }
  1301. else {
  1302. echo $color(normal) $iif(%theme_spaces == yes,$+(-tli,%s),-tl) $target %q
  1303. }
  1304. haltdef
  1305. }
  1306.  
  1307. on ^*:text:*:?:{
  1308. var -n %text = $1-
  1309.  
  1310. var %t = $strip($+($chr(40),$chr(3),%color,%mode,$nick,$chr(3),$chr(41)))
  1311. if (%theme_left == $null && %theme_right == $null) { var %q = * [MESG] $iif(%theme_spaces == yes,$str($chr(160),$calc(21 - $len(%t)))) $+(%theme_left,$chr(3),%color,%mode,$nick,$chr(3),%theme_right) %text }
  1312. else { var %q = * [MESG] $iif(%theme_spaces == yes,$str($chr(160),$calc(19 - $len(%t)))) $+(%theme_left,$chr(3),%color,%mode,$nick,$chr(3),%theme_right) %text }
  1313.  
  1314. var %s = $len($timestamp) + 31
  1315.  
  1316. var %a = $highlight($me).color
  1317. if (%a && $istok($remove($strip($1-),~,&,@,%,+,$chr(44),.,!,?),$me,32)) { window -g2 $nick | flash | echo %a $iif(%theme_spaces == yes,$+(-ti,%s),-t) $nick %q }
  1318. else { window -g2 $nick | flash | echo $color(normal) $iif(%theme_spaces == yes,$+(-ti,%s),-t) $nick %q }
  1319.  
  1320. haltdef
  1321. }
  1322.  
  1323.  
  1324.  
  1325. raw 352:*:{ hadd -m $+($network,.,$2) $6 | halt }
  1326.  
  1327. alias -l updatewho { .timer $+ $1 -o 1 1 whoaway $1 }
  1328.  
  1329.  
  1330. alias -l addchans {
  1331. var %a = 1, %b
  1332. while ($nick($2,%a)) {
  1333. %b = $v1
  1334. hadd -m $+($1,.,$2) %b $ctime
  1335. inc %a
  1336. }
  1337. }
  1338.  
  1339. on ^*:join:#:{
  1340.  
  1341. if ($nick == $me) {
  1342. bg #
  1343. var %t = [JOIN]
  1344. var %q = * [!] $iif(%theme_spaces == yes,$str($chr(160),$calc(25 - $len(%t)))) Now talking in # $+ ...
  1345. var %s = $len($timestamp) + 31
  1346. echo $color(join) $iif(%theme_spaces == yes,$+(-ti,%s),-t) $target %q
  1347.  
  1348. if (!$hget($+($network,.,#))) { hmake $+($network,.,#) 100 }
  1349.  
  1350. hadd -m $+($network,.,#) $me $ctime
  1351.  
  1352. whoaway #
  1353. .timer $+ who $+ # -o 0 3600 whoaway #
  1354. .timer 1 1 addchans $network #
  1355.  
  1356. haltdef
  1357. }
  1358. else {
  1359.  
  1360. hadd -m $+($network,.,#) $nick $ctime
  1361.  
  1362. var %t = $strip($nick)
  1363. var %q = * [JOIN] $iif(%theme_spaces == yes,$str($chr(160),$calc(19 - $len(%t)))) $nick $+($chr(40),$gettok($address($nick,5),2,33),$chr(41)) has joined #
  1364. var %s = $len($timestamp) + 31
  1365. echo $color(join) $iif(%theme_spaces == yes,$+(-ti,%s),-t) # %q
  1366.  
  1367. haltdef
  1368. }
  1369. }
  1370.  
  1371. alias -l format {
  1372. return $remove($replace($duration($calc($ctime - $1)),wks,w,wk,w,days,d,day,d,hrs,h,hr,h,mins,m,min,m,secs,s,sec,s),$chr(32))
  1373. }
  1374.  
  1375. on ^*:part:#:{
  1376. if ($nick == $me) {
  1377. var %t = $strip($me)
  1378. var %l = $len(%t)
  1379. var %q = * [PART] $iif(%theme_spaces == yes,$str($chr(160),$calc(19 - %l))) You have left # $+ ...
  1380. if ($hget($+($network,.,#))) { hfree $+($network,.,#) }
  1381. .timer $+ who $+ # off
  1382. }
  1383. else {
  1384.  
  1385. if ($hget($+($network,.,#),$nick)) {
  1386. var %t = $v1
  1387. var %dur = $remove($replace($duration($calc($ctime - %t)),wks,w,wk,w,days,d,day,d,hrs,h,hr,h,mins,m,min,m,secs,s,sec,s),$chr(32))
  1388. hdel $+($network,.,#) $nick
  1389. }
  1390.  
  1391. var %t = $strip($nick)
  1392. var %l = $len(%t)
  1393. var %q = * [PART] $iif(%theme_spaces == yes,$str($chr(160),$calc(19 - %l))) $nick $+($chr(40),$gettok($address($nick,5),2,33),$chr(41)) has left # $iif($1,$+($chr(40),$1-,$chr(41))) $iif(%dur,$+($chr(40),On channel: %dur,$chr(41)))
  1394. }
  1395. var %s = $len($timestamp) + 31
  1396. echo $color(part) $iif(%theme_spaces == yes,$+(-ti,%s),-t) $target %q
  1397.  
  1398. haltdef
  1399. }
  1400.  
  1401. ctcp ^*:version:*:{
  1402. .ctcpreply $nick VERSION My Theme $sversion - by entropy 2018
  1403. haltdef
  1404. }
  1405.  
  1406. on ^*:action:*:#:{
  1407. var %a = $target, %mode
  1408. %mode = $left($remove($nick(#,$nick).pnick,$nick),1)
  1409. var %t = $strip($+(%mode,$nick))
  1410. var %q = * [ACTN] $iif(%theme_spaces == yes,$str($chr(160),$calc(19 - $len(%t)))) $+(%mode,$nick) $1-
  1411. var %s = $len($timestamp) + 31
  1412. ;32
  1413.  
  1414. var %x = $highlight($me).color
  1415. if (%x && $istok($remove($strip($1-),~,&,@,%,+,$chr(44),.,!,?),$me,32)) { window -g2 $target | echo %x $iif(%theme_spaces == yes,$+(-ti,%s),-t) $target %q }
  1416. else { window -g2 $target | echo $color(action) $iif(%theme_spaces == yes,$+(-ti,%s),-t) $target %q }
  1417.  
  1418. haltdef
  1419. }
  1420.  
  1421.  
  1422. ctcp ^*:sound:#:{
  1423. var %a = $target, %mode
  1424. %mode = $left($remove($nick(#,$nick).pnick,$nick),1)
  1425. var %t = $strip($+(%mode,$nick))
  1426. var %q = * [ACTN] $iif(%theme_spaces == yes,$str($chr(160),$calc(19 - $len(%t)))) $+(%mode,$nick) $1-
  1427. var %s = $len($timestamp) + 31
  1428. ;32
  1429.  
  1430. var %x = $highlight($me).color
  1431. if (%x && $istok($remove($strip($1-),~,&,@,%,+,$chr(44),.,!,?),$me,32)) { window -g2 $target | echo %x $iif(%theme_spaces == yes,$+(-ti,%s),-t) $target %q }
  1432. else { window -g2 $target | echo $color(action) $iif(%theme_spaces == yes,$+(-ti,%s),-t) $target %q }
  1433.  
  1434. haltdef
  1435. }
  1436.  
  1437. on ^*:action:*:?:{
  1438. var %a = $target, %mode
  1439. var %t = $strip($nick)
  1440. var %q = * [ACTN] $iif(%theme_spaces == yes,$str($chr(160),$calc(19 - $len(%t)))) $nick $1-
  1441. var %s = $len($timestamp) + 31
  1442.  
  1443. var %x = $highlight($me).color
  1444. if (%x && $istok($remove($strip($1-),~,&,@,%,+,$chr(44),.,!,?),$me,32)) { window -g2 $nick | flash | echo %x $iif(%theme_spaces == yes,$+(-ti,%s),-t) $nick %q }
  1445. else { window -g2 $nick | flash | echo $color(action) $iif(%theme_spaces == yes,$+(-ti,%s),-t) $nick %q }
  1446.  
  1447. haltdef
  1448. }
  1449.  
  1450. alias action { describe $1 $2- | halt }
  1451. alias me { describe $active $1- | halt }
  1452. alias say { msg $active $1- | halt }
  1453.  
  1454. alias describe {
  1455. if ($2) {
  1456. var %mode = $left($remove($nick($1,$me).pnick,$me),1)
  1457. var %t = $strip($+(%mode,$me))
  1458. var %q = * [ACTI] $iif(%theme_spaces == yes,$str($chr(160),$calc(19 - $len(%t)))) $+(%mode,$me) $2-
  1459. var %s = $len($timestamp) + 31
  1460. ;if ($query($1)) { !query $1 }
  1461.  
  1462. if (#* !iswm $1 && !$query($1)) { !query $1 }
  1463.  
  1464. echo $color(action) $iif(%theme_spaces == yes,$+(-ti,%s),-t) $1 %q
  1465. !.describe $1 $2-
  1466.  
  1467. haltdef
  1468. }
  1469. }
  1470.  
  1471. on ^*:quit:{
  1472. var %a = 1, %b, %x, %dur
  1473. while ($comchan($nick,%a)) {
  1474. %b = $v1
  1475. unset %dur
  1476. if ($hget($+($network,.,%b),$nick)) {
  1477. %x = $v1
  1478. var %dur = $remove($replace($duration($calc($ctime - %x)),wks,w,wk,w,days,d,day,d,hrs,h,hr,h,mins,m,min,m,secs,s,sec,s),$chr(32))
  1479. }
  1480.  
  1481. var %mode = $left($remove($nick(%b,$nick).pnick,$nick),1)
  1482. var %g = $nick
  1483. var %q = * [QUIT] $iif(%theme_spaces == yes,$str($chr(160),$calc(19 - $len($+(%mode,%g))))) $+(%mode,%g) $+($chr(40),$gettok($address($nick,5),2,33),$chr(41)) has quit IRC $iif($1,$+($chr(40),$1-,$chr(41)))
  1484.  
  1485. var %s = $len($timestamp) + 31
  1486. echo $color(quit) $iif(%theme_spaces == yes,$+(-ti,%s),-t) %b %q $iif(%dur,$+($chr(40),On channel: %dur,$chr(41)))
  1487. hdel $+($network,.,%b) $nick
  1488.  
  1489. inc %a
  1490. }
  1491. haltdef
  1492. }
  1493. on ^*:nick:{
  1494. var %a = 1, %b, %x
  1495. while ($comchan($newnick,%a)) {
  1496.  
  1497. %b = $v1
  1498. if ($hget($+($network,.,%b),$nick)) {
  1499. var %g = $hget($+($network,.,%b),$nick)
  1500. hdel $+($network,.,%b) $nick
  1501. hadd $+($network,.,%b) $newnick %g
  1502. }
  1503.  
  1504.  
  1505. var %t = $strip($nick)
  1506. var %q = * [NICK] $iif(%theme_spaces == yes,$str($chr(160),$calc(19 - $len(%t)))) $nick $+($chr(40),$gettok($address($newnick,5),2,33),$chr(41)) is now known as $newnick
  1507. var %s = $len($timestamp) + 31
  1508. echo $color(nick) $iif(%theme_spaces == yes,$+(-ti,%s),-t) %b %q
  1509.  
  1510. inc %a
  1511. }
  1512. haltdef
  1513. }
  1514. on ^*:topic:#:{
  1515. var %t = $nick
  1516. var %q = * [TOPIC] $iif(%theme_spaces == yes,$str($chr(160),$calc(18 - $len(%t)))) $nick sets topic: $+($qt($1-))
  1517. var %s = $len($timestamp) + 31
  1518. echo $color(topic) $iif(%theme_spaces == yes,$+(-ti,%s),-t) # %q
  1519.  
  1520. haltdef
  1521. }
  1522.  
  1523. on ^*:kick:#:{
  1524. if ($knick == $me) {
  1525. hfree $+($network,.,#)
  1526. .timer $+ who $+ # off
  1527. }
  1528. else {
  1529. if ($hget($+($network,.,#),$knick)) {
  1530. var %t = $v1
  1531. var %dur = $remove($replace($duration($calc($ctime - %t)),wks,w,wk,w,days,d,day,d,hrs,h,hr,h,mins,m,min,m,secs,s,sec,s),$chr(32))
  1532. hdel $+($network,.,#) $knick
  1533. }
  1534. var %t = $strip($nick)
  1535. var %q = * [KICK] $iif(%theme_spaces == yes,$str($chr(160),$calc(19 - $len(%t)))) $nick has kicked $knick out of # $iif($1,$+($chr(40),$1-,$chr(41)))
  1536. var %s = $len($timestamp) + 31
  1537. echo $color(kick) $iif(%theme_spaces == yes,$+(-ti,%s),-t) # %q $iif(%dur,$+($chr(40),On channel: %dur,$chr(41)))
  1538.  
  1539. haltdef
  1540. }
  1541. }
  1542. on ^*:rawmode:#:{
  1543. var %t = $strip($nick)
  1544. var %q = * [MODE] $iif(%theme_spaces == yes,$str($chr(160),$calc(19 - $len(%t)))) $nick sets mode: $+($1-)
  1545. var %s = $len($timestamp) + 31
  1546. echo $color(mode) $iif(%theme_spaces == yes,$+(-ti,%s),-t) # %q
  1547.  
  1548. haltdef
  1549. }
  1550.  
  1551. on ^*:servermode:#:{
  1552. var %t = $strip($nick)
  1553. var %q = * [MODE] $iif(%theme_spaces == yes,$str($chr(160),$calc(19 - $len(%t)))) $nick sets mode: $+($1-)
  1554. var %s = $len($timestamp) + 31
  1555. echo $color(mode) $iif(%theme_spaces == yes,$+(-ti,%s),-t) # %q
  1556.  
  1557. haltdef
  1558. }
  1559.  
  1560. ;RAWS
  1561.  
  1562. raw 352:*:{ halt }
  1563. raw 315:*:{ halt }
  1564. raw 421:*:{ echo $color(info) -tag * Unknown command: " $+ $lower($2) $+ " | halt }
  1565. raw 520:*:{ halt }
  1566.  
  1567. ; MODE RAWS
  1568.  
  1569. raw 324:*:{
  1570. var %r = $eval($+(%,raw,$network,$2,324),2)
  1571. if (%r) {
  1572. var %t = [!)
  1573. var %q = * [!] $iif(%theme_spaces == yes,$str($chr(160),$calc(19 - $len(%t)))) Modes: $3-
  1574. var %s = $len($timestamp) + 31
  1575. echo $color(join) $iif(%theme_spaces == yes,$+(-ti,%s),-t) $2 %q
  1576. unset $+(%,raw,$network,$2,324)
  1577. }
  1578. halt
  1579. }
  1580.  
  1581. ; CREATED BY RAWS
  1582.  
  1583. raw 329:*:{
  1584. var %r = $eval($+(%,raw,$network,$2,329),2)
  1585. if (%r) {
  1586. var %t = [!)
  1587. var %q = * [!] $iif(%theme_spaces == yes,$str($chr(160),$calc(17 - $len(%t)))) Created: $asctime($3)
  1588. var %s = $len($timestamp) + 31
  1589. echo $color(join) $iif(%theme_spaces == yes,$+(-ti,%s),-t) $2 %q
  1590. unset $+(%,raw,$network,$2,329)
  1591. }
  1592. halt
  1593. }
  1594.  
  1595. ;TOPIC RAWS
  1596.  
  1597. raw 332:*:{
  1598. var %t = [!)
  1599. var %q = * [!] $iif(%theme_spaces == yes,$str($chr(160),$calc(19 - $len(%t)))) Topic: $qt($3-)
  1600. var %s = $len($timestamp) + 31
  1601. echo $color(join) $iif(%theme_spaces == yes,$+(-ti,%s),-t) $2 %q
  1602. halt
  1603. }
  1604. raw 333:*:{
  1605. var %t = [!)
  1606. var %q = * [!] $iif(%theme_spaces == yes,$str($chr(160),$calc(18 - $len(%t)))) Set by: $3 on $asctime($4)
  1607. var %s = $len($timestamp) + 31
  1608. echo $color(join) $iif(%theme_spaces == yes,$+(-ti,%s),-t) $2 %q
  1609. halt
  1610. }
  1611.  
  1612.  
  1613. alias query {
  1614. if ($server) {
  1615. if ($1 == $me) { echo $color(info) -tag * [ERROR] You cannot query yourself! }
  1616. elseif (-* iswm $1 && $2) { !query $1- | bg $2 | if ($3) { msg $2 $3- } }
  1617. elseif ($1) { !query $1 | bg $1 | if ($2) { msg $1 $2- } }
  1618. whois $1 $1
  1619. haltdef
  1620. }
  1621. else { echo $color(info) -tag * [ERROR] You are not connected to this IRC server! }
  1622. }
  1623.  
  1624. alias whois {
  1625. if ($server && $1) { !whois $1 $1 }
  1626. }
  1627.  
  1628. alias bg {
  1629. if (!$1) { return }
  1630. if (%theme_mycolor == $null) { %theme_mycolor = 00 }
  1631.  
  1632. var %chan = $mknickfn($1), %flags = $2
  1633.  
  1634. var %n = $iif($len($1) >= 22,$+($mid($1,1,22),...),$1)
  1635. window -pdh @logo
  1636.  
  1637. if ($exists(%theme_image) && %theme_black == On) {
  1638. var %w = $window($1).w
  1639. var %h = $window($1).h
  1640. drawpic -ms @logo 9 0 %theme_image
  1641. }
  1642.  
  1643. drawsave -b32q100 @logo $qt($+($scriptdirImages/default.bmp))
  1644.  
  1645. if (%theme_bg == On) {
  1646. drawtext -o @logo 01 $qt(%theme_font) 60 20 7 %n
  1647. drawtext -o @logo %theme_mycolor $qt(%theme_font) 60 20 5 %n
  1648. }
  1649. if (* isin $1) { window -c @logo | return }
  1650. drawsave -b32q100 @logo $qt($+($scriptdirImages/,$1,.bmp))
  1651. window -c @logo
  1652.  
  1653. if (%flags) {
  1654. if ($server) { background %flags $+ f $qt($+($scriptdirImages/,$1,.bmp)) }
  1655. else { background %flags $+ f $qt($+($scriptdirImages/default.bmp)) }
  1656. }
  1657. else {
  1658. if ($server) { background -f $1 $qt($+($scriptdirImages\,$1,.bmp)) }
  1659. else { background -f $1 $qt($+($scriptdirImages\default.bmp)) }
  1660. }
  1661. }
  1662. alias bgall {
  1663.  
  1664. var %a = 1, %b
  1665. while ($scon(%a)) {
  1666. .scid $v1
  1667.  
  1668. if (%theme_black == Off) { background -xs }
  1669. else { bg $network -s }
  1670.  
  1671. var %x = 1 | while ($chan(%x)) { var %r = $v1 | if (%theme_black == Off) { background -x %r } | else { bg %r } | inc %x }
  1672. var %x = 1 | while ($query(%x)) { var %r = $v1 | if (%theme_black == Off) { background -x %r } | else { bg %r } | inc %x }
  1673. inc %a
  1674. }
  1675. .scid -r
  1676. }
  1677. on *:disconnect:{
  1678. var %x = 1, %y
  1679. while ($chan(%x)) {
  1680. %y = $v1
  1681. if ($hget($+($network,.,%y))) {
  1682. hfree $+($network,.,%y)
  1683. }
  1684. .timer $+ who $+ %y off
  1685. inc %x
  1686. }
  1687.  
  1688. var %a = 1, %b
  1689. while ($chan(%a)) {
  1690. %b = $v1
  1691. if (%theme_bg == On || %theme_black == On) { background -f %b $qt($scriptdirImages\default.bmp) }
  1692. else { background -x %b }
  1693. inc %a
  1694. }
  1695.  
  1696.  
  1697. var %a = 1, %b
  1698. while ($query(%a)) {
  1699. %b = $v1
  1700. if (%theme_bg == On || %theme_black == On) { background -f %b $qt($scriptdirImages\default.bmp) }
  1701. else { background -x %b }
  1702. inc %a
  1703. }
  1704.  
  1705. if (%theme_keep == Off) { .partall }
  1706. if ($exists($qt($scriptdirImages\default.bmp))) { background -sx | background -sf $qt($scriptdirImages\default.bmp) }
  1707. }
  1708.  
  1709. on *:connect:{
  1710. bg $network -s
  1711. bgall
  1712. }
  1713.  
  1714. on *:open:?:*:{
  1715. bg $nick -f
  1716. }
  1717.  
  1718. on *:exit:{
  1719. var %a = 1, %b
  1720. while ($findfile($scriptdirImages/,*.bmp,%a)) {
  1721. %b = $v1
  1722. if ($nopath(%b) != default.bmp) { .remove $qt(%b) }
  1723. inc %a
  1724. }
  1725. hsave -o acronyms $qt($scriptdiracronyms.dat)
  1726. hsave -o settings $qt($scriptdirsettings.dat)
  1727.  
  1728. remini $mircini chanhist
  1729. remini $mircini backgrounds
  1730. flushini $mircini
  1731. }
  1732.  
  1733. ; Notice Stuff...
  1734.  
  1735. on ^*:snotice:*:{
  1736. echo $color(notice) -tgs * [SNOTICE] $+(-,$nick,-) $1-
  1737. beep
  1738. haltdef
  1739. }
  1740.  
  1741. on ^*:notice:*:#:{
  1742. donetwork * [NOTICE] $+(-,$nick,/,#,-) $1-
  1743. beep
  1744. haltdef
  1745. }
  1746.  
  1747. on ^*:notice:*:?:{
  1748. donetwork * [NOTICE] $+(-,$nick,-) $1-
  1749. beep
  1750. haltdef
  1751. }
  1752. alias -l donetwork { echo $color(notice) $iif($activecid == $cid,-a,-s) $+ tg $1- }
  1753. alias -l safe return $!decode( $encode($1-, m) ,m)
  1754.  
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762. alias -l styles {
  1763. if (!$window(@styles)) { window -ldpfCw0ok0 +tn @styles -1 -1 400 313 }
  1764. var %a = 1
  1765. while (%a <= 13) {
  1766. aline -l @styles %a $+ ) - $styler(%a,$+($iif(%theme_prefix == On,@),$me))
  1767. inc %a
  1768. }
  1769. }
  1770. menu @styles {
  1771. dclick { %theme_style = $remove($gettok($sline(@styles,1),1,32),$chr(41)) | noop $input(You have updated your NC Style to: $qt(%theme_style) $+ ...,4) }
  1772. -
  1773. Update { window -c @styles | styles }
  1774. -
  1775. Close { window -c @styles }
  1776. -
  1777. }
  1778.  
  1779. alias -l styler {
  1780. var %rcolor = 03 04 06 07 08 09 10 11 13 14 15
  1781. var %a = 1, %b
  1782. while (%a <= 96) {
  1783. %b = $v1
  1784. %rcolor = $addtok(%rcolor,%a,32)
  1785. inc %a
  1786. }
  1787. %rcolor = $remove(%rcolor,88,89,90,91,92,93,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39)
  1788.  
  1789. if ($1 == rand) { tokenize 32 $rand(1,13) $2- }
  1790.  
  1791. if ($1 == 1) {
  1792. if ($len($2) == 1 || $len($2) == 2) { return $+(,$2,) }
  1793. return $+(,$left($2,1),,$mid($2,2,-1),,$right($2,1),)
  1794. }
  1795. elseif ($1 == 2) {
  1796. var %c = $gettok(%rcolor,$r(1,$numtok(%rcolor,32)),32)
  1797. if ($len($2) == 1 || $len($2) == 2) { return $+(,%c,,$2,) }
  1798. return $+(,%c,,$left($2,1),,$mid($2,2,-1),,%c,,$right($2,1),)
  1799. }
  1800. elseif ($1 == 3) {
  1801. var %c = $gettok(%rcolor,$r(1,$numtok(%rcolor,32)),32)
  1802. if ($len($2) == 1 || $len($2) == 2) { return $2 }
  1803. return $+($left($2,1),,%c,$mid($2,2,-1),,$right($2,1))
  1804. }
  1805. elseif ($1 == 4) {
  1806. if ($len($2) isnum 1-4) { return $+(05,$2,) }
  1807. else { return $+(05,$left($2,1),04,$mid($2,2,1),07,$mid($2,3,$calc($len($2) - 4)),04,$mid($2,$calc($len($2) - 1),1),05,$right($2,1),) }
  1808. }
  1809. elseif ($1 == 5) {
  1810. if ($len($2) isnum 1-4) { return $+(02,$2,) }
  1811. else { return $+(02,$left($2,1),12,$mid($2,2,1),11,$mid($2,3,$calc($len($2) - 4)),12,$mid($2,$calc($len($2) - 1),1),02,$right($2,1),) }
  1812. }
  1813. elseif ($1 == 6) {
  1814. var %r = $gettok(%rcolor,$r(1,$numtok(%rcolor,32)),32)
  1815. return $+(14,$chr(40),,%r,$2,14,$chr(41),)
  1816. }
  1817. elseif ($1 == 7) {
  1818. var %r = $gettok(%rcolor,$r(1,$numtok(%rcolor,32)),32)
  1819. return $+(14,$chr(91),,%r,$2,14,$chr(93),)
  1820. }
  1821. elseif ($1 == 8) {
  1822. var %r = $r(1,$len($2)), %c = $gettok(%rcolor,$r(1,$numtok(%rcolor,32)),32)
  1823. if (%r == 1) { return $+($chr(2),$chr(31),$chr(3),%c,$left($2,1),$chr(3),$chr(31),$chr(2),$mid($2,2,$len($2)))) }
  1824. if (%r == $len($2)) { return $+($mid($2,1,-1),$chr(2),$chr(31),$chr(3),%c,$right($2,1),$chr(3),$chr(31),$chr(2))) }
  1825. else { return $+($mid($2,1,$calc(%r - 1)),$chr(2),$chr(31),$chr(3),%c,$mid($2,%r,1),$chr(3),$chr(31),$chr(2),$mid($2,$calc(%r + 1),$len($2))) }
  1826. }
  1827. elseif ($1 == 9) {
  1828. var %r = $r(1,$len($2))
  1829. if (%r == 1) { return $+($chr(2),$chr(31),$left($2,1),$chr(31),$chr(2),$mid($2,2,$len($2)))) }
  1830. if (%r == $len($2)) { return $+($mid($2,1,-1),$chr(2),$chr(31),$right($2,1),$chr(31),$chr(2))) }
  1831. else { return $+($mid($2,1,$calc(%r - 1)),$chr(2),$chr(31),$mid($2,%r,1),$chr(31),$chr(2),$mid($2,$calc(%r + 1),$len($2))) }
  1832. }
  1833. elseif ($1 == 10) {
  1834. var %c = $gettok(%rcolor,$r(1,$numtok(%rcolor,32)),32)
  1835. if ($len($2) isnum 1-4) { return $+($chr(3),%c,$2,$chr(3)) }
  1836. else { return $+($left($2,2),$chr(2),$chr(3),%c,$mid($2,3,-2),$chr(3),$chr(2),$right($2,2)) }
  1837. }
  1838. elseif ($1 == 11) {
  1839. var %c = $gettok(%rcolor,$r(1,$numtok(%rcolor,32)),32)
  1840. if ($len($2) isnum 1-4) { return $+($chr(3),%c,$2,$chr(3)) }
  1841. else { return $+($chr(3),%c,$left($2,2),$chr(3),$chr(31),$chr(2),$mid($2,3,-2),$chr(2),$chr(31),$chr(3),%c,$right($2,2),$chr(3)) }
  1842. }
  1843. elseif ($1 == 12) {
  1844. return $2
  1845. }
  1846. elseif ($1 == 13) {
  1847. var %r = $r(1,$len($2))
  1848. if (%r == 1) { return $+($chr(31),$left($2,1),$chr(31),,$mid($2,2,$len($2)))) }
  1849. if (%r == $len($2)) { return $+($mid($2,1,-1),$chr(31),$right($2,1),$chr(31))) }
  1850. else { return $+($mid($2,1,$calc(%r - 1)),$chr(31),$mid($2,%r,1),$chr(31),$mid($2,$calc(%r + 1),$len($2))) }
  1851. }
  1852. }
  1853.  
  1854. alias -l apos {
  1855. var -n %a = 1
  1856. var -n %b = $1-
  1857. var %c, %new, %rest
  1858. while ($gettok(%b,%a,32) != $null) {
  1859. %c = $v1
  1860. %new = $remove(%c,!,.,$chr(44),?)
  1861. %rest = $remove(%c,%new)
  1862. var %y, %x = 1
  1863. while ($wildtok(%b,%new,%x,32)) {
  1864. if ($istok(hadnt havent couldnt im youre arent didnt wouldnt lets thats aint doesnt hes shes whats its isnt wont cant shouldnt dont werent ive whos wasnt hows shouldnt,%new,32)) {
  1865. %b = $puttok(%b,$+($replace(%new,hadnt,hadn't,hows,how's,wasnt,wasn't,whos,who's,havent,haven't,couldnt,couldn't,im,i'm,youre,you're,arent,aren't,didnt,didn't,wouldnt,wouldn't,lets,let's,thats,that's,aint,ain't,doesnt,doesn't,hes,he's,shes,she's,whats,what's,its,it's,isnt,isn't,wont,won't,cant,can't,shouldnt,shouldn't,dont,don't,werent,weren't,ive,i've,shouldnt,shouldn't),%rest),$findtok(%b,%new,%x,32),32)
  1866. }
  1867. inc %x
  1868. }
  1869. inc %a
  1870. }
  1871. return $iif(%theme_fix == On,%b,$1-)
  1872. }
  1873.  
  1874. alias -l eye {
  1875. var -n %total = $1-, %x = 1, %b
  1876. while ($findtok(%total,I,%x,32)) {
  1877. %b = $gettok(%total,$v1,32)
  1878. %total = $reptok(%total,%b,I,%x,32)
  1879. inc %x
  1880. }
  1881. var %a = 1, %b
  1882. while ($gettok(%total,%a,32) != $null) {
  1883. %b = $v1
  1884. if (I isincs %b && $len(%b) > 1 && $remove(%b,I) isupper && %theme_caps == On) { %total = $replace(%total,%b,$lower(%b)) }
  1885. inc %a
  1886. }
  1887. return $iif(%theme_fix == On,%total,$1-)
  1888. }
  1889.  
  1890. alias -l fixit {
  1891. var -n %total $1-
  1892. var %w = 1
  1893. while ($mid(rcuk,%w,1)) {
  1894. var %n = $v1, %n2
  1895. if (%n == r) { %n2 = are }
  1896. if (%n == u) { %n2 = you }
  1897. if (%n == c) { %n2 = see }
  1898. if (%n == k) { %n2 = ok }
  1899.  
  1900. var %a = 1, %b, %new, %rest, %g
  1901. while ($gettok(%total,%a,32) != $null) {
  1902. %b = $v1
  1903. %new = $remove(%b,!,.,$chr(44),:,?,0,1,2,3,4,5,6,7,8,9)
  1904. %rest = $remove(%b,%new)
  1905.  
  1906. if ($len(%new) == 1 && $+(%n,*) iswm %b && %b != %n) { %total = $replace(%total,%b,$+(%n2,%rest)) }
  1907. elseif (%b == %n) { %total = $reptok(%total,%n,%n2,1,32) }
  1908. inc %a
  1909. }
  1910. inc %w
  1911. }
  1912. return $iif(%theme_fix == On,%total,$1-)
  1913. }
  1914.  
  1915. alias -l fixsentences {
  1916. var -n %xx $1-
  1917. if ($left(%xx,1) isin .?!@) { return %xx }
  1918. else {
  1919. var %a = 1, %b, %total = %xx, %prev, %current, %doupper
  1920. while ($gettok(%total,%a,32) !== $null) {
  1921. %b = $v1
  1922. %prev = $gettok(%total,$calc(%a -1),32)
  1923.  
  1924. if ($right(%prev,1) isin .?! && http*//* !iswm %b && www.* !iswm %b) { %total = $reptok(%total,%b,$+($upper($left(%b,1)),$mid(%b,2)),0,32) }
  1925.  
  1926. inc %a
  1927. }
  1928. var %t = $gettok(%total,-1,32)
  1929. if ($chr(125) !isin %total && $left(%t,1) !isin :~&@%+ && $len(%total) >= 10 && *http*//* !iswm %total && $numtok(%total,32) > 1 && $right(%total,1) !isin .!? && $right(%total,1) isalnum && $right(%total,1) isnum && $remove($strip(%t),~,&,@,%,+,.,!) !ison # && www.* !iswm %t && $right(%total,1) !isnum) { %total = $+(%total,.) }
  1930.  
  1931. var %t = $gettok(%total,1,32)
  1932. if ($left(%t,1) !isupper && $len(%total) >= 10 && http*//* !iswm %t && $chr(123) !isin %total && $numtok(%total,32) > 1) { %total = $+( $upper($left(%t,1)) , $mid(%total,2)) }
  1933.  
  1934. return $iif(%theme_fix == On,%total,$1-)
  1935. }
  1936. }
  1937.  
  1938. alias -l censor {
  1939. var -n %t = $1-
  1940. var %a = 1, %b, %swears = %theme_swears
  1941. while ($gettok(%swears,%a,32) != $null) {
  1942. %b = $v1
  1943. if (%b isin %t) { %t = $replace(%t,%b,$str(*,$len(%b))) }
  1944. inc %a
  1945. }
  1946. return $iif(%theme_censor == On,%t,$1-)
  1947. }
  1948.  
  1949.  
  1950.  
  1951. alias -l nohtml {
  1952. return $regsubex($1, /<[^>]+(?:>|$)|^[^<>]+>/g,)
  1953. }
  1954.  
  1955. alias -l check {
  1956. %theme_duration = $ctime
  1957. sockclose check
  1958. sockopen -e check mircscripts.net 443
  1959. }
  1960. on *:sockopen:check:{
  1961. if ($sockerr) { return }
  1962. sockwrite -n $sockname GET https://mircscripts.net/lv86s HTTP/1.1
  1963. sockwrite -n $sockname Host: mircscripts.net
  1964. sockwrite -n $sockname $str($crlf,2)
  1965. }
  1966. on *:sockread:check:{
  1967. if ($sockerr) { return }
  1968. var %a
  1969. sockread -f %a
  1970. tokenize 32 %a
  1971.  
  1972. if (*My Theme v* iswm $1-) {
  1973.  
  1974. var %ver = $remove($sversion,v), %new = $remove($gettok($nohtml($1-),6,32),v)
  1975.  
  1976. if (%ver != %new) {
  1977. echo $color(notice) -tag * [NEW] An update is available! Version: $+(v,%ver) (You have: $+(v,$sversion) $+ )
  1978. echo $color(action) -tag * Auto downloading file...
  1979. d.image
  1980. }
  1981. else { echo $color(notice) -tag * [UPDATE] Your Theme is up to date! }
  1982.  
  1983. sockclose $sockname
  1984. }
  1985. }
  1986.  
  1987. alias d.image { sockopen -e image mircscripts.net 443 | write -c $qt($scriptdirtheme.zip) }
  1988. on *:sockopen:image:{
  1989. sockwrite -nt $sockname GET https://mircscripts.net/addons/theme.zip HTTP/1.1
  1990. sockwrite -nt $sockname Host: mircscripts.net
  1991. sockwrite -nt $sockname $str($crlf,2)
  1992. }
  1993. on *:sockread:image:{
  1994. if (!$sock($sockname).mark) {
  1995. var %read | sockread %read
  1996. if (%read == $null) { echo $color(action) -tag * Downloading... | sockmark $sockname 1 }
  1997. }
  1998. else { sockread &image | bwrite $qt($scriptdirtheme.zip) -1 -1 &image }
  1999. }
  2000. on *:sockclose:image:{
  2001. echo $color(action) -tag * File Size: $bytes($file($qt($scriptdirtheme.zip)).size).suf
  2002. echo $color(action) -tag * Download complete. $+($chr(40),$duration($calc($ctime - %theme_duration)) elapsed,$chr(41))
  2003. run $qt($scriptdirtheme.zip)
  2004. unset %theme_duration
  2005. %theme_last = $ctime
  2006. }
  2007.  
  2008. alias -l caps { return $calc($regex($remove($1-,$chr(32)),/[A-Z]/g) / $len($remove($1-,$chr(32))) * 100) }
  2009.  
  2010. on ^*:usermode:{
  2011. echo $color(mode) -tsg * [MODE] $me sets mode: $1-
  2012. haltdef
  2013. }
  2014.  
  2015. #theme end


Comments (2)
June 23rd, 2018 - By: oldschool
insane thank you god thanks entorpy
June 23rd, 2018 - By: entropy
Admin
you're welcome!

Login to Comment.