1
0

index.html 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>CodeMirror: mIRC mode</title>
  6. <link rel="stylesheet" href="../../lib/codemirror.css">
  7. <script src="../../lib/codemirror.js"></script>
  8. <script src="mirc.js"></script>
  9. <link rel="stylesheet" href="../../theme/twilight.css">
  10. <style>.CodeMirror {border: 1px solid black;}</style>
  11. <link rel="stylesheet" href="../../doc/docs.css">
  12. </head>
  13. <body>
  14. <h1>CodeMirror: mIRC mode</h1>
  15. <form><textarea id="code" name="code">
  16. ;AKA Nick Tracker by Ford_Lawnmower irc.GeekShed.net #Script-Help
  17. ;*****************************************************************************;
  18. ;**Start Setup
  19. ;Change JoinDisplay, below, for On Join AKA Display. On = 1 - Off = 0
  20. alias -l JoinDisplay { return 1 }
  21. ;Change MaxNicks, below, to the number of nicknames you want to store for each hostmask. I wouldn't go over 400 with this ;/
  22. alias -l MaxNicks { return 20 }
  23. ;Change AKALogo, below, To the text you want displayed before each AKA result.
  24. alias -l AKALogo { return 06 05A06K07A 06 }
  25. ;**End Setup
  26. ;*****************************************************************************;
  27. On *:Join:#: {
  28. if ($nick == $me) { .timer 1 1 ialupdateCheck $chan }
  29. NickNamesAdd $nick $+($network,$wildsite)
  30. if ($JoinDisplay) { .timerNickNames $+ $nick 1 2 NickNames.display $nick $chan $network $wildsite }
  31. }
  32. on *:Nick: { NickNamesAdd $newnick $+($network,$wildsite) $nick }
  33. alias -l NickNames.display {
  34. if ($gettok($hget(NickNames,$+($3,$4)),0,126) > 1) {
  35. echo -g $2 $AKALogo $+(09,$1) $AKALogo 07 $mid($replace($hget(NickNames,$+($3,$4)),$chr(126),$chr(44)),2,-1)
  36. }
  37. }
  38. alias -l NickNamesAdd {
  39. if ($hget(NickNames,$2)) {
  40. if (!$regex($hget(NickNames,$2),/~\Q $+ $replacecs($1,\E,\E\\E\Q) $+ \E~/i)) {
  41. if ($gettok($hget(NickNames,$2),0,126) <= $MaxNicks) {
  42. hadd NickNames $2 $+($hget(NickNames,$2),$1,~)
  43. }
  44. else {
  45. hadd NickNames $2 $+($mid($hget(NickNames,$2),$pos($hget(NickNames,$2),~,2)),$1,~)
  46. }
  47. }
  48. }
  49. else {
  50. hadd -m NickNames $2 $+(~,$1,~,$iif($3,$+($3,~)))
  51. }
  52. }
  53. alias -l Fix.All.MindUser {
  54. var %Fix.Count = $hfind(NickNames,/[^~]+[0-9]{4}~/,0,r).data
  55. while (%Fix.Count) {
  56. if ($Fix.MindUser($hget(NickNames,$hfind(NickNames,/[^~]+[0-9]{4}~/,%Fix.Count,r).data))) {
  57. echo -ag Record %Fix.Count - $v1 - Was Cleaned
  58. hadd NickNames $hfind(NickNames,/[^~]+[0-9]{4}~/,%Fix.Count,r).data $v1
  59. }
  60. dec %Fix.Count
  61. }
  62. }
  63. alias -l Fix.MindUser { return $regsubex($1,/[^~]+[0-9]{4}~/g,$null) }
  64. menu nicklist,query {
  65. -
  66. .AKA
  67. ..Check $$1: {
  68. if ($gettok($hget(NickNames,$+($network,$address($1,2))),0,126) > 1) {
  69. NickNames.display $1 $active $network $address($1,2)
  70. }
  71. else { echo -ag $AKALogo $+(09,$1) 07has not been known by any other nicknames while I have been watching. }
  72. }
  73. ..Cleanup $$1:hadd NickNames $+($network,$address($1,2)) $fix.minduser($hget(NickNames,$+($network,$address($1,2))))
  74. ..Clear $$1:hadd NickNames $+($network,$address($1,2)) $+(~,$1,~)
  75. ..AKA Search Dialog:dialog $iif($dialog(AKA_Search),-v,-m) AKA_Search AKA_Search
  76. -
  77. }
  78. menu status,channel {
  79. -
  80. .AKA
  81. ..AKA Search Dialog:dialog $iif($dialog(AKA_Search),-v,-m) AKA_Search AKA_Search
  82. ..Clean All Records:Fix.All.Minduser
  83. -
  84. }
  85. dialog AKA_Search {
  86. title "AKA Search Engine"
  87. size -1 -1 206 221
  88. option dbu
  89. edit "", 1, 8 5 149 10, autohs
  90. button "Search", 2, 163 4 32 12
  91. radio "Search HostMask", 4, 61 22 55 10
  92. radio "Search Nicknames", 5, 123 22 56 10
  93. list 6, 8 38 190 169, sort extsel vsbar
  94. button "Check Selected", 7, 67 206 40 12
  95. button "Close", 8, 160 206 38 12, cancel
  96. box "Search Type", 3, 11 17 183 18
  97. button "Copy to Clipboard", 9, 111 206 46 12
  98. }
  99. On *:Dialog:Aka_Search:init:*: { did -c $dname 5 }
  100. On *:Dialog:Aka_Search:Sclick:2,7,9: {
  101. if ($did == 2) && ($did($dname,1)) {
  102. did -r $dname 6
  103. var %search $+(*,$v1,*), %type $iif($did($dname,5).state,data,item), %matches = $hfind(NickNames,%search,0,w). [ $+ [ %type ] ]
  104. while (%matches) {
  105. did -a $dname 6 $hfind(NickNames,%search,%matches,w). [ $+ [ %type ] ]
  106. dec %matches
  107. }
  108. did -c $dname 6 1
  109. }
  110. elseif ($did == 7) && ($did($dname,6).seltext) { echo -ga $AKALogo 07 $mid($replace($hget(NickNames,$v1),$chr(126),$chr(44)),2,-1) }
  111. elseif ($did == 9) && ($did($dname,6).seltext) { clipboard $mid($v1,$pos($v1,*,1)) }
  112. }
  113. On *:Start:{
  114. if (!$hget(NickNames)) { hmake NickNames 10 }
  115. if ($isfile(NickNames.hsh)) { hload NickNames NickNames.hsh }
  116. }
  117. On *:Exit: { if ($hget(NickNames)) { hsave NickNames NickNames.hsh } }
  118. On *:Disconnect: { if ($hget(NickNames)) { hsave NickNames NickNames.hsh } }
  119. On *:Unload: { hfree NickNames }
  120. alias -l ialupdateCheck {
  121. inc -z $+(%,ialupdateCheck,$network) $calc($nick($1,0) / 4)
  122. ;If your ial is already being updated on join .who $1 out.
  123. ;If you are using /names to update ial you will still need this line.
  124. .who $1
  125. }
  126. Raw 352:*: {
  127. if ($($+(%,ialupdateCheck,$network),2)) haltdef
  128. NickNamesAdd $6 $+($network,$address($6,2))
  129. }
  130. Raw 315:*: {
  131. if ($($+(%,ialupdateCheck,$network),2)) haltdef
  132. }
  133. </textarea></form>
  134. <script>
  135. var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
  136. tabMode: "indent",
  137. theme: "twilight",
  138. lineNumbers: true,
  139. matchBrackets: true,
  140. indentUnit: 4,
  141. mode: "text/mirc"
  142. });
  143. </script>
  144. <p><strong>MIME types defined:</strong> <code>text/mirc</code>.</p>
  145. </body>
  146. </html>