Addons
  • Uploaded By: entropy
  • Added: 1 year ago
  • Updated: 2 months ago
  • mIRC Version: 7.52+
  • Hits: 1,977
  • Size: 312.64KB
  • Downloads: 233
  • Review By: maroon



My Theme v5.0.1

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