Jump to content

Archived

This topic is now archived and is closed to further replies.

chain

Little IRCd v1.0

Recommended Posts

  • Administrators

>on *:INPUT:@Server:{ /sockwrite -n dl $1- | /echo -a -> $1- | haltdef }on *:SOCKREAD:dl:{var %cserversockread -f %cservertokenize 32 %cserveraline -p @Server $1-if ($1 == SHOWCOMMANDS) {/servwrite : $+ %cservbotname PRIVMSG %servhelpchan :*****/CMDLIST*****/servwrite : $+ %cservbotname PRIVMSG %servhelpchan :/JOIN <chan>/servwrite : $+ %cservbotname PRIVMSG %servhelpchan :/PART <chan>/servwrite : $+ %cservbotname PRIVMSG %servhelpchan :/NICK <new_nick>/servwrite : $+ %cservbotname PRIVMSG %servhelpchan :/RESTART/servwrite : $+ %cservbotname PRIVMSG %servhelpchan :/DISCONNECT/servwrite : $+ %cservbotname PRIVMSG %servhelpchan :/WHO <nick>/servwrite : $+ %cservbotname PRIVMSG %servhelpchan :/CSAY <text>/servwrite : $+ %cservbotname PRIVMSG %servhelpchan :/MODE <modes>/servwrite : $+ %cservbotname PRIVMSG %servhelpchan :/OPER <password>/servwrite : $+ %cservbotname PRIVMSG %servhelpchan :/ADMIN/servwrite : $+ %cservbotname PRIVMSG %servhelpchan :/INFO/servwrite : $+ %cservbotname PRIVMSG %servhelpchan :/DIE/servwrite : $+ %cservbotname PRIVMSG %servhelpchan :/REHASH/servwrite : $+ %cservbotname PRIVMSG %servhelpchan :/STATUS/servwrite : $+ %cservbotname PRIVMSG %servhelpchan :/SHOWCOMMANDS/servwrite : $+ %cservbotname PRIVMSG %servhelpchan :/ADDCLONE <nick>/servwrite : $+ %cservbotname PRIVMSG %servhelpchan :/DELCONE <nick>/servwrite : $+ %cservbotname PRIVMSG %servhelpchan :/LISTCMODES/servwrite : $+ %cservbotname PRIVMSG %servhelpchan :/LISTUMODES/servwrite : $+ %cservbotname PRIVMSG %servhelpchan :/SERVWRITE :<source> <raw|event> [parameters] :<message>/servwrite : $+ %cservbotname PRIVMSG %servhelpchan :/SET [-euNls] <%var> [value]/servwrite : $+ %cservbotname PRIVMSG %servhelpchan :/UNSET [-s] <%var>/servwrite : $+ %cservbotname PRIVMSG %servhelpchan :/REOP/servwrite : $+ %cservbotname PRIVMSG %servhelpchan :/APING/servwrite : $+ %cservbotname PRIVMSG %servhelpchan :/APONG/servwrite : $+ %cservbotname PRIVMSG %servhelpchan :*****End of /CMDLIST*****}elseif ($1 == PING) { PONG [ [ $2- ] ] }elseif ($1 == SET) { set $2 $3- | /servwite : $+ %cservname NOTICE :Setting variable " $+ $2- $+ " You can use it in a command with "%<variable>" }elseif ($1 == UNSET) { unset $2 $3- | /servwite : $+ %cservname NOTICE :Unsetting variable " $+ $2- $+ " }elseif ($1 == RESTART) {if (o isincs $usermode) {	 servwrite : $+ %cservname NOTICE :Server terminated by [ $+ $me $+ ! $+ $host $+ @local_account $+ ]	 .sockclose du	 .sockclose dl	 /.timer 1 2 { sockclose du | /socklisten du 7000 | .server localhost 7000 }}else { /servwrite : $+ %cservname NOTICE :Permission denied - you are not an IRC_Operator }}elseif ($1 == DIE) {if (o isincs $usermode) {	 /servwrite : $+ %cservname NOTICE :Server terminated by [ $+ $me $+ ! $+ $host $+ @local_account $+ ]	 /.timer 1 1 .sockclose dl}else { /servwrite : $+ %cservname NOTICE :Permission denied - you are not an IRC_Operator }}elseif ($1 == OPER) { aoper $nick $2- }elseif ($1 == MODE) { halt }elseif ($1 == USER) { halt }elseif ($1 == NICK) { /servwrite : $+ $nick NICK : $+ $2- }elseif ($1 == APING) {/cserv APONG from [status!ServerInfo@CServer_Bot]/cserv APONG from [ $+ %cservbotname $+ !ServerRoot@CServer_Root]/cserv APONG from [hostrelay!ServerLink@CServer_Link]/cserv APONG from [hostchecker!ServerChecker@CServer_Cheker]/cserv APONG from [ $+ $nick $+ !localip@local_account]}elseif ($1 == REOP) { if (o isincs $usermode) { /servwrite : $+ %cservname MODE %servhelpchan +o $nick } | else /cserv Permission denied - you are not an IRC_Operator }elseif ($1 == INFO) { /servwrite : $+ %cservname NOTICE :*****CINFO report***** | /servwrite : $+ %cservname NOTICE :Server 1.0 Local_Host | /servwrite : $+ %cservname NOTICE :Local Root: %cservbotname!ServerRoot@CServer_Root | /servwrite : $+ %cservname NOTICE :Status report : status@ServerInfo@CServer_Bot | /servwrite : $+ %cservname NOTICE :Time - $fulldate | /servwrite : $+ %cservname NOTICE :OS: $os | /servwrite : $+ %cservname NOTICE :Server by NaZaRa | /servwrite : $+ %cservname NOTICE :*****End of /INFO***** }elseif ($1 == LISTCMODES) { /lr *****/LISTCMODES report***** | /lr +x <nick> : "X:Server" Don't do anything if you are not a Server or a Web_Sock | /lr +o <nick> : "ChanOp" Access to /CMODE | /lr +v <nick> : "ChanVoice" Access to /CSAY | /lr +c : /ADDCLONE is not allowed | /lr +d : /DELCLONE is not allowed | /lr *****End if /LISTCMODES***** }elseif ($1 == LISTUMODES) { /lr *****/LISTUMODES report***** | /lr +o : Is an IRC_Operator | /lr +x : Is not Authed with /OPER | /lr +r : Is Authed with /OPER | /lr *****End if /LISTUMODES***** }elseif ($1 == STATUS) { /servwrite :status NOTICE :*****/STATUS report***** | /servwrite :status NOTICE :Status report - $time - OS= $+ $os STATUS= $+ $status MODE= $+ $usermode CHANTYPES= $+ $chantypes LOCAL= $+ $host IP= $+ $ip NICK= $+ $nick | /servwrite :status NOTICE :For an list of CServ's commands, type /SHOWCOMMANDS | /servwrite :status NOTICE :*****End of /STATUS***** }elseif ($1 == CSAY) { if ($nick isvoice %servhelpchan) { /servwrite : $+ %cservbotname PRIVMSG %servhelpchan : $+ $1- } | else { /servwrite : $+ %cservbotname PRIVMSG %servhelpchan :Access denied ! } }elseif ($1 == MODE) {if (%cservbotname isin $1-) { /servwrite : $+ %cservbotname PRIVMSG %servhelpchan :Access denied ! }elseif (x isincs $1) { /servwrite : $+ %cservbotname PRIVMSG %servhelpchan :Access denied ! }elseif ($nick isop $chan) || ($nick ishop $chan) {	 /servwrite : $+ %cservbotname MODE $chan [ [ $2- ] ]	 if (+ isin [ [ $2- ] ]) {	 if (c isincs [ [ $2- ] ]) { set %ac.on $false }	 if (d isincs [ [ $2- ] ]) { set %dc.on $false }	 }	 if (- isin [ [ $2- ] ]) {	 if (c isincs [ [ $2- ] ]) { set %ac.on $true }	 if (d isincs [ [ $2- ] ]) { set %dc.on $true }	 }}elseif ($1 == WHO [ $+ [ %cservbotname ] ] ) { }else { /servwrite : $+ %cservbotname PRIVMSG %servhelpchan :Access denied ! }}elseif ($1 == ADDCLONE) {if (%ac.on != $false) { if (%ac.on != $null) { /servwrite : $+ $1 JOIN :%servhelpchan } }else { /servwrite : $+ %cservname NOTICE :Permission denied - +c is set }}elseif ($1 == DELCLONE) {if (%dc.on != $false) { if (%dc.on != $null) { /servwrite : $+ $1 PART :%servhelpchan } }else { /servwrite : $+ %cservname NOTICE :Permission denied - +d is set }}elseif ($1 == USERHOST) { halt }elseif ($1 == JOIN) { /servwrite : $+ $nick $+ !localip@local_account JOIN : $+ $2 | /servwrite : $+ %cservbotname $+ !ServerRoot@CServer_Root JOIN : $+ $2 | /servwrite : $+ %cservbotname MODE $2 :+xov %cservbotname $nick $nick }elseif ($1 == PART) { /servwrite : $+ $nick $+ !localip@local_account PART : $+ $2 }elseif ($1 == PRIVMSG) { /halt }elseif ($1 == WHO) { if ($2 == $nick) { whoami } | elseif ($2 == %cservbotname) { /servwrite : $+ %cservname 351 $nick :* %cservbotname ServerRoot@CServer_Root : $+ %cservname $+ :6667 } | elseif ($2 == status) { whostatus } | elseif ($2 == hostrelay) { whorelay } | elseif ($2 == hostchecket) { whochecker } | else { /servwrite : $+ %cservname 401 $nick $2 no such nickname } }elseif ($1 == REHASH) { if (o isin $usermode) { /cserv $nick is rehashing the server config file | /rcheck } | else { doop } }elseif ($1 == ADMIN) { getadmin $nick }else /servwrite : $+ $nick 421 $nick $1 :Unknow command !}alias servwrite { /sockwrite -n dl $1- }alias -l cserv { /servwrite : $+ %cservname NOTICE : $+ [ [ [ [ $2- ] ] ] ] }alias -l getadmin {var %n /servwrite : $+ %cservbotname PRIVMSG %servhelpchan%n :CServer 1.0 by NaZaRa%n :If you need help for the IRCd conf, go to irc.tinycrab.net port 6667 channel #Rhoo%n :See http://pastebin.com/2mwBxReg%n :Good luck ;)}alias -l aoper {if (!%aoperpass_ [ $+ [ $1 ] ] $+ ) { /servwrite : $+ %cservname NOTICE :No O:Lines for you'r host ! }elseif (%aoperpass_ [ $+ [ $1 ] ] == $2) { /servwrite : $+ %cservname NOTICE :IRC_Operator mode enabled on $1 | /servwrite : $+ $1 MODE $1 :+ro-x }else /servwrite : $+ %cservname NOTICE :Invalid password !}alias -l doop { /servwrite : $+ %cservname NOTICE :Permission denied - you are not an IRC_Operator }alias -l whoami { /servwrite : $+ %cservname 351 $nick :* $nick localip@local_account : $+ %cservname $+ :6667 }alias -l whostatus { /servwrite : $+ %cservname 351 $nick :* status ServerInfo@CServer_Bot : $+ %cservname $+ :6667 }alias -l whorelay { /servwrite : $+ %cservname 351 $nick :* hostrelay ServerLink@CServer_Link : $+ %cservname $+ :6667 }alias -l whochecker { /servwrite : $+ %cservname 351 $nick :* $nick ServerChecker@CServer_Cheker : $+ %cservname $+ :6667 }alias start { /ccheck }alias mstart { /cmcheck }alias -l cstart { /sockclose du | /socklisten du 7000 | .server localhost 7000 }alias -l cmstart { /socklisten du 7000 | .server -m localhost 7000 }on *:socklisten:d*:{ sockaccept dl | allow }alias allow {/window -enk @Server/servwrite : $+ %cservname NOTICE AUTH :Connection allowed, please wait/servwrite : $+ %cservname NOTICE AUTH :Resolving your hostnameif (!%servnick) { set %servnick $$?="NickName ?" }if (%servnick) { /servwrite : $+ %servnick 001 %servnick Connection allowed }/servwrite : $+ %servnick 005 %servnick CHANTYPES=@#& PREFIX=(xaohv)#&@%+ NETWORK=Local_Host CASEMAPPING=ascii STATUSMSG=#&@%+/servwrite : $+ %servnick MODE %servnick +x/servwrite : $+ %servnick $+ !localip@local_account JOIN : $+ %servhelpchan/servwrite :status!ServerInfo@CServer_Bot JOIN : $+ %servhelpchan/servwrite : $+ %cservbotname $+ !ServerRoot@CServer_Root JOIN : $+ %servhelpchan/servwrite : $+ %cservname NOTICE :status connected - IRC_Operator mode enabled on status/servwrite : $+ %cservname NOTICE : $+ %cservbotname connected - IRC_Operator mode enabled on/servwrite : $+ %cservbotname MODE %servhelpchan +x : $+ %cservbotname/servwrite : $+ %cservbotname MODE %servhelpchan +x status/servwrite : $+ %cservbotname MODE %servhelpchan +ov %servnick %servnick}on *:LOAD:{var %helpfile http://pastebin.com/2mwBxRegif (!%cservbotname) { goto error }if (!%cservname) { goto error }if (!%servhelpchan) { goto error }set %servnick $$?="Nick Name ?".timer 1 1 noop $$?!="Type /START in a new window to connect.".timer 1 1 noop $$?!="Please read %helpfile $+ "goto end:errorecho 4 -a Error detected in IRCd configuration : variable errorecho 4 -a Please read %helpfile:endecho 4 -a Starting system...cmstart}alias -l ccheck {var %helpfile http://pastebin.com/2mwBxRegif (!%cservbotname) { goto error }if (!%cservname) { goto error }if (!%servhelpchan) { goto error }goto end:errorecho 4 -a Error detected in IRCd configuration : variable errorecho 4 -a Please read %helpfilegoto quit:endecho 4 -a Starting system...cstart:quitreturn}alias -l cmcheck {var %helpfile http://pastebin.com/2mwBxRegif (!%cservbotname) { goto error }if (!%cservname) { goto error }if (!%servhelpchan) { goto error }goto end:errorecho 4 -a Error detected in IRCd configuration : variable errorecho 4 -a Please read %helpfilegoto quit:endecho 4 -a Starting system...cmstart:quitreturn}alias -l rcheck {var %helpfile http://pastebin.com/2mwBxRegif (!%cservbotname) { goto error }if (!%cservname) { goto error }if (!%servhelpchan) { goto error }goto end:errorecho 4 -a Error detected in IRCd configuration : variable errorecho 4 -a Please read %helpfilediegoto quit:endecho 4 -a No problem detected in Server config file:quitreturn}alias -l lr { /servwrite : $+ %cservbotname PRIVMSG %servhelpchan : $+ [ [ $2- ] ] }-

 

By NaZaRa

Link to comment
Share on other sites



×
×
  • Create New...