openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

index.html (5798B)


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