Addons
  • Uploaded By: entropy
  • Added: 1 year ago
  • Updated: 7 days ago
  • mIRC Version: 7.52+
  • Hits: 2,208
  • Size: 312.64KB
  • Downloads: 259
  • Review By: maroon



My Theme v5.0.2

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