├── README ├── include ├── serno.h ├── rlimits.h ├── patchlevel.h ├── ircd_signal.h ├── restart.h ├── list.h ├── rsa.h ├── parse.h ├── ircd_getopt.h ├── common.h ├── dbuf.h ├── memory.h ├── sprintf_irc.h ├── userhost.h ├── ircd_handler.h ├── event.h ├── resv.h ├── irc_reslib.h ├── hook.h ├── s_misc.h ├── motd.h ├── s_gline.h ├── irc_getnameinfo.h ├── listener.h ├── packet.h ├── s_log.h ├── Makefile.am ├── s_stats.h ├── supported.h ├── msg.h └── hash.h ├── help ├── opers │ ├── map │ ├── capab │ ├── drop │ ├── eob │ ├── hash │ ├── sjoin │ ├── cburst │ ├── client │ ├── knockll │ ├── lljoin │ ├── llnick │ ├── nburst │ ├── server │ ├── svinfo │ ├── cryptlink │ ├── testgecos │ ├── close │ ├── restart │ ├── operwall │ ├── locops │ ├── die │ ├── away │ ├── invite │ ├── undline │ ├── uhelp │ ├── testline │ ├── pass │ ├── post │ ├── wallops │ ├── help │ ├── modrestart │ ├── shedding │ ├── time │ ├── kill │ ├── knock │ ├── testmask │ ├── users │ ├── ison │ ├── motd │ ├── ping │ ├── version │ ├── squit │ ├── kick │ ├── nick │ ├── omotd │ ├── error │ ├── info │ ├── modload │ ├── pong │ ├── quit │ ├── modunload │ ├── lusers │ ├── part │ ├── modlist │ ├── whowas │ ├── etrace │ ├── ungline │ ├── rehash │ ├── topic │ ├── whois │ ├── user │ ├── oper │ ├── resv │ ├── unxline │ ├── userhost │ ├── accept │ ├── challenge │ ├── trace │ ├── admin │ ├── unkline │ ├── unresv │ ├── names │ ├── xline │ ├── join │ ├── gline │ ├── connect │ ├── links │ ├── dline │ ├── rkline │ ├── rxline │ ├── list │ ├── notice │ ├── privmsg │ ├── kline │ ├── who │ ├── index │ ├── stats │ ├── umode │ ├── set │ └── Makefile.am ├── users │ ├── info │ ├── Makefile.am │ ├── stats │ ├── notice │ ├── privmsg │ ├── index │ └── umode └── Makefile.am ├── AUTHORS ├── lib ├── Makefile.am └── pcre │ ├── Makefile.am │ ├── README │ ├── AUTHORS │ └── pcre_tables.c ├── doc ├── Makefile.am ├── technical │ ├── file-management.txt │ ├── index.txt │ ├── fd-management.txt │ └── whats-new-code.txt ├── index.txt ├── guidelines.txt ├── server-version-info └── messages.txt ├── messages ├── ircd-danish.lang ├── ircd-french.lang ├── ircd-german.lang ├── ircd-polish.lang ├── ircd-croatian.lang ├── ircd-norwegian.lang ├── ircd-russian.lang ├── ircd-swedish.lang ├── ircd-brazilian_pt.lang ├── Makefile.am ├── custom.lang ├── ayb.lang └── README ├── servlink ├── TODO ├── Makefile.am ├── io.h └── control.h ├── etc └── Makefile.am ├── ChangeLog ├── contrib ├── help │ ├── opers │ │ ├── opme │ │ ├── ltrace │ │ ├── uncapture │ │ ├── delspoof │ │ ├── capture │ │ ├── classlist │ │ ├── forcepart │ │ ├── clearchan │ │ ├── ctrace │ │ ├── chgident │ │ ├── chgname │ │ ├── chghost │ │ ├── jupe │ │ ├── mkpasswd │ │ ├── forcejoin │ │ ├── ojoin │ │ ├── svsnick │ │ ├── flags │ │ ├── spoof │ │ └── index │ ├── users │ │ └── index │ └── Makefile.in └── ircd.init.in ├── tools ├── untabify ├── win32 │ ├── kill.c │ ├── rehash.c │ └── remotd.c ├── README ├── mkkeypair └── README.mkpasswd ├── oftc-configure.sh ├── Makefile.am ├── m4 ├── options.m4 └── compiler.m4 ├── .gitignore ├── .github └── workflows │ └── ci.yaml ├── README.PLATFORMS ├── BUGS ├── modules ├── core │ ├── Makefile.am │ ├── spy_motd_notice.c │ ├── spy_info_notice.c │ ├── spy_admin_notice.c │ ├── spy_links_notice.c │ ├── spy_stats_p_notice.c │ └── spy_whois_notice.c ├── m_omotd.c ├── m_eob.c ├── m_realhost.c ├── m_log.c ├── m_gnotice.c ├── m_certfp.c └── m_post.c ├── src ├── list.c ├── memory.c ├── Makefile.am └── restart.c ├── autogen.sh └── TODO /README: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /include/serno.h: -------------------------------------------------------------------------------- 1 | #define SERIALNUM "STABLE" 2 | -------------------------------------------------------------------------------- /help/opers/map: -------------------------------------------------------------------------------- 1 | MAP 2 | 3 | Shows the network map. 4 | -------------------------------------------------------------------------------- /help/opers/capab: -------------------------------------------------------------------------------- 1 | CAPAB - Server to Server Protocol Command. 2 | -------------------------------------------------------------------------------- /help/opers/drop: -------------------------------------------------------------------------------- 1 | DROP - Server to Server Protocol Command. 2 | -------------------------------------------------------------------------------- /help/opers/eob: -------------------------------------------------------------------------------- 1 | EOB - Server to Server Protocol Command. 2 | -------------------------------------------------------------------------------- /help/opers/hash: -------------------------------------------------------------------------------- 1 | HASH 2 | 3 | Shows the hash statistics. 4 | -------------------------------------------------------------------------------- /help/opers/sjoin: -------------------------------------------------------------------------------- 1 | SJOIN - Server to Server Protocol Command. 2 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oftc/oftc-hybrid/HEAD/AUTHORS -------------------------------------------------------------------------------- /help/opers/cburst: -------------------------------------------------------------------------------- 1 | CBURST - Server to Server Protocol Command. 2 | -------------------------------------------------------------------------------- /help/opers/client: -------------------------------------------------------------------------------- 1 | CLIENT - Server to Server Protocol Command. 2 | -------------------------------------------------------------------------------- /help/opers/knockll: -------------------------------------------------------------------------------- 1 | KNOCKLL - Server to Server Protocol Command. 2 | -------------------------------------------------------------------------------- /help/opers/lljoin: -------------------------------------------------------------------------------- 1 | LLJOIN - Server to Server Protocol Command. 2 | -------------------------------------------------------------------------------- /help/opers/llnick: -------------------------------------------------------------------------------- 1 | LLNICK - Server to Server Protocol Command. 2 | -------------------------------------------------------------------------------- /help/opers/nburst: -------------------------------------------------------------------------------- 1 | NBURST - Server to Server Protocol Command. 2 | -------------------------------------------------------------------------------- /help/opers/server: -------------------------------------------------------------------------------- 1 | SERVER - Server to Server Protocol Command. 2 | -------------------------------------------------------------------------------- /help/opers/svinfo: -------------------------------------------------------------------------------- 1 | SVINFO - Server to Server Protocol Command. 2 | -------------------------------------------------------------------------------- /help/opers/cryptlink: -------------------------------------------------------------------------------- 1 | CRYPTLINK - Server to Server Protocol Command. 2 | -------------------------------------------------------------------------------- /lib/Makefile.am: -------------------------------------------------------------------------------- 1 | MAINTAINERCLEANFILES=Makefile.in 2 | SUBDIRS=pcre 3 | -------------------------------------------------------------------------------- /doc/Makefile.am: -------------------------------------------------------------------------------- 1 | MAINTAINERCLEANFILES=Makefile.in 2 | dist_man_MANS = ircd.8 3 | -------------------------------------------------------------------------------- /help/opers/testgecos: -------------------------------------------------------------------------------- 1 | TESTGECOS 2 | 3 | Looks for matching xlines for the given gecos. 4 | -------------------------------------------------------------------------------- /messages/ircd-danish.lang: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oftc/oftc-hybrid/HEAD/messages/ircd-danish.lang -------------------------------------------------------------------------------- /messages/ircd-french.lang: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oftc/oftc-hybrid/HEAD/messages/ircd-french.lang -------------------------------------------------------------------------------- /messages/ircd-german.lang: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oftc/oftc-hybrid/HEAD/messages/ircd-german.lang -------------------------------------------------------------------------------- /messages/ircd-polish.lang: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oftc/oftc-hybrid/HEAD/messages/ircd-polish.lang -------------------------------------------------------------------------------- /help/users/info: -------------------------------------------------------------------------------- 1 | INFO 2 | 3 | INFO displays the copyright, authors and contributors list 4 | for ircd. 5 | -------------------------------------------------------------------------------- /messages/ircd-croatian.lang: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oftc/oftc-hybrid/HEAD/messages/ircd-croatian.lang -------------------------------------------------------------------------------- /messages/ircd-norwegian.lang: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oftc/oftc-hybrid/HEAD/messages/ircd-norwegian.lang -------------------------------------------------------------------------------- /messages/ircd-russian.lang: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oftc/oftc-hybrid/HEAD/messages/ircd-russian.lang -------------------------------------------------------------------------------- /messages/ircd-swedish.lang: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oftc/oftc-hybrid/HEAD/messages/ircd-swedish.lang -------------------------------------------------------------------------------- /messages/ircd-brazilian_pt.lang: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oftc/oftc-hybrid/HEAD/messages/ircd-brazilian_pt.lang -------------------------------------------------------------------------------- /help/opers/close: -------------------------------------------------------------------------------- 1 | CLOSE 2 | 3 | Close any connections from clients or servers who have 4 | not fully registered yet. 5 | -------------------------------------------------------------------------------- /help/opers/restart: -------------------------------------------------------------------------------- 1 | RESTART server.name :[reason] 2 | 3 | Restarts the IRC server. 4 | 5 | - Requires Oper Priv: D 6 | -------------------------------------------------------------------------------- /help/opers/operwall: -------------------------------------------------------------------------------- 1 | OPERWALL : 2 | 3 | Sends an OPERWALL message of to all 4 | opers who are umode +z 5 | -------------------------------------------------------------------------------- /help/opers/locops: -------------------------------------------------------------------------------- 1 | LOCOPS : 2 | 3 | Sends an LOCOPS message of to all 4 | opers on local server who are umode +l 5 | -------------------------------------------------------------------------------- /servlink/TODO: -------------------------------------------------------------------------------- 1 | Servlink todo list 2 | $Id$ 3 | ------------------ 4 | 5 | Fix any bugs that come up 6 | 7 | Think of improvements :) 8 | -------------------------------------------------------------------------------- /help/opers/die: -------------------------------------------------------------------------------- 1 | DIE server.name :[reason] 2 | 3 | Terminates the IRC server with optional reason 4 | [reason] 5 | 6 | - Requires Oper Priv: D 7 | -------------------------------------------------------------------------------- /help/opers/away: -------------------------------------------------------------------------------- 1 | AWAY :[MSG] 2 | 3 | Without an argument, it will set you back. With an argument, 4 | it will set you as AWAY with the specified message. 5 | -------------------------------------------------------------------------------- /etc/Makefile.am: -------------------------------------------------------------------------------- 1 | MAINTAINERCLEANFILES=Makefile.in 2 | if EFNET 3 | dist_sysconf_DATA=example.efnet.conf 4 | else 5 | dist_sysconf_DATA=example.conf 6 | endif 7 | -------------------------------------------------------------------------------- /help/opers/invite: -------------------------------------------------------------------------------- 1 | INVITE 2 | 3 | INVITE sends a notice to the user that you have 4 | asked him/her to come to the specified channel. 5 | -------------------------------------------------------------------------------- /help/opers/undline: -------------------------------------------------------------------------------- 1 | # $Id: undline 33 2005-10-02 20:50:00Z knight $ 2 | UNDLINE 3 | 4 | Will attempt to undline the given 5 | 6 | - Requires Oper Priv: U 7 | -------------------------------------------------------------------------------- /help/opers/uhelp: -------------------------------------------------------------------------------- 1 | UHELP [topic] 2 | 3 | UHELP allows an operator to view help topics 4 | for users without opening a second client 5 | or removing their operator status. 6 | -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- 1 | 2007-03-05 Timothy J Fontaine 2 | 3 | * include/channel_mode.h: fix cmode +S SSLonlyChannel macro was missing a 4 | set of parenthesises 5 | -------------------------------------------------------------------------------- /help/opers/testline: -------------------------------------------------------------------------------- 1 | TESTLINE |ip 2 | 3 | -- Looks up given user@host or user@ip 4 | returns info on any found I line or K line for that user, 5 | or D-line on ip. 6 | -------------------------------------------------------------------------------- /contrib/help/opers/opme: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | OPME 3 | 4 | OPME will give chanop status to the operator in the given channel. 5 | OPME will only work if the channel is opless. 6 | -------------------------------------------------------------------------------- /help/opers/pass: -------------------------------------------------------------------------------- 1 | PASS 2 | 3 | PASS is used during registration to access 4 | a password protected auth {} block. 5 | 6 | PASS is also used during server registration. 7 | -------------------------------------------------------------------------------- /help/opers/post: -------------------------------------------------------------------------------- 1 | POST 2 | 3 | The POST command is used to help protect against 4 | insecure HTTP proxies. Any proxy that sends a POST 5 | command during registration will be exited. 6 | -------------------------------------------------------------------------------- /help/opers/wallops: -------------------------------------------------------------------------------- 1 | WALLOPS : 2 | 3 | Sends a WALLOPS message of to all opers 4 | who are umode +z. 5 | 6 | Server sent WALLOPS go to all opers who are umode +w. 7 | -------------------------------------------------------------------------------- /tools/untabify: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # 3 | # untabify - convert tabs to spaces 4 | # 5 | # $Id$ 6 | use Text::Tabs; 7 | $tabstop = 8; 8 | while (<>) { print expand($_) } 9 | 10 | -------------------------------------------------------------------------------- /contrib/help/opers/ltrace: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | LTRACE [nickname/server mask] 3 | 4 | This command is similar to TRACE, but it doesn't display plain users 5 | or definitions of connection classes. 6 | -------------------------------------------------------------------------------- /help/opers/help: -------------------------------------------------------------------------------- 1 | HELP [topic] 2 | 3 | HELP displays the contents of the help 4 | file for topic requested. If no topic is 5 | requested, it will perform the equivalent 6 | to HELP index. 7 | -------------------------------------------------------------------------------- /help/opers/modrestart: -------------------------------------------------------------------------------- 1 | MODRESTART 2 | 3 | -- Reload all modules into the ircd 4 | All modules are unloaded, then those in modules/autoload 5 | are loaded 6 | NOTE: Restricted to admins only 7 | -------------------------------------------------------------------------------- /help/opers/shedding: -------------------------------------------------------------------------------- 1 | SHEDDING : 2 | SHEDDING OFF 3 | 4 | SHEDDING enables and disables shedding on the named server. 5 | -------------------------------------------------------------------------------- /help/opers/time: -------------------------------------------------------------------------------- 1 | TIME [server] 2 | 3 | The TIME command will return the server's local date and time. 4 | 5 | If an argument is supplied, the time for the server specified 6 | will be returned. 7 | -------------------------------------------------------------------------------- /help/opers/kill: -------------------------------------------------------------------------------- 1 | KILL 2 | 3 | Disconnects user from the IRC server he/she 4 | is connected to with reason . 5 | - Requires Oper Priv: O for users not on your IRC server 6 | -------------------------------------------------------------------------------- /help/opers/knock: -------------------------------------------------------------------------------- 1 | KNOCK 2 | 3 | KNOCK requests access to a channel that 4 | for some reason is not open. 5 | 6 | KNOCK cannot be used if you are banned, the 7 | channel is +p, or it is open. 8 | -------------------------------------------------------------------------------- /help/opers/testmask: -------------------------------------------------------------------------------- 1 | # $Id: testmask 33 2005-10-02 20:50:00Z knight $ 2 | TESTMASK 3 | 4 | Will test the given user@host mask, reporting how many local and 5 | global clients match the given mask. 6 | -------------------------------------------------------------------------------- /help/opers/users: -------------------------------------------------------------------------------- 1 | USERS [remoteserver] 2 | 3 | USERS will display the local and global current 4 | and maximum user statistics for the specified 5 | server, or the local server if there was no 6 | parameter. 7 | -------------------------------------------------------------------------------- /contrib/help/opers/uncapture: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | UNCAPTURE 3 | 4 | The UNCAPTURE command will release a client from capture (e.g. the nickname you pass) 5 | allowing them to send commands to the server again. 6 | -------------------------------------------------------------------------------- /help/opers/ison: -------------------------------------------------------------------------------- 1 | ISON [nick_B] :[nick_C] [nick_D] 2 | 3 | ISON will return a list of users who are present 4 | on the network from the list that was passed in. 5 | 6 | This command is rarely used directly. 7 | -------------------------------------------------------------------------------- /help/opers/motd: -------------------------------------------------------------------------------- 1 | # $Id: motd 33 2005-10-02 20:50:00Z knight $ 2 | MOTD [servername] 3 | 4 | MOTD will display the message of the day for the 5 | server name specified, or the local server if there 6 | was no parameter. 7 | -------------------------------------------------------------------------------- /help/opers/ping: -------------------------------------------------------------------------------- 1 | PING : 2 | 3 | PING will request a PONG from the target. If a 4 | user or operator issues this command, the source 5 | will always be turned into the nick that issued 6 | the PING. 7 | -------------------------------------------------------------------------------- /help/opers/version: -------------------------------------------------------------------------------- 1 | # $Id: version 33 2005-10-02 20:50:00Z knight $ 2 | VERSION [servername] 3 | 4 | VERSION will display the server version of the specified 5 | server, or the local server if there was no parameter. 6 | -------------------------------------------------------------------------------- /help/opers/squit: -------------------------------------------------------------------------------- 1 | # $Id: squit 33 2005-10-02 20:50:00Z knight $ 2 | SQUIT :[reason] 3 | 4 | Splits away from your side of the net with [reason]. 5 | - Requires Oper Priv: R for servers not connected to you 6 | -------------------------------------------------------------------------------- /help/opers/kick: -------------------------------------------------------------------------------- 1 | KICK :[msg] 2 | 3 | The KICK command will remove the specified user 4 | from the specified channel, using the optional 5 | kick message. You must be a channel operator to 6 | use this command. 7 | -------------------------------------------------------------------------------- /help/opers/nick: -------------------------------------------------------------------------------- 1 | NICK 2 | 3 | When first connected to the IRC server, NICK is required to 4 | set the client's nickname. 5 | 6 | NICK will also change the client's nickname once a connection 7 | has been established. 8 | -------------------------------------------------------------------------------- /contrib/help/opers/delspoof: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | DELSPOOF 3 | 4 | The DELSPOOF command will remove a auth {} block for any user you request. 5 | 6 | For example to delete the spoof for god: 7 | 8 | DELSPOOF *god@10.0.0.* 9 | -------------------------------------------------------------------------------- /help/opers/omotd: -------------------------------------------------------------------------------- 1 | # $Id: omotd 33 2005-10-02 20:50:00Z knight $ 2 | OMOTD [servername] 3 | 4 | OMOTD will display the operator message of the day for the 5 | server name specified, or the local server if no servername 6 | was given. 7 | -------------------------------------------------------------------------------- /contrib/help/opers/capture: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | CAPTURE 3 | 4 | The CAPTURE command will essentially capture a client (e.g. the nickname you pass) 5 | preventing them from sending any commands to the server basically making them 6 | captive. 7 | -------------------------------------------------------------------------------- /help/opers/error: -------------------------------------------------------------------------------- 1 | ERROR : 2 | 3 | ERROR is sent by the server to clients 4 | or other servers when an exception occurs. 5 | 6 | If another server sends your server an 7 | ERROR, it will be shown to all operators 8 | on the server. 9 | -------------------------------------------------------------------------------- /help/opers/info: -------------------------------------------------------------------------------- 1 | INFO 2 | 3 | INFO displays the copyright, list of authors and contributors 4 | to ircd, and the server configuration (as defined in setup.h, 5 | defaults.h, and ircd.conf). 6 | 7 | # $Id: info 33 2005-10-02 20:50:00Z knight $ 8 | -------------------------------------------------------------------------------- /help/opers/modload: -------------------------------------------------------------------------------- 1 | MODLOAD <[path/]module.so> 2 | 3 | -- Load a module into the ircd 4 | the optional path can be an absolute path 5 | from / or from the IRCD_PREFIX 6 | (ie modules/autoload/m_users.so) 7 | NOTE: Restricted to admins only 8 | -------------------------------------------------------------------------------- /help/opers/pong: -------------------------------------------------------------------------------- 1 | PONG : 2 | 3 | PONG is the response to a PING command. The 4 | source client is the user or server that issued 5 | the command, and the pinged client is the 6 | user or server that received the PING. 7 | -------------------------------------------------------------------------------- /help/opers/quit: -------------------------------------------------------------------------------- 1 | QUIT :[quit message] 2 | 3 | QUIT sends a message to the IRC server letting it know you would 4 | like to disconnect. The quit message will be displayed to the 5 | users in the channels you were in when you are disconnected. 6 | -------------------------------------------------------------------------------- /help/users/Makefile.am: -------------------------------------------------------------------------------- 1 | MAINTAINERCLEANFILES=Makefile.in 2 | uhelpdir=$(datadir)/@PACKAGE@/help/users 3 | dist_uhelp_DATA= index \ 4 | info \ 5 | notice \ 6 | privmsg \ 7 | stats \ 8 | umode 9 | -------------------------------------------------------------------------------- /help/opers/modunload: -------------------------------------------------------------------------------- 1 | MODUNLOAD 2 | 3 | -- Unload a module from the ircd 4 | Use just the module name, the path is not needed. 5 | When a module is unloaded, all commands associated 6 | with it are unloaded as well. 7 | NOTE: Restricted to admins only 8 | -------------------------------------------------------------------------------- /help/opers/lusers: -------------------------------------------------------------------------------- 1 | LUSERS [mask] [remoteserver] 2 | 3 | LUSERS will display client count statistics 4 | for the specified mask, or all users if a 5 | mask was not specified. If a remote server 6 | is specified, it will request the information 7 | from that server. 8 | -------------------------------------------------------------------------------- /lib/pcre/Makefile.am: -------------------------------------------------------------------------------- 1 | MAINTAINERCLEANFILES=Makefile.in 2 | noinst_LIBRARIES=libpcre.a 3 | libpcre_a_SOURCES=pcre_chartables.c pcre_compile.c pcre_exec.c pcre_globals.c pcre_study.c pcre_tables.c pcre_fullinfo.c pcre_try_flipped.c 4 | noinst_HEADERS=pcre_internal.h pcre.h 5 | -------------------------------------------------------------------------------- /help/opers/part: -------------------------------------------------------------------------------- 1 | PART <#channel> :[part message] 2 | 3 | PART requires at least a channel argument to be given. It will 4 | exit the client from the specified channel. 5 | 6 | An optional part message may be given to be displayed to the 7 | channel. 8 | 9 | See also: join 10 | -------------------------------------------------------------------------------- /contrib/help/opers/classlist: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | CLASSLIST 3 | 4 | The CLASSLIST command will show complete totals of a class you wish to see. 5 | 6 | For example if you want to see the totals for the class users you would do: 7 | 8 | CLASSLIST users - Shows the totals in the users class. 9 | -------------------------------------------------------------------------------- /contrib/help/opers/forcepart: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | FORCEPART 3 | 4 | The FORCEPART command requires two arguments to be given. The first 5 | argument is the nickname of the user you wish to execute the command 6 | on, and the second argument is the destination channel they are to part. 7 | -------------------------------------------------------------------------------- /help/opers/modlist: -------------------------------------------------------------------------------- 1 | MODLIST [match string] 2 | 3 | -- List the modules that are currently loaded into the 4 | ircd, along with their address and version. 5 | When a match string is provided, modlist only prints 6 | modules with names matching the match string. 7 | NOTE: Restricted to admins only 8 | -------------------------------------------------------------------------------- /messages/Makefile.am: -------------------------------------------------------------------------------- 1 | MAINTAINERCLEANFILES=Makefile.in 2 | dist_pkgdata_DATA=ayb.lang custom.lang ircd-brazilian_pt.lang ircd-croatian.lang ircd-danish.lang ircd-dutch.lang ircd-french.lang ircd-german.lang ircd-norwegian.lang ircd-polish.lang ircd-russian.lang ircd-spanish.lang ircd-swedish.lang 3 | -------------------------------------------------------------------------------- /contrib/help/opers/clearchan: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | CLEARCHAN 3 | 4 | The CLEARCHAN command will essentially take over a channel by purging all 5 | the modes and user's privileges (e.g. voice, half-op, chanop), then 6 | kicking all the users out. 7 | 8 | This command requires that you PART the channel first. 9 | -------------------------------------------------------------------------------- /help/opers/whowas: -------------------------------------------------------------------------------- 1 | WHOWAS 2 | 3 | WHOWAS will show you the last known host and whois 4 | information for the specified nick. Depending on the 5 | number of times they have connected to the network, there 6 | may be more than one listing for a specific user. 7 | 8 | The WHOWAS data will expire after time. 9 | -------------------------------------------------------------------------------- /contrib/help/opers/ctrace: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | CTRACE 3 | 4 | The CTRACE command will do a trace of users depending on class. Similar 5 | to TRACE but class specific. 6 | 7 | For example if you want to do a trace on the clients in the users class: 8 | 9 | CTRACE users - Shows the totals in the users class. 10 | -------------------------------------------------------------------------------- /help/opers/etrace: -------------------------------------------------------------------------------- 1 | ETRACE [nickname mask] 2 | 3 | The ETRACE command will display a list of locally connected users 4 | in the following format: 5 | 6 | User/Oper class nickname username host gecos 7 | 8 | You can optionally give a parameter with nickname mask to limit 9 | the output. Wildcards are allowed. 10 | -------------------------------------------------------------------------------- /help/opers/ungline: -------------------------------------------------------------------------------- 1 | # $Id: ungline 33 2005-10-02 20:50:00Z knight $ 2 | UNGLINE 3 | 4 | -- if glines are enabled -- 5 | Will attempt to remove gline matching 6 | This will only remove the gline from YOUR server, it 7 | does not try to remove it globally. 8 | 9 | - Requires Oper Privs: G 10 | -------------------------------------------------------------------------------- /help/opers/rehash: -------------------------------------------------------------------------------- 1 | REHASH [option] 2 | 3 | When no [option] is given, ircd will re-read the 4 | ircd.conf file. 5 | 6 | [option] can be one of the following: 7 | DNS - Re-read the /etc/resolv.conf file 8 | MOTD - Re-reads MOTD file 9 | OMOTD - Re-reads Oper MOTD file 10 | 11 | - Requires Oper Priv: H 12 | -------------------------------------------------------------------------------- /help/opers/topic: -------------------------------------------------------------------------------- 1 | TOPIC <#channel> :[new topic] 2 | 3 | With only a channel argument, TOPIC shows the current topic of 4 | the specified channel. 5 | 6 | With a second argument, it changes the topic on that channel to 7 | . If the channel is +t, only chanops may change the 8 | topic. 9 | 10 | See also: cmode 11 | -------------------------------------------------------------------------------- /help/opers/whois: -------------------------------------------------------------------------------- 1 | WHOIS [remoteserver|nick] nick 2 | 3 | WHOIS will display detailed user information for 4 | the specified nick. If the first parameter is 5 | specified, WHOIS will display information from 6 | the specified server, or the server that the 7 | user is on. This is how to remotely see 8 | idle time and away status. 9 | -------------------------------------------------------------------------------- /help/opers/user: -------------------------------------------------------------------------------- 1 | USER : 2 | 3 | USER is used during registration to set your gecos 4 | and to set your username if the server cannot get 5 | a valid ident response. The second and third fields 6 | are not used, but there must be something in them. 7 | The reason is backwards compatibility 8 | -------------------------------------------------------------------------------- /help/opers/oper: -------------------------------------------------------------------------------- 1 | OPER 2 | 3 | The OPER command requires two arguments to be given. The first 4 | argument is the name of the operator as specified in the 5 | configuration file. The second argument is the password for 6 | the operator matching the name and host. 7 | 8 | The operator privileges are shown on a sucessful OPER. 9 | -------------------------------------------------------------------------------- /help/opers/resv: -------------------------------------------------------------------------------- 1 | RESV : 2 | 3 | -- RESV a channel or nick 4 | Will create a resv for the given channel/nick, stopping 5 | local users from joining the channel, or using the 6 | nick. Will not affect remote clients. 7 | 8 | If the oper is an admin, they may create a wildcard 9 | resv, for example: clones* 10 | -------------------------------------------------------------------------------- /help/opers/unxline: -------------------------------------------------------------------------------- 1 | # $Id: unxline 33 2005-10-02 20:50:00Z knight $ 2 | UNXLINE 3 | 4 | Removes an XLINE 5 | 6 | UNXLINE ON irc.server 7 | will unxline the gecos on irc.server if irc.server accepts 8 | remote unxlines. If the xline is conf based, the xline 9 | will not be removed. 10 | 11 | - Requires Oper Priv: X 12 | -------------------------------------------------------------------------------- /contrib/help/opers/chgident: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | CHGIDENT [nickname] 3 | 4 | The CHGIDENT command takes two arguments. The first argument is optional and 5 | can be the nickname of a user you wish to alter the ident of. If no 6 | argument for the nickname is supplied it will change your ident instead. 7 | The second argument is the ident you wish to use. 8 | -------------------------------------------------------------------------------- /contrib/help/opers/chgname: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | CHGNAME [nickname] 3 | 4 | The CHGNAME command takes two arguments. The first argument is optional and 5 | can be the nickname of a user you wish to alter the gecos of. If no 6 | argument for the nickname is supplied it will change your gecos instead. 7 | The second argument is the gecos you wish to use. 8 | -------------------------------------------------------------------------------- /help/opers/userhost: -------------------------------------------------------------------------------- 1 | USERHOST 2 | 3 | USERHOST displays the username, hostname, 4 | operator status, and presence of valid ident of 5 | the specified nickname. 6 | 7 | If you use USERHOST on yourself, the hostname 8 | is replaced with the IP you are connecting from. 9 | This is needed to provide DCC support for spoofed 10 | hostnames. 11 | -------------------------------------------------------------------------------- /contrib/help/opers/chghost: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | CHGHOST [nickname] 3 | 4 | The CHGHOST command takes two arguments. The first argument is optional and 5 | can be the nickname of a user you wish to change the host of. If no 6 | argument for the nickname is supplied, then it will change your host instead. 7 | The second argument is the hostname you wish to use. 8 | -------------------------------------------------------------------------------- /contrib/help/opers/jupe: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | JUPE [servername] :[reason] 3 | 4 | The JUPE command takes two arguments. The first argument is the server 5 | you wish to jupe (ban) and the second argument is the reason for the 6 | jupe. Please be aware that the use of this command can be highly dangerous 7 | and can be used to jupe your own servers if you're not careful. 8 | -------------------------------------------------------------------------------- /help/opers/accept: -------------------------------------------------------------------------------- 1 | ACCEPT 2 | 3 | ACCEPT allows you to control who can send you a NOTICE or PRIVMSG 4 | while you have user mode +g enabled. 5 | 6 | For +g: /QUOTE ACCEPT -- Add a permitted nickname 7 | /QUOTE ACCEPT - -- Remove a permitted nickname 8 | /QUOTE ACCEPT * -- List the present permitted nicknames 9 | -------------------------------------------------------------------------------- /servlink/Makefile.am: -------------------------------------------------------------------------------- 1 | MAINTAINERCLEANFILES=Makefile.in 2 | 3 | AM_CPPFLAGS=$(OPENSSL_INCLUDES) -I$(top_srcdir)/include 4 | 5 | bin_PROGRAMS=servlink 6 | 7 | servlink_LDFLAGS=-export-dynamic $(OPENSSL_LDFLAGS) 8 | servlink_LDADD=$(OPENSSL_LIBS) 9 | 10 | servlink_SOURCES=servlink.c io.c control.c 11 | 12 | noinst_HEADERS=servlink.h io.h control.h 13 | -------------------------------------------------------------------------------- /contrib/help/opers/mkpasswd: -------------------------------------------------------------------------------- 1 | # $Id: mkpasswd 570 2006-04-27 21:52:26Z michael $ 2 | MKPASSWD [DES|MD5] 3 | 4 | The MKPASSWD command is essentially the same as the mkpasswd binary 5 | distributed with hybrid. It can make an encrypted password for use 6 | in the ircd.conf using either DES or MD5 encryption, and then give 7 | you the salted result via NOTICE. 8 | -------------------------------------------------------------------------------- /lib/pcre/README: -------------------------------------------------------------------------------- 1 | /* $Id: README 33 2005-10-02 20:50:00Z knight $ */ 2 | 3 | 4 | PCRE (Perl Compatible Regular Expression) library version 6.3 (latest as 5 | of Sep 2, 2005) from http://www.pcre.org hacked up for use in ircd-hybrid. 6 | 7 | Original licensing information and copyright notices can be found in the 8 | LICENCE and AUTHORS files. 9 | 10 | -Michael 11 | -------------------------------------------------------------------------------- /oftc-configure.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -z "$*" ]; then 4 | set -- --prefix=/home/oftc/oftc/testnet-hybrid 5 | fi 6 | 7 | set -x 8 | 9 | ./configure \ 10 | --enable-openssl \ 11 | --disable-profile \ 12 | --enable-assert \ 13 | --enable-zlib \ 14 | --with-nicklen=30 \ 15 | --with-topiclen=390 \ 16 | --disable-halfops \ 17 | --enable-shared-modules \ 18 | "$@" 19 | -------------------------------------------------------------------------------- /contrib/help/opers/forcejoin: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | FORCEJOIN <nickname> <channel> 3 | 4 | The FORCEJOIN command requires two arguments to be given. The first 5 | argument is the nickname of the user you wish to execute the command 6 | on, and the second argument is the destination channel they are to join. 7 | 8 | The command can also be used to force join a user to a channel that does 9 | not exist. 10 | -------------------------------------------------------------------------------- /help/opers/challenge: -------------------------------------------------------------------------------- 1 | CHALLENGE <nick|+response> 2 | 3 | CHALLENGE is used in the RSA controlled 4 | oper {} system. CHALLENGE requires you to 5 | issue the command using the nickname in the 6 | operator block, while matching the username 7 | and hostname specified. The server will 8 | send you an RSA challenge. You must send 9 | a valid RSA response back to the server, 10 | proceeded with a '+' symbol. 11 | -------------------------------------------------------------------------------- /help/opers/trace: -------------------------------------------------------------------------------- 1 | TRACE [server | nick] 2 | 3 | With no argument, TRACE gives a list of all clients connected 4 | to the local server, both users and operators. 5 | 6 | With one argument which is a server, TRACE displays the path 7 | to the specified server, and all clients on that server. 8 | 9 | With one argument which is a client, TRACE displays the 10 | path to that client, and that client's information. 11 | 12 | -------------------------------------------------------------------------------- /help/opers/admin: -------------------------------------------------------------------------------- 1 | ADMIN [server] 2 | 3 | With no arguments, ADMIN shows the information that was set by the 4 | administrator of the server. This information can take any form that 5 | will fit in three lines of text but is usually a list of contacts 6 | for the persons that run the server. 7 | 8 | With a second argument, the administrative information for the 9 | specified server is displayed. 10 | 11 | See also: stats 12 | -------------------------------------------------------------------------------- /contrib/help/opers/ojoin: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | OJOIN [flags]<channel> 3 | 4 | The OJOIN command requires only one argument with optional status flags. 5 | Valid mode flags are @ % and +. This allows operators to join any channel 6 | with the given status. 7 | 8 | Examples: 9 | OJOIN @#secretchan - Will join you to #secretchan with chan ops. 10 | OJOIN +#secretchan - Will join you to #secretchan with voice. 11 | 12 | This also works on local channels as well. 13 | -------------------------------------------------------------------------------- /contrib/help/opers/svsnick: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | SVSNICK <oldnick> <newnick> 3 | 4 | The SVSNICK command is designed to change a user's nickname to something else. 5 | This is mainly to be used by services such as NickServ but can be used for 6 | other purposes. 7 | 8 | If you want to chance nick1 to nick2 for instance you issue the following: 9 | 10 | SVSNICK nick1 nick2 11 | 12 | You won't get a confirmation of the nickname change unless you are +n however. 13 | -------------------------------------------------------------------------------- /help/opers/unkline: -------------------------------------------------------------------------------- 1 | # $Id: unkline 33 2005-10-02 20:50:00Z knight $ 2 | UNKLINE <user@host> 3 | 4 | Will attempt to unkline the given <user@host> 5 | Will unkline a temporary kline. 6 | If the kline is conf based, the kline will not be removed. 7 | 8 | UNKLINE <user@host> ON irc.server 9 | will unkline the user on irc.server if irc.server accepts 10 | remote unklines. If the kline is conf based, the kline will 11 | not be removed. 12 | 13 | - Requires Oper Priv: U 14 | -------------------------------------------------------------------------------- /help/opers/unresv: -------------------------------------------------------------------------------- 1 | # $Id: unresv 33 2005-10-02 20:50:00Z knight $ 2 | UNRESV <channel|nick> 3 | 4 | -- Remove a RESV on a channel or nick 5 | Will attempt to remove the resv for the given 6 | channel/nick. If the resv is conf based, the resv 7 | will not be removed. 8 | 9 | UNRESV <channel|nick> ON irc.server 10 | will unresv the <channel|nick> on irc.server if irc.server 11 | accepts remote unresvs. If the resv is conf based, the resv 12 | will not be removed. 13 | 14 | -------------------------------------------------------------------------------- /tools/win32/kill.c: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | 3 | #include <windows.h> 4 | #include "setup.h" 5 | 6 | int WINAPI 7 | WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, 8 | LPSTR lpCmdLine, int nCmdShow) 9 | { 10 | HWND wndhandle = FindWindow(PACKAGE_NAME, NULL); 11 | 12 | if (!wndhandle) 13 | { 14 | MessageBox(NULL, "ircd-hybrid is not running", NULL, MB_OK | MB_ICONERROR); 15 | return 1; 16 | } 17 | 18 | PostMessage(wndhandle, WM_CLOSE, 0, 0); 19 | } 20 | -------------------------------------------------------------------------------- /help/opers/names: -------------------------------------------------------------------------------- 1 | NAMES [channel] 2 | 3 | With no channel argument, NAMES shows the names (nicks) of all clients 4 | logged in to the server that do not have +i flag. 5 | 6 | With the #channel argument, it displays the nicks on that channel, 7 | also respecting the +i flag of each client. If the channel specified 8 | is a channel that the issuing client is currently in, all nicks are 9 | listed in similar fashion to when the user first joins a channel. 10 | 11 | See also: join 12 | -------------------------------------------------------------------------------- /help/opers/xline: -------------------------------------------------------------------------------- 1 | # $Id: xline 33 2005-10-02 20:50:00Z knight $ 2 | XLINE [time] <gecos> :[reason] 3 | 4 | [time] if present, gives number of minutes for XLINE 5 | 6 | Adds a XLINE to the xline.conf file which 7 | will ban the specified gecos from that server. 8 | The banned client will receive a message saying he/she 9 | is banned with reason [reason] 10 | 11 | XLINE [time] <gecos> ON irc.server :[reason] 12 | will xline the gecos on irc.server if irc.server accepts 13 | remote xlines. 14 | 15 | - Requires Oper Priv: X 16 | -------------------------------------------------------------------------------- /help/users/stats: -------------------------------------------------------------------------------- 1 | STATS <letter> [server|nick] 2 | 3 | Queries server [server] (or your own server if no 4 | server parameter is given) for info corresponding to 5 | <letter>. 6 | 7 | LETTER 8 | ------ (^ = Can be configured to be oper only.) 9 | ^ i - Shows I lines 10 | ^ K - Shows K lines (or matched klines) 11 | ^ k - Shows temporary K lines (or matched temp klines) 12 | m - Shows commands and their usage 13 | ^ o - Shows O/o lines 14 | p - Shows opers connected and their idle times 15 | u - Shows server uptime 16 | -------------------------------------------------------------------------------- /help/users/notice: -------------------------------------------------------------------------------- 1 | NOTICE <nick|channel> :message 2 | 3 | NOTICE will send a notice message to the 4 | user or channel specified. 5 | 6 | NOTICE supports the following prefixes for sending 7 | messages to specific clients in a channel: 8 | 9 | @ - channel operators only 10 | % - channel operators and half-ops 11 | + - operators, half-ops, and voiced users 12 | 13 | The nick can be extended to fit into the following 14 | syntax: 15 | 16 | username@servername 17 | 18 | This syntax is used to securely send a notice to a 19 | service or a bot. 20 | -------------------------------------------------------------------------------- /help/users/privmsg: -------------------------------------------------------------------------------- 1 | PRIVMSG <nick|channel> :message 2 | 3 | PRIVMSG will send a standard message to the 4 | user or channel specified. 5 | 6 | PRIVMSG supports the following prefixes for sending 7 | messages to specific clients in a channel: 8 | 9 | @ - channel operators only 10 | % - channel operators and half-ops 11 | + - operators, half-ops, and voiced users 12 | 13 | The nick can be extended to fit into the following 14 | syntax: 15 | 16 | username@servername 17 | 18 | This syntax is used to securely send a message to a 19 | service or a bot. 20 | -------------------------------------------------------------------------------- /help/opers/join: -------------------------------------------------------------------------------- 1 | # $Id: join 33 2005-10-02 20:50:00Z knight $ 2 | JOIN <#channel1[,#channel2,#channel3...]> [key] 3 | 4 | The JOIN command allows you to enter a public chat area known as 5 | a channel. Network wide channels are proceeded by a '#', while 6 | a local server channel is proceeded by an '&'. You can join more 7 | than one channel at a time, separating their names with comma's (','). 8 | 9 | If the channel has a key set, the second argument must be 10 | given to enter. This allows channels to be password protected. 11 | 12 | See also: part, list 13 | -------------------------------------------------------------------------------- /tools/win32/rehash.c: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | 3 | #include <windows.h> 4 | #include "setup.h" 5 | 6 | #define WM_REHASH (WM_USER + 0x100) 7 | #define WM_REMOTD (WM_USER + 0x101) 8 | 9 | int WINAPI 10 | WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, 11 | LPSTR lpCmdLine, int nCmdShow) 12 | { 13 | HWND wndhandle = FindWindow(PACKAGE_NAME, NULL); 14 | 15 | if (!wndhandle) 16 | { 17 | MessageBox(NULL, "ircd-hybrid is not running", NULL, MB_OK | MB_ICONERROR); 18 | return 1; 19 | } 20 | 21 | PostMessage(wndhandle, WM_REHASH, 0, 0); 22 | } 23 | -------------------------------------------------------------------------------- /tools/win32/remotd.c: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | 3 | #include <windows.h> 4 | #include "setup.h" 5 | 6 | #define WM_REHASH (WM_USER + 0x100) 7 | #define WM_REMOTD (WM_USER + 0x101) 8 | 9 | int WINAPI 10 | WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, 11 | LPSTR lpCmdLine, int nCmdShow) 12 | { 13 | HWND wndhandle = FindWindow(PACKAGE_NAME, NULL); 14 | 15 | if (!wndhandle) 16 | { 17 | MessageBox(NULL, "ircd-hybrid is not running", NULL, MB_OK | MB_ICONERROR); 18 | return 1; 19 | } 20 | 21 | PostMessage(wndhandle, WM_REMOTD, 0, 0); 22 | } 23 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | MAINTAINERCLEANFILES=aclocal.m4 config.h.in config.h.in~ config.guess config.log config.status config.sub configure install-sh missing mkinstalldirs Makefile.in depcomp compile ltmain.sh COPYING 2 | SUBDIRS=libltdl doc etc help include lib messages modules servlink src 3 | ACLOCAL_AMFLAGS=-I m4 4 | EXTRA_DIST = autogen.sh oftc-configure.sh 5 | 6 | maintainer-clean-local: 7 | rm -f ${PACKAGE}-${VERSION}.tar.gz 8 | rm -rf libltdl 9 | 10 | install-data-local: 11 | $(INSTALL) -d $(DESTDIR)${localstatedir}/log 12 | $(INSTALL) -d $(DESTDIR)${localstatedir}/run 13 | -------------------------------------------------------------------------------- /help/opers/gline: -------------------------------------------------------------------------------- 1 | GLINE <user@host> :[reason] 2 | 3 | -- if glines are enabled -- 4 | Attempts to add a global IRC-network wide ban on 5 | <user@host> for the reason [reason]. 6 | 7 | It takes three different opers on three different 8 | servers to do the same GLINE within a short interval, 9 | to have a GLINE triggered for a compiled time of hours. 10 | 11 | GLINE user@ip.ip.ip.ip 12 | will gline the user at the unresolved ip. 13 | ip.ip.ip.ip can be in CIDR form i.e. 192.168.0.0/24 14 | or 192.168.0.* (which is converted to CIDR form internally) 15 | 16 | - Requires Oper Priv: G 17 | -------------------------------------------------------------------------------- /lib/pcre/AUTHORS: -------------------------------------------------------------------------------- 1 | /* $Id: AUTHORS 33 2005-10-02 20:50:00Z knight $ */ 2 | 3 | THE MAIN PCRE LIBRARY 4 | --------------------- 5 | 6 | Written by: Philip Hazel 7 | Email local part: ph10 8 | Email domain: cam.ac.uk 9 | 10 | University of Cambridge Computing Service, 11 | Cambridge, England. Phone: +44 1223 334714. 12 | 13 | Copyright (c) 1997-2005 University of Cambridge 14 | All rights reserved 15 | 16 | 17 | THE C++ WRAPPER LIBRARY 18 | ----------------------- 19 | 20 | Written by: Google Inc. 21 | 22 | Copyright (c) 2005 Google Inc 23 | All rights reserved 24 | 25 | #### 26 | -------------------------------------------------------------------------------- /help/opers/connect: -------------------------------------------------------------------------------- 1 | CONNECT <server_A> [port] [server_B] 2 | 3 | When [server_B] is used, CONNECT asks [server_B] to 4 | connect to <server_A>. Requires Oper Priv: R 5 | 6 | The [port] must be specified with [server_B], this is 7 | usually 6667. To use the default port in the connect 8 | block, you can use 0 as the port. 9 | 10 | When [server_B] is not used, CONNECT tries to connect 11 | your server to <server_A>. 12 | 13 | When [port] is used, the connection will be attempted 14 | to [port]. 15 | When [port] is not used, 6667 is used as a default, 16 | unless the port is specified in the conf file. 17 | -------------------------------------------------------------------------------- /help/opers/links: -------------------------------------------------------------------------------- 1 | LINKS [mask] [remote] 2 | 3 | LINKS shows a list of all servers linked to the host server. 4 | 5 | With a mask parameter, LINKS will just show servers matching 6 | that parameter. With the remote server parameter, LINKS will 7 | request the LINKS data from the remote server, matching the 8 | mask given. 9 | 10 | The information provided by the LINKS command can be helpful 11 | for determining the overall shape of the network in addition to 12 | it's size. 13 | 14 | NOTE: the links command employs an intensive process to generate 15 | it's output, so sparing use is recommended. 16 | 17 | See also: connect squit 18 | -------------------------------------------------------------------------------- /contrib/help/users/index: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | Help topics available to users: 3 | 4 | ACCEPT ADMIN AWAY CHALLENGE 5 | CMODE ERROR FLAGS HELP 6 | INFO INVITE ISON JOIN 7 | KICK KNOCK LINKS LIST 8 | LUSERS MAP MOTD NAMES 9 | NICK NOTICE OPER PART 10 | PASS PING PONG PRIVMSG 11 | QUIT STATS TIME TOPIC 12 | UMODE USER USERHOST USERS 13 | VERSION WHO WHOIS WHOWAS 14 | -------------------------------------------------------------------------------- /help/Makefile.am: -------------------------------------------------------------------------------- 1 | MAINTAINERCLEANFILES=Makefile.in 2 | SUBDIRS=opers users 3 | ohelpdir=$(datadir)/@PACKAGE@/help/opers 4 | uhelpdir=$(datadir)/@PACKAGE@/help/users 5 | 6 | SYMLINKS=topic accept cmode admin names links away whowas \ 7 | version kick who invite quit join list nick oper part \ 8 | time motd userhost users whois ison lusers user help \ 9 | challenge map pass error knock ping pong 10 | 11 | install-exec-hook: 12 | chmod u+w $(uhelpdir) # work around write-protected directory in "make distcheck" 13 | @set -e; for link in $(SYMLINKS); do \ 14 | rm -f $(uhelpdir)/$$link; \ 15 | ln -s $(ohelpdir)/$$link $(uhelpdir); \ 16 | done 17 | -------------------------------------------------------------------------------- /help/users/index: -------------------------------------------------------------------------------- 1 | # $Id: index 33 2005-10-02 20:50:00Z knight $ 2 | Help topics available to users: 3 | 4 | ACCEPT ADMIN AWAY CHALLENGE 5 | CMODE ERROR HELP INFO 6 | INVITE ISON JOIN KICK 7 | KNOCK LINKS LIST LUSERS 8 | MAP MOTD NAMES NICK 9 | NOTICE OPER PART PASS 10 | PING PONG PRIVMSG QUIT 11 | STATS TIME TOPIC UMODE 12 | USER USERHOST USERS VERSION 13 | WHO WHOIS WHOWAS 14 | -------------------------------------------------------------------------------- /tools/README: -------------------------------------------------------------------------------- 1 | $Id$ 2 | 3 | A directory of support programs for ircd. 4 | 5 | encspeed.c - test the speed of various encryption algorithms used in 6 | cryptlinks 7 | mkkeypair - a small program used for generating a public and private 8 | key pair 9 | mkpasswd.c - makes password for O lines 10 | rsa_respond/ - a tool to generate an RSA response to the challenge asked 11 | by the server, and a tool to generate a keypair for the 12 | C/R system 13 | Source moved to https://github.com/oftc/oftc-hybrid-respond 14 | untabify - converts tab characters to a specific number of spaces 15 | -------------------------------------------------------------------------------- /help/opers/dline: -------------------------------------------------------------------------------- 1 | # $Id: dline 33 2005-10-02 20:50:00Z knight $ 2 | DLINE <time> <nick|ip> :[reason] [| oper reason] 3 | 4 | <time> if present, gives number of minutes for DLINE 5 | 6 | Adds a DLINE to the dline.conf file 7 | which will deny any connections from the IP address 8 | of the banned client. The banned client will receive 9 | a message saying he/she is banned with reason [reason] 10 | 11 | If an oper reason is added (the pipe must be specified 12 | to separate the fields) this will be added into the 13 | dline.conf but will not be shown to the user when they 14 | are given the dline reason. 15 | 16 | In order to use <nick> rather than <ip>, <nick> must 17 | be on your server. 18 | 19 | - Requires Oper Priv: K 20 | -------------------------------------------------------------------------------- /contrib/help/opers/flags: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | FLAGS [-|+ flag] 3 | 4 | The FLAGS command is designed to enable or disable user mode flags in plain english. 5 | The idea is to make it easier to toggle flags without having to remember their letter. 6 | 7 | If you run FLAGS without any extra parameters or arguments you'll get an example listing: 8 | 9 | --- Current flags: OWALLOPS SWALLOPS OKILLS SKILLS SNOTICES THROTTLES LWALLOPS CONNECTS SQUITS 10 | FULL INVISIBLE BOTS CALLERID 11 | --- Current missing flags: STATSNOTICES CLICONNECTS CLIDISCONNECTS IPMISMATCHES UNAUTH DEBUG NICKCHANGES 12 | 13 | So if you want to enable NICKCHANGES (+n) for instance you do 14 | 15 | FLAGS +NICKCHANGES and you can disable it with FLAGS -NICKCHANGES 16 | -------------------------------------------------------------------------------- /m4/options.m4: -------------------------------------------------------------------------------- 1 | AC_DEFUN([AX_ARG_ENABLE_DEBUGGING],[ 2 | AC_ARG_ENABLE([debugging], 3 | [AC_HELP_STRING([--enable-debugging],[Enable debugging.])], 4 | [debugging="$enableval"],[debugging="no"]) 5 | if test "$debugging" = "yes" ; then 6 | AC_DEFINE([DEBUG],[1],[Define to 1 to enable debugging.]) 7 | CFLAGS="$CFLAGS -O0" 8 | else 9 | AC_DEFINE([NDEBUG],[1],[Define to 1 to disable debugging.]) 10 | CFLAGS="$CFLAGS -O2" 11 | fi 12 | ]) 13 | 14 | AC_DEFUN([AX_ARG_ENABLE_PROFILING],[ 15 | AC_ARG_ENABLE([profiling], 16 | [AC_HELP_STRING([--enable-profiling],[Enable profiling.])], 17 | [profiling="$enableval"],[profiling="no"]) 18 | if test "$profiling" = "yes" ; then 19 | CFLAGS="$CFLAGS --coverage" 20 | fi 21 | ]) 22 | 23 | -------------------------------------------------------------------------------- /help/opers/rkline: -------------------------------------------------------------------------------- 1 | # $Id: rkline 33 2005-10-02 20:50:00Z knight $ 2 | RKLINE [time] <mask> [ON <server>] :[reason] 3 | 4 | [time] if present, gives number of minutes for temporary RXLINE 5 | 6 | Adds a regular expression RKLINE to the rkline.conf file which 7 | will ban the specified regex mask from that server. 8 | The banned client will receive a message saying he/she 9 | is banned with reason [reason] 10 | 11 | regular expression examples: 12 | rkline ^O[[:alpha:]]?[[:digit:]]+(x\.o|\.xo)$@^[[:alnum:]]{4}\.evilnet.org$ 13 | 14 | Note: The mask has to be a valid regular expression based on user@host mask 15 | 16 | See: http://en.wikipedia.org/wiki/Regular_expression 17 | http://www.pcre.org/pcre.txt 18 | 19 | If ON server is present, the RKLINE is propagated to given server. 20 | 21 | - Requires Oper Priv: admin, kline 22 | -------------------------------------------------------------------------------- /help/users/umode: -------------------------------------------------------------------------------- 1 | # $Id: umode 33 2005-10-02 20:50:00Z knight $ 2 | MODE <nick> <+|-><modes> 3 | 4 | Usermodes: 5 | 6 | USERMODE DESCRIPTION 7 | ----------------------------------------------------------------- 8 | +o - Designates this client is an IRC Operator. 9 | Use the /oper command to attain this. 10 | +i - Designates this client 'invisible'. 11 | +D - "deaf": don't receive channel messages 12 | +G - "soft caller id": block private messages from people not on 13 | any common channels with you (unless they are /accept'ed) 14 | +g - "caller id" mode: only allow /accept clients to message you 15 | +j - "registered caller id": block private messages from people 16 | not registered with nickserv (+R) or on your /accept list 17 | -------------------------------------------------------------------------------- /help/opers/rxline: -------------------------------------------------------------------------------- 1 | # $Id: rxline 33 2005-10-02 20:50:00Z knight $ 2 | RXLINE [time] <mask> [ON <server>] :[reason] 3 | 4 | [time] if present, gives number of minutes for temporary RXLINE 5 | 6 | Adds a regular expression XLINE to the rxline.conf file which 7 | will ban the specified gecos from that server. 8 | The banned client will receive a message saying he/she 9 | is banned with reason [reason] 10 | 11 | regular expression examples: 12 | RXLINE ^bot*bot$ 13 | To rxline with a space: 14 | RXLINE ^bot[[:space:]]bot$ Where "space" is the written word "space", or 15 | RXLINE ^bot\sbot$ 16 | 17 | RXLINE ^(?i)bot\sbot$ for case insensitive regex matching. 18 | 19 | See: http://en.wikipedia.org/wiki/Regular_expression 20 | http://www.pcre.org/pcre.txt 21 | 22 | If ON server is present, the RXLINE is propagated to given server. 23 | 24 | - Requires Oper Priv: admin, xline 25 | -------------------------------------------------------------------------------- /contrib/help/opers/spoof: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | SPOOF <user@hostname> <free.form.spoof|-> [flags|- [password]] 3 | 4 | The SPOOF command allows you to create free form auth {} spoofs for 5 | various users on the fly and can propegate to other servers. It can 6 | also append existant spoofs as well. To use the SPOOF command here 7 | is an example if I want to spoof god@10.0.0.10: 8 | 9 | You also need to make sure to have .include "spoof.conf" in your ircd.conf 10 | 11 | SPOOF *god@10.0.0.* i.hate.packets 12 | 13 | That will give him the spoof. However you can specify flags as well: 14 | 15 | t (no_tilde), i (need_ident), k (kline_exempt), g (gline_exempt), 16 | l (exceed_limit), o (class = "opers"), f (can_flood), p (need_password) 17 | 18 | So if I want to give god a spoof but exempt him from K-Lines and G-Lines: 19 | 20 | SPOOF *god@10.0.0.* i.hate.packets kg 21 | 22 | Will give god K-Line and G-Line exemptions. 23 | -------------------------------------------------------------------------------- /include/rlimits.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * rlimits.h: sidestep configure test for RLIMIT_* values. 4 | * 5 | * This code is in the public domain. 6 | * 7 | * $Id: rlimits.h 33 2005-10-02 20:50:00Z knight $ 8 | */ 9 | 10 | #ifndef INCLUDED_rlimits_h 11 | #define INCLUDED_rlimits_h 12 | 13 | #ifdef HAVE_SYS_RESOURCE_H 14 | #include <sys/resource.h> 15 | 16 | /* This nest of #ifdefs is because not all 'cpp's support #elif */ 17 | 18 | #ifdef RLIMIT_FDMAX 19 | # define RLIMIT_FD_MAX RLIMIT_FDMAX 20 | #else 21 | # ifdef RLIMIT_NOFILE 22 | # define RLIMIT_FD_MAX RLIMIT_NOFILE 23 | # else 24 | # ifdef RLIMIT_OPEN_MAX 25 | # define RLIMIT_FD_MAX RLIMIT_OPEN_MAX 26 | # else 27 | # warning No file descriptor limit was found 28 | # endif 29 | # endif 30 | #endif 31 | 32 | #endif /* HAVE_SYS_RESOURCE_H */ 33 | 34 | #endif /* INCLUDED_rlimits_h */ 35 | -------------------------------------------------------------------------------- /m4/compiler.m4: -------------------------------------------------------------------------------- 1 | dnl @synopsis C_FLAGS_CHECK [compiler flags] 2 | dnl @summary check whether compiler supports given C flags or not 3 | AC_DEFUN([C_FLAGS_CHECK], 4 | [dnl 5 | AC_MSG_CHECKING([if $CC supports $1]) 6 | AC_LANG_PUSH([C]) 7 | ac_saved_cflags="$CFLAGS" 8 | CFLAGS="-Werror $1" 9 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]])], 10 | [ 11 | AC_MSG_RESULT([yes]) 12 | CFLAGS="$ac_saved_cflags $1" 13 | ], 14 | [ 15 | AC_MSG_RESULT([no]) 16 | CFLAGS="$ac_saved_cflags" 17 | ] 18 | ) 19 | AC_LANG_POP([C]) 20 | ]) 21 | -------------------------------------------------------------------------------- /help/opers/list: -------------------------------------------------------------------------------- 1 | LIST [options] 2 | 3 | Without any arguments, LIST will give an entire list of all 4 | channels which are not set as secret (+s). The list will be in 5 | the form: 6 | 7 | <#channel> <amount of users> :[topic] 8 | 9 | If you want to use a specific filter, you can pass one or more 10 | options separated by commas (','). Recognized options are: 11 | *mask* List channels matching *mask* 12 | !*mask* List channels NOT matching *mask* 13 | >num Show only channels which contain more than <num> users 14 | <num Show only channels which contain less than <num> users 15 | C>num Display channels created within last <num> minutes 16 | C<num Display channels created earlier than <num> minutes ago 17 | T>num Limit matches to those channels whose topics are older 18 | than <num> minutes 19 | T<num Limit matches to those channels whose topics have been 20 | changed within last <num> minutes 21 | 22 | To stop a running LIST request, use /LIST command again. 23 | 24 | See also: join 25 | -------------------------------------------------------------------------------- /help/opers/notice: -------------------------------------------------------------------------------- 1 | NOTICE <nick|channel> :message 2 | 3 | NOTICE will send a notice message to the 4 | user or channel specified. 5 | 6 | NOTICE supports the following prefixes for sending 7 | messages to specific clients in a channel: 8 | 9 | @ - channel operators only 10 | % - channel operators and half-ops 11 | + - operators, half-ops, and voiced users 12 | 13 | Two other targets are permitted: 14 | 15 | $$servermask - Send a message to a server or set of 16 | servers 17 | $#hostmask - Send a message to users matching the 18 | hostmask specified. 19 | 20 | These two are operator only. 21 | 22 | The nick can be extended to fit into the following 23 | syntax: 24 | 25 | username[%hostname]@servername 26 | 27 | This syntax (without the hostname) is used to securely 28 | send a message to a service or a bot. 29 | 30 | An extension of this is the syntax to send to all opers 31 | on a server. 32 | 33 | opers@servername 34 | 35 | In Hybrid 7, all opers on a server will see a message that 36 | looks like a modified WALLOPS 37 | -------------------------------------------------------------------------------- /help/opers/privmsg: -------------------------------------------------------------------------------- 1 | PRIVMSG <nick1|channel1[,nick2|channel2...]> :message 2 | 3 | PRIVMSG will send a standard message to the 4 | user or channel specified. 5 | 6 | PRIVMSG supports the following prefixes for sending 7 | messages to specific clients in a channel: 8 | 9 | @ - channel operators only 10 | % - channel operators and half-ops 11 | + - operators, half-ops, and voiced users 12 | 13 | Two other targets are permitted: 14 | 15 | $$servermask - Send a message to a server or set of 16 | servers 17 | $#hostmask - Send a message to users matching the 18 | hostmask specified. 19 | 20 | These two are operator only. 21 | 22 | The nick can be extended to fit into the following 23 | syntax: 24 | 25 | username[%hostname]@servername 26 | 27 | This syntax (without the hostname) is used to securely 28 | send a message to a service or a bot. 29 | 30 | An extension of this is the syntax to send to all opers 31 | on a server. 32 | 33 | opers@servername 34 | 35 | In Hybrid 7, all opers on a server will see a message that 36 | looks like a modified WALLOPS 37 | -------------------------------------------------------------------------------- /doc/technical/file-management.txt: -------------------------------------------------------------------------------- 1 | Overview of the file management subsystem 2 | Adrian Chadd <adrian@creative.net.au> 3 | 4 | $Id$ 5 | 6 | File operations 7 | --------------- 8 | 9 | The file operations are also wrapped through file_open() and file_close() 10 | which handle calling fd_open() / fd_close() and tracking the filedescriptors 11 | correctly. fbopen() / fbclose() use file_open() / file_close() too. 12 | 13 | fileio.c defines the functions: 14 | 15 | int 16 | file_open(const char *filename, int mode, int fmode) 17 | 18 | A wrapper around open(filename, flags, mode). Read the open manpage for 19 | information. file_open() enforces filedescriptor limits and tags the FD 20 | through fd_open(). 21 | 22 | void 23 | file_close(int fd) 24 | 25 | A wrapper around close() for files. close() handles fd_close()ing the fd. 26 | 27 | 28 | FBFILE * 29 | fbopen(const char *filename, const char *mode) 30 | 31 | void 32 | fbclose(FBFILE *fb) 33 | 34 | These are the 'buffered disk IO' routines. You can read the code yourself. 35 | Note that these routines use file_open() and file_close(). 36 | -------------------------------------------------------------------------------- /include/patchlevel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * patchlevel.h: A header defining the patchlevel. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id$ 23 | */ 24 | 25 | #ifndef PATCHLEVEL 26 | #define PATCHLEVEL "hybrid-7.2.2+oftc1.7.3" 27 | #endif 28 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.so* 3 | *.a 4 | .depend 5 | Makefile 6 | config.log 7 | config.status 8 | y.tab.* 9 | lex.yy.c 10 | src/ircd 11 | servlink/servlink 12 | include/setup.h 13 | include/serno.h 14 | *.la 15 | *.lo 16 | .deps 17 | ylwrap 18 | missing 19 | m4 20 | config.sub 21 | config.guess 22 | ltmain.sh 23 | .libs 24 | Makefile.in 25 | autom4te.cache 26 | compile 27 | config.guess 28 | config.sub 29 | *~ 30 | *.swp 31 | missing 32 | ltmain.sh 33 | ylwrap 34 | libtool 35 | aclocal.m4 36 | configure 37 | depcomp 38 | include/setup.h.in 39 | autom4te.cache 40 | help/opers/Makefile.in 41 | help/users/Makefile.in 42 | include/Makefile.in 43 | include/config.h 44 | include/config.h.in 45 | include/stamp-h1 46 | install-sh 47 | libltdl 48 | src/ircd_parser.c 49 | src/ircd_parser.h 50 | src/ircd_lexer.c 51 | m4/argz.m4 52 | m4/libtool.m4 53 | m4/ltdl.m4 54 | m4/ltoptions.m4 55 | m4/ltsugar.m4 56 | m4/ltversion.m4 57 | m4/lt~obsolete.m4 58 | 59 | autom4te.cache 60 | help/opers/Makefile.in 61 | help/users/Makefile.in 62 | include/Makefile.in 63 | include/config.h 64 | include/config.h.in 65 | include/stamp-h1 66 | .dirstamp 67 | */*.dSYM 68 | build 69 | -------------------------------------------------------------------------------- /help/opers/kline: -------------------------------------------------------------------------------- 1 | # $Id: kline 33 2005-10-02 20:50:00Z knight $ 2 | KLINE [time] <nick|user@host> :[reason] [| oper reason] 3 | 4 | [time] if present, gives number of minutes for KLINE 5 | 6 | Adds a KLINE to the kline.conf file which 7 | will ban the specified user from using that server. 8 | The banned client will receive a message saying he/she 9 | is banned with reason [reason] 10 | 11 | If an oper reason is added (the pipe must be specified 12 | to separate the fields) this will be added into the 13 | kline.conf but will not be shown to the user when they 14 | are given the kline reason. 15 | 16 | KLINE user@ip.ip.ip.ip :[reason] [| oper reason] 17 | will kline the user at the unresolved ip. 18 | ip.ip.ip.ip can be in CIDR form i.e. 192.168.0.0/24 19 | or 192.168.0.* (which is converted to CIDR form internally) 20 | 21 | For a temporary KLINE, length of kline is given in 22 | minutes as the first parameter [time] i.e. 23 | KLINE 10 <nick|user@host> :cool off for 10 minutes 24 | 25 | KLINE <user@host> ON irc.server :[reason] [| oper reason] 26 | will kline the user on irc.server if irc.server accepts 27 | remote klines. 28 | 29 | - Requires Oper Priv: K 30 | -------------------------------------------------------------------------------- /include/ircd_signal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * ircd_signal.h: A header for ircd signals. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id$ 23 | */ 24 | 25 | #ifndef INCLUDED_ircd_signal_h 26 | #define INCLUDED_ircd_signal_h 27 | 28 | extern void setup_signals(void); 29 | 30 | #endif /* INCLUDED_ircd_signal_h */ 31 | 32 | -------------------------------------------------------------------------------- /include/restart.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * restart.h: A header with restart functions. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id$ 23 | */ 24 | 25 | #ifndef INCLUDED_restart_h 26 | #define INCLUDED_restart_h 27 | 28 | extern void restart(const char *); 29 | extern void server_die(const char *, int); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /.github/workflows/ci.yaml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: 6 | - develop 7 | - master 8 | pull_request: 9 | branches: 10 | - develop 11 | - master 12 | 13 | jobs: 14 | linux: 15 | name: Linux 16 | 17 | runs-on: ${{ matrix.os }} 18 | 19 | strategy: 20 | fail-fast: false 21 | matrix: 22 | os: 23 | - ubuntu-20.04 24 | compiler: 25 | - gcc-10 26 | 27 | env: 28 | CC: ${{ matrix.compiler }} 29 | 30 | steps: 31 | - name: Install dependencies 32 | run: | 33 | sudo apt-get update 34 | sudo apt-get install -y --no-install-recommends \ 35 | ${CC} \ 36 | autoconf \ 37 | automake \ 38 | bison \ 39 | flex \ 40 | libtool \ 41 | libltdl-dev \ 42 | libssl-dev \ 43 | zlib1g-dev \ 44 | # EOF 45 | - uses: actions/checkout@v2 46 | with: 47 | fetch-depth: 0 48 | - name: autogen.sh 49 | run: bash autogen.sh --prefix=${RUNNER_TEMP}/hybrid 50 | - name: make 51 | run: make 52 | - name: make install 53 | run: make install 54 | -------------------------------------------------------------------------------- /doc/technical/index.txt: -------------------------------------------------------------------------------- 1 | $Id$ 2 | ----------------------------------------------- 3 | 4 | Technical Documentation for ircd-hybrid-7 5 | 6 | 7 | Persistent_Clients.txt - A global UID and Persistent client (with cookies) 8 | proposal 9 | README.openssl - Information for users who have problems with 10 | Hybrid, OpenSSL, and their operating system 11 | cryptlink.txt - Outline of CRYPTLINK protocol 12 | event.txt - Outline of the event system 13 | fd-management.txt - Outline of the file descriptor management system 14 | file-management.txt - Outline of the disk file management system 15 | hostmask.txt - Outline of hostmask handling 16 | network.txt - Outline of the network traffic subsystem 17 | rfc1459.txt - The IRC RFC 18 | rfc2812.txt - The IRC Client RFC 19 | rfc2813.txt - The IRC Server RFC 20 | send.txt - Document on all of the send_to functions 21 | ts3.txt - TSora Version 3 Protocol 22 | ts5.txt - TSora Version 5 Protocol 23 | ts6.txt - TSora Version 6 Protocol 24 | whats-new-code.txt - Whats changed in the code 25 | -------------------------------------------------------------------------------- /include/list.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * list.h: A header for the code in list.c. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id: list.h 33 2005-10-02 20:50:00Z knight $ 23 | */ 24 | 25 | #ifndef INCLUDED_list_h 26 | #define INCLUDED_list_h 27 | 28 | extern void init_dlink_nodes(void); 29 | extern void free_dlink_node(dlink_node *); 30 | extern dlink_node *make_dlink_node(void); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /help/opers/who: -------------------------------------------------------------------------------- 1 | WHO <#channel|user> 2 | 3 | The WHO command displays information about a user, 4 | such as their GECOS information, their user@host, 5 | whether they are an IRC operator or not, etc. A 6 | sample WHO result from a command issued like 7 | "WHO pokey" may look something like this: 8 | 9 | #lamers pokey H pokey@ppp.newbies.net :0 Jim Jones 10 | 11 | The first field indicates the last channel the user 12 | has joined. The second is the user's nickname. 13 | The third field describes the status information about 14 | the user. The possible combinations for this field 15 | are listed below: 16 | 17 | H - The user is not away. 18 | A - The user is set away. 19 | * - The user is an IRC operator. 20 | @ - The user is a channel op in the channel listed 21 | in the first field. 22 | + - The user is voiced in the channel listed. 23 | % - The user is a half-op in the channel listed. 24 | 25 | The next field contains the username@host of the user. 26 | The final field displays the number of server hops and 27 | the user's GECOS information. 28 | 29 | This command may be executed on a channel, such as 30 | "WHO #lamers" The output will consist of WHO 31 | listings for each user on the channel. 32 | 33 | This command may also be used in conjunction with wildcards 34 | such as * and ?. 35 | 36 | See also: whois, userhost 37 | -------------------------------------------------------------------------------- /contrib/help/Makefile.in: -------------------------------------------------------------------------------- 1 | # Makefile to install help files 2 | # $Id$ 3 | 4 | INSTALL= @INSTALL@ 5 | INSTALL_DATA= @INSTALL_DATA@ 6 | RM= @RM@ 7 | 8 | prefix= @prefix@ 9 | exec_prefix= @execprefix@ 10 | datarootdir = $(DESTDIR)@datarootdir@ 11 | uhelpdir= ${prefix}/help/users 12 | ohelpdir= ${prefix}/help/opers 13 | 14 | SYMLINKS= topic accept cmode admin names links away whowas \ 15 | version kick who invite quit join list nick oper part \ 16 | time motd userhost users whois ison lusers user help \ 17 | pass error challenge knock ping pong flags 18 | all: 19 | build: 20 | clean: 21 | depend: 22 | 23 | install: 24 | @echo installing help files... 25 | -@if test ! -d $(prefix)/help; then \ 26 | echo "mkdir $(prefix)/help"; \ 27 | mkdir $(prefix)/help; \ 28 | echo "mkdir $(prefix)/help/users"; \ 29 | mkdir $(prefix)/help/users; \ 30 | echo "mkdir $(prefix)/help/opers"; \ 31 | mkdir $(prefix)/help/opers; \ 32 | fi 33 | @for help in opers/*; do \ 34 | if [ -f $$help ]; then \ 35 | ${INSTALL_DATA} $$help $(ohelpdir); \ 36 | fi \ 37 | done 38 | @for help in users/*; do \ 39 | if [ -f $$help ]; then \ 40 | $(INSTALL_DATA) $$help $(uhelpdir); \ 41 | fi \ 42 | done 43 | @for link in $(SYMLINKS); do \ 44 | rm -f $(uhelpdir)/$$link; \ 45 | ln -s $(ohelpdir)/$$link $(uhelpdir); \ 46 | done 47 | 48 | distclean: 49 | ${RM} -f Makefile 50 | 51 | depend: 52 | -------------------------------------------------------------------------------- /include/rsa.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * rsa.h: A header for the RSA functions. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id$ 23 | */ 24 | #ifndef INCLUDED_rsa_h 25 | #define INCLUDED_rsa_h 26 | 27 | #include "setup.h" 28 | 29 | #ifdef HAVE_LIBCRYPTO 30 | extern void report_crypto_errors(void); 31 | extern int verify_private_key(void); 32 | extern int generate_challenge(char **, char **, RSA *); 33 | extern int get_randomness(unsigned char *, int); 34 | #endif 35 | 36 | #endif /* INCLUDED_rsa_h */ 37 | 38 | -------------------------------------------------------------------------------- /doc/index.txt: -------------------------------------------------------------------------------- 1 | $Id$ 2 | ----------------------------------------------- 3 | 4 | Documentation for ircd-hybrid 5 | 6 | CIDR.txt - Description of CIDR in IPv4 7 | LazyLinks.txt - The lazylinks leaf concept 8 | challenge.txt - Overview of the challenge/response system for 9 | obtaining operator status 10 | guidelines.txt - Documentation guidelines 11 | index.txt - This file 12 | ircd.8 - The new revised manpage, read with the following 13 | commands in the prefix directory: 14 | man -M . ircd 15 | kline.txt - Outline of the remote K-line protocol for both 16 | opers and servers 17 | messages.txt - A general help file for users and admins to 18 | customize ircd's messages. 19 | modeg.txt - An in depth description of the server side silence 20 | user mode (+g) 21 | modes.txt - A list of all user and channel modes 22 | operguide.txt - EFnet operator's guide 23 | opermyth.txt - Oper myth's, describes what opers can and cannot do 24 | resv.txt - Outline of the RESV command. 25 | server-version-info - Overview of the flags shown in /version 26 | serverhide.txt - Information about the server hide options 27 | whats-new.txt - What new features are available 28 | -------------------------------------------------------------------------------- /doc/technical/fd-management.txt: -------------------------------------------------------------------------------- 1 | Overview of the filedescriptor subsystem 2 | Adrian Chadd <adrian@creative.net.au> 3 | 4 | $Id$ 5 | 6 | 7 | Filedescriptor lists 8 | -------------------- 9 | 10 | The filedescriptor list is managed through the routines in fdlist.c . 11 | These include: 12 | 13 | fd_open() - tag an FD as "open" and active 14 | fd_close() - tag an FD as "closed" and close() the filedescriptor 15 | fd_note() - update the filedescriptor tag 16 | 17 | You can get the current list of open filedescriptors through /stats F as 18 | an oper. 19 | 20 | 21 | 22 | FD lists 23 | -------- 24 | 25 | The FD list support is very alpha. There are a few lists defined: 26 | 27 | typedef enum fdlist_t { 28 | FDLIST_NONE, 29 | FDLIST_SERVICE, 30 | FDLIST_SERVER, 31 | FDLIST_IDLECLIENT, 32 | FDLIST_BUSYCLIENT, 33 | FDLIST_MAX 34 | } fdlist_t; 35 | 36 | FDLIST_NONE Not on any list (ie close()d) 37 | FDLIST_SERVICE A service - listen() sockets, resolver, etc 38 | FDLIST_SERVER Server connections 39 | FDLIST_IDLECLIENT An idle client 40 | FDLIST_BUSYCLIENT A busy client 41 | FDLIST_MAX Used for bounds checking 42 | 43 | The idea is that the SERVICE sockets need polling frequently, the SERVER 44 | sockets also need polling frequently, BUSYCLIENT is for busy clients 45 | which need frequent polling (eg we're trying to write to them), and 46 | IDLECLIENT is for clients which we don't need to poll frequently. 47 | THIS hasn't been decided upon yet. 48 | -------------------------------------------------------------------------------- /help/opers/index: -------------------------------------------------------------------------------- 1 | # $Id: index 33 2005-10-02 20:50:00Z knight $ 2 | Help topics available to opers only: 3 | 4 | CAPAB CBURST CLIENT CLOSE 5 | CONNECT CRYPTLINK DIE DLINE 6 | DROP EOB ETRACE GLINE 7 | HASH KILL KLINE KNOCKLL 8 | LLJOIN LLNICK LOCOPS MODLIST 9 | MODLOAD MODRESTART MODUNLOAD NBURST 10 | NOTICE OMOTD OPERWALL POST 11 | PRIVMSG REHASH RESTART RESV 12 | RKLINE RXLINE SERVER SET 13 | SJOIN SQUIT STATS SVINFO 14 | TESTGECOS TESTLINE TESTMASK TRACE 15 | UHELP UMODE UNDLINE UNGLINE 16 | UNKLINE UNRESV UNXLINE WALLOPS 17 | XLINE 18 | 19 | Help topics available to users: 20 | 21 | ACCEPT ADMIN AWAY CHALLENGE 22 | CMODE ERROR HELP INFO 23 | INVITE ISON JOIN KICK 24 | KNOCK LINKS LIST LUSERS 25 | MAP MOTD NAMES NICK 26 | NOTICE OPER PART PASS 27 | PING PONG PRIVMSG QUIT 28 | STATS TIME TOPIC UMODE 29 | USER USERHOST USERS VERSION 30 | WHO WHOIS WHOWAS 31 | -------------------------------------------------------------------------------- /include/parse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * parse.h: A header for the message parser. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id$ 23 | */ 24 | 25 | #ifndef INCLUDED_parse_h 26 | #define INCLUDED_parse_h 27 | 28 | struct Message; 29 | struct Client; 30 | 31 | extern void parse(struct Client *, char *, char *); 32 | extern void clear_tree_parse(void); 33 | extern void mod_add_cmd(struct Message *); 34 | extern void mod_del_cmd(struct Message *); 35 | extern struct Message *find_command(const char *); 36 | extern void report_messages(struct Client *); 37 | 38 | #endif /* INCLUDED_parse_h */ 39 | -------------------------------------------------------------------------------- /tools/mkkeypair: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # $Id$ 3 | # 4 | # mkkeypair - short shell script to generate a OpenSSL RSA key suitable 5 | # for use with cryptlinks. 6 | # 7 | # (C) 2003 Joshua Kwan and the IRCD-Hybrid team 8 | # See LICENSE for the terms of copying. 9 | 10 | if test -f rsa.key; then 11 | echo Moving old key out of the way to rsa.key.old 12 | mv rsa.key rsa.key.old 13 | fi 14 | 15 | if test -f rsa.pub; then 16 | echo Moving old public key out of the way to rsa.pub.old 17 | mv rsa.pub rsa.pub.old 18 | fi 19 | 20 | echo Generating random bytes 21 | 22 | if test -c /dev/urandom; then 23 | RANDGEN=/dev/urandom 24 | elif test -c /dev/random; then 25 | RANDGEN=/dev/random 26 | else 27 | RANDGEN=input 28 | fi 29 | 30 | if test "$RANDGEN" = input; then 31 | echo "Your system doesn't have a suitable random data generator," 32 | echo "so type 150 characters of gibberish here to simulate it." 33 | read -n 150 randomdata 34 | echo 35 | echo "$randomdata" > randdata 36 | sort < randdata >> randdata.1 37 | cat randdata.1 >> randdata 38 | rm -f randdata.1 39 | else 40 | dd if=$RANDGEN of=randdata count=1 bs=2048 41 | fi 42 | 43 | echo Creating the private key. 44 | openssl genrsa -rand randdata -out rsa.key 2048 || exit 1 45 | chmod 600 rsa.key 46 | echo Creating the public key from the private key. 47 | openssl rsa -in rsa.key -out rsa.pub -pubout || exit 1 48 | chmod 644 rsa.pub 49 | 50 | echo 51 | echo Private key now exists as rsa.key 52 | echo Public key now exists as rsa.pub 53 | 54 | rm -f randdata 55 | -------------------------------------------------------------------------------- /help/opers/stats: -------------------------------------------------------------------------------- 1 | # $Id: stats 67 2005-10-03 23:50:49Z adx $ 2 | STATS <letter> [server|nick] 3 | 4 | Queries server [server] (or your own server if no 5 | server parameter is given) for info corresponding to 6 | <letter>. 7 | 8 | (X = Admin only.) 9 | LETTER (* = Oper only.) 10 | ------ (^ = Can be configured to be oper only.) 11 | X A - Shows the ADNS DNS servers in use 12 | * c - Shows connect blocks 13 | * d - Shows temporary D lines 14 | * D - Shows D lines 15 | * e - Shows exemptions to D lines 16 | X E - Shows Events 17 | X f - Shows File Descriptors 18 | * g - Shows pending G lines 19 | * G - Shows G lines 20 | X h - Shows ircd callback statistics 21 | * H - Shows H/L lines 22 | ^ i - Shows I lines 23 | ^ K - Shows K lines (or matched klines) 24 | ^ k - Shows temporary K lines (or matched temp klines) 25 | * L - Shows IP and generic info about [nick] 26 | * l - Shows hostname and generic info about [nick] 27 | * m - Shows commands and their usage 28 | * n - Shows IP/cidr connect numbers 29 | ^ o - Shows O/o lines 30 | * P - Shows configured ports 31 | p - Shows opers connected and their idle times 32 | * q - Shows resv'd nicks and channels 33 | * r - Shows resource usage by ircd 34 | * s - Shows the server cache 35 | * t - Shows generic server stats 36 | * U - Shows shared blocks (Old U: lines) 37 | u - Shows server uptime 38 | * v - Shows connected servers and their idle times 39 | * x - Shows gecos bans (Old X: lines) 40 | * y - Shows Y lines 41 | * z - Shows memory stats 42 | * Z - Show ziplinks stats 43 | * ? - Shows connected servers and sendq info about them 44 | -------------------------------------------------------------------------------- /include/ircd_getopt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * ircd_getopt.h: A header for the getopt() command line option calls. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id$ 23 | */ 24 | 25 | #ifndef __GETOPT_H_INCLUDED__ 26 | #define __GETOPT_H_INCLUDED__ 27 | 28 | struct lgetopt { 29 | const char *opt; /* name of the argument */ 30 | void *argloc; /* where we store the argument to it (-option argument) */ 31 | enum {INTEGER, YESNO, STRING, USAGE, ENDEBUG} argtype; 32 | const char *desc; /* description of the argument, usage for printing help */ 33 | }; 34 | 35 | extern struct lgetopt myopts[]; 36 | extern void parseargs(int *, char ***, struct lgetopt *); 37 | 38 | #endif /* __GETOPT_H_INCLUDED__ */ 39 | -------------------------------------------------------------------------------- /README.PLATFORMS: -------------------------------------------------------------------------------- 1 | IRCD-Hybrid Platforms Information 2 | 3 | Sometimes problems and inconsistencies in the Hybrid code may only occur 4 | on a specific platform (architecture and/or operating system and/or 5 | compiler). In these cases you may want to directly contact a person who 6 | is interested in maintaining Hybrid on that platform. Below is a list of 7 | people who have jumped up and taken responsibility for Hybrid, including 8 | making sure it compiles, runs, and doesn't crash. 9 | 10 | Platforms marked with a '*' are known to be broken. In general, 11 | README.FIRST will include specific notes on broken platforms. 12 | 13 | ARCHITECTURE COMPILER SYSTEM MAINTAINER 14 | ============ ================ ============= =================================== 15 | Alpha cc Tru64 5.2b Joshua Kwan <joshk@triplehelix.org> 16 | MIPS gcc IRIX Joshua Kwan <joshk@triplehelix.org> 17 | SPARC Forte C v6,v7 Solaris Joan Touzet <joant@ieee.org> 18 | SPARC gcc Solaris Joan Touzet <joant@ieee.org> 19 | SPARC gcc Linux Alan LeVee <alan.levee@prometheus-designs.net> 20 | x86 gcc Linux Joshua Kwan <joshk@triplehelix.org> 21 | x86 gcc FreeBSD Diane Bruce <db@db.net> 22 | x86 gcc OpenBSD Joshua Kwan <joshk@triplehelix.org> 23 | x86 TenDRA FreeBSD Stuart Walsh <stu@ipng.org.uk> 24 | x86 MS Visual C++ Windows Piotr Nizynski <adx@irc7.pl> 25 | x86 Borland C++ 5.5 Windows Piotr Nizynski <adx@irc7.pl> 26 | 27 | $Id$ 28 | -------------------------------------------------------------------------------- /include/common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * common.h: An ircd header common to most code. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id$ 23 | */ 24 | 25 | #ifndef INCLUDED_common_h 26 | #define INCLUDED_common_h 27 | 28 | #ifdef TRUE 29 | #undef TRUE 30 | #endif 31 | 32 | #ifdef FALSE 33 | #undef FALSE 34 | #endif 35 | 36 | #define FALSE 0 37 | #define TRUE 1 38 | #define HIDEME 2 39 | 40 | /* Blah. I use these a lot. -Dianora */ 41 | #ifdef YES 42 | #undef YES 43 | #endif 44 | 45 | #define YES 1 46 | 47 | #ifdef NO 48 | #undef NO 49 | #endif 50 | 51 | #define NO 0 52 | 53 | /* Just blindly define our own MIN/MAX macro */ 54 | 55 | #define IRCD_MAX(a, b) ((a) > (b) ? (a) : (b)) 56 | #define IRCD_MIN(a, b) ((a) < (b) ? (a) : (b)) 57 | #endif /* INCLUDED_common_h */ 58 | -------------------------------------------------------------------------------- /messages/custom.lang: -------------------------------------------------------------------------------- 1 | ; A compilation of original h5/h6/bsdnet numerics 2 | ; $Id$ 3 | 4 | RPL_CREATED: :%s 003 %s :This server rose from the ashes %s 5 | RPL_STATSUPTIME: :%s 242 %s :Dianora hasn't messed with the server code now in %d days, %d:%02d:%02d 6 | RPL_LUSEROP: :%s 252 %s %d :Smurf Targets (IRC Operators) online 7 | RPL_LOAD2HI: :%s 263 %s %s :Hold your horses... the server load is temporarily too heavy. Try again later, ok? 8 | RPL_UNAWAY: :%s 305 %s :OK, you're not /away anymore. Did you have fun? 9 | RPL_NOWAWAY: :%s 306 %s :OK, you're /away now. Hurry back! 10 | RPL_WHOISOPERATOR: :%s 313 %s %s :is a Smurf Target (IRC Operator) 11 | RPL_WHOISADMIN: :%s 313 %s %s :is a Smurf Magnet (IRC Administrator) 12 | RPL_YOUREOPER: :%s 381 %s :You have the phorce. Use it wisely. 13 | RPL_REHASHING: :%s 382 %s %s :it slices, dices, and even reloads config files! Rehashing config file, mang. 14 | ERR_PASSWDMISMATCH: :%s 464 %s :BZZZT!! Wrong password, dewd. Are you sure you know what you're doing? 15 | ERR_YOUREBANNEDCREEP: :%s 465 %s :You are BANNED from this server - %s 16 | ERR_NOPRIVILEGES: :%s 481 %s :UHHH, I don't THINK so, dewd... you ain't got those mad l33+ sk1llz. (IRC Operator) 17 | ERR_CHANOPRIVSNEEDED: :%s 482 %s %s :You can't do that thing, when you don't have that swing (You're not channel operator) 18 | ERR_CANTKILLSERVER: :%s 483 %s :Don't be an idiot - you can't kill a SERVER, fool. 19 | ERR_UMODEUNKNOWNFLAG: :%s 501 %s :Unknown MODE flag - you smokin' something? 20 | ERR_USERSDONTMATCH: :%s 502 %s :You can't change user modes for other users, silly - check that nickname again. 21 | -------------------------------------------------------------------------------- /include/dbuf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * dbuf.h: A header for the dynamic buffers functions. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id: dbuf.h 33 2005-10-02 20:50:00Z knight $ 23 | */ 24 | 25 | #ifndef __DBUF_H_INCLUDED 26 | #define __DBUF_H_INCLUDED 27 | #include "tools.h" 28 | 29 | #define DBUF_BLOCK_SIZE 1024 /* this is also our MTU used for sending */ 30 | 31 | #define dbuf_length(x) ((x)->total_size) 32 | #define dbuf_clear(x) dbuf_delete(x, dbuf_length(x)) 33 | 34 | struct dbuf_block 35 | { 36 | size_t size; 37 | char data[DBUF_BLOCK_SIZE]; 38 | }; 39 | 40 | struct dbuf_queue 41 | { 42 | dlink_list blocks; 43 | size_t total_size; 44 | }; 45 | 46 | extern void dbuf_init(void); 47 | extern void dbuf_put(struct dbuf_queue *, char *, size_t); 48 | extern void dbuf_delete(struct dbuf_queue *, size_t); 49 | #endif 50 | -------------------------------------------------------------------------------- /contrib/help/opers/index: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | Help topics available to opers: 3 | 4 | CAPAB CAPTURE CBURST CHGHOST 5 | CHGIDENT CHGNAME CLASSLIST CLEARCHAN 6 | CLIENT CLOSE CONNECT CRYPTLINK 7 | CTRACE DELSPOOF DIE DLINE 8 | DROP EOB ETRACE FORCEJOIN 9 | FORCEPART GLINE HASH JUPE 10 | KILL KLINE KNOCKLL LLJOIN 11 | LLNICK LOCOPS LTRACE MKPASSWD 12 | MODLIST MODLOAD MODRESTART MODUNLOAD 13 | NBURST NOTICE OJOIN OMOTD 14 | OPERWALL OPME POST PRIVMSG 15 | REHASH RESTART RESV RKLINE 16 | RXLINE SERVER SET SJOIN 17 | SPOOF SQUIT STATS SVINFO 18 | SVSNICK TESTGECOS TESTLINE TESTMASK 19 | TRACE UHELP UMODE UNCAPTURE 20 | UNDLINE UNGLINE UNKLINE UNRESV 21 | UNXLINE WALLOPS XLINE 22 | 23 | Help topics available to users: 24 | 25 | ACCEPT ADMIN AWAY CHALLENGE 26 | CMODE ERROR FLAGS HELP 27 | INFO INVITE ISON JOIN 28 | KICK KNOCK LINKS LIST 29 | LUSERS MAP MOTD NAMES 30 | NICK NOTICE OPER PART 31 | PASS PING PONG PRIVMSG 32 | QUIT STATS TIME TOPIC 33 | UMODE USER USERHOST USERS 34 | VERSION WHO WHOIS WHOWAS 35 | -------------------------------------------------------------------------------- /include/memory.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * memory.h: A header for the memory functions. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id: memory.h 33 2005-10-02 20:50:00Z knight $ 23 | */ 24 | 25 | #ifndef _I_MEMORY_H 26 | #define _I_MEMORY_H 27 | 28 | #include "ircd_defs.h" 29 | #include "setup.h" 30 | #include "balloc.h" 31 | 32 | /* Needed to use uintptr_t for some pointer manipulation. */ 33 | 34 | #ifdef HAVE_INTTYPES_H 35 | # include <inttypes.h> 36 | #else /* No inttypes.h */ 37 | # ifndef HAVE_UINTPTR_T 38 | typedef unsigned long uintptr_t; 39 | # endif 40 | #endif 41 | 42 | extern void outofmemory(void); 43 | 44 | extern void *MyMalloc(size_t size); 45 | extern void *MyRealloc(void *x, size_t y); 46 | extern void MyFree(void *x); 47 | extern void _DupString(char **x, const char *y); 48 | 49 | #define DupString(x,y) _DupString(&x, y) 50 | #endif /* _I_MEMORY_H */ 51 | -------------------------------------------------------------------------------- /doc/guidelines.txt: -------------------------------------------------------------------------------- 1 | ircd-hybrid documentation guidelines 2 | 3 | 1. When a major change in the code affects users, it MUST be documented 4 | in whats-new and all other appropriate locations. 5 | 6 | 2. When something affects the configuration file, and it's compatibility 7 | with previous versions, it MUST be documented in example.conf and in a 8 | proposed new document README.NOW. This is VERY important during the beta 9 | phase to help anyone who mans the "help desk". 10 | 11 | 3. All documentation must properly fit in an 80 character wide terminal. 12 | SGML and other "professional" documentation systems are good for some 13 | projects, but hybrid is intended to be used on minimal UNIX installations 14 | where any extra binary is a security risk. Text only docs, sized to fit 15 | properly in an 80 character wide console, are what admins expect, and that's 16 | what they should get. 17 | 18 | 4. All documentation must be spell checked before a release or a beta. 19 | 'ispell' (using either the US or British dictionary) is probably the 20 | easiest way to spell check the documentation. 'ispell -a' at the command 21 | line will allow you to check individual words as you are editing. 22 | 23 | 5. When a document is over approximately 5 pages long, it should be split 24 | into sections to facilitate users reading them. 25 | 26 | 6. All docs (except docs specifically describing code) should be written 27 | in a way that all users of the software (not just programmers) will be able 28 | to easily understand. 29 | 30 | 7. Don't make documentation a chore. If it's done while coding, or shortly 31 | after, it usually is more accurate and the documentation tasks don't get 32 | pushed back and pile up. 33 | 34 | 8. Don't forget to include a CVS Id. 35 | 36 | # $Id$ 37 | -------------------------------------------------------------------------------- /help/opers/umode: -------------------------------------------------------------------------------- 1 | # $Id: umode 33 2005-10-02 20:50:00Z knight $ 2 | MODE <nick> <+|-><modes> 3 | 4 | Usermodes: (* designates that the umode is oper only) 5 | 6 | USERMODE DESCRIPTION 7 | ----------------------------------------------------------------- 8 | +o - Designates this client is an IRC Operator. 9 | Use the /oper command to attain this. 10 | +i - Designates this client 'invisible'. 11 | * +w - Can see server wallops. 12 | * +z - Can see oper wallops. 13 | * +l - Can see oper locops (local wallops). 14 | * +s - Can see generic server messages and oper kills. 15 | * +c - Can see client connections and exits. 16 | * +u - Can see unauthorized client connections. 17 | * +r - Can see 'rejected' client notices. 18 | * +k - Can see server kill messages. 19 | * +f - Can see 'I-line is full' notices. 20 | * +y - Can see stats/links/admin requests to name a few. 21 | * +d - Can see server debug messages. 22 | * +n - Can see client nick changes. 23 | * +x - Can see new server introduction and split messages. 24 | * +b - Can see possible bot / join flood warnings. 25 | * +a - Is marked as a server admin in stats p/o. 26 | +D - "deaf": don't receive channel messages 27 | +G - "soft caller id": block private messages from people not on 28 | any common channels with you (unless they are /accept'ed) 29 | +g - "caller id" mode: only allow /accept clients to message you 30 | +j - "registered caller id": block private messages from people 31 | not registered with nickserv (+R) or on your /accept list 32 | -------------------------------------------------------------------------------- /doc/server-version-info: -------------------------------------------------------------------------------- 1 | Server VERSION Info 2 | 3 | $Id$ 4 | 5 | Copyright (c) 2005 by ircd-hybrid team 6 | 7 | ---------------------------------------------------------------------- 8 | 9 | Updated for Hybrid 7.2 (2005/08/20) 10 | 11 | When you type /VERSION, you will often see something like this: 12 | 13 | hybrid-7.2beta1(20050820_4). test1.chatjunkies.org :eGgHIKMZ6 TS6ow 14 | 15 | Ever wondered what those funny chars mean after the version number? Well 16 | here they are: 17 | 18 | +----------------------------+ 19 | | 'e' | USE_EXCEPT | 20 | |------+---------------------| 21 | | 'G' | GLINES | 22 | |------+---------------------| 23 | | 'g' | NO_FAKE_GLINES | 24 | |------+---------------------| 25 | | 'H' | HUB | 26 | |------+---------------------| 27 | | 'I' | USE_INVEX | 28 | |------+---------------------| 29 | | 'K' | USE_KNOCK | 30 | |------+---------------------| 31 | | 'M' | IDLE_FROM_MSG | 32 | |------+---------------------| 33 | | 'Z' | ZIPLINKS | 34 | |------+---------------------| 35 | | 'T' | IGNORE_BOGUS_TS | 36 | |------+---------------------| 37 | | 'Y' | USE_SYSLOG | 38 | |------+---------------------| 39 | | '6' | IPv6 | 40 | |------+---------------------| 41 | | --- | ------------------- | 42 | |------+---------------------| 43 | | 'TS' | Supports TS | 44 | |------+---------------------| 45 | | '6' | TS Version 6 | 46 | |------+---------------------| 47 | | 'o' | TS Only | 48 | |------+---------------------| 49 | | 'w' | TS Warnings | 50 | +----------------------------+ 51 | -------------------------------------------------------------------------------- /include/sprintf_irc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * sprintf_irc.h: The irc sprintf header. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id: sprintf_irc.h 33 2005-10-02 20:50:00Z knight $ 23 | */ 24 | 25 | #ifndef SPRINTF_IRC 26 | #define SPRINTF_IRC 27 | 28 | 29 | /*============================================================================= 30 | * Proto types 31 | */ 32 | 33 | extern int vsprintf_irc(char *str, const char *format, va_list); 34 | 35 | /* XXX NOT USED AND NOT DEFINED */ 36 | extern int vsnprintf_irc(char *, int, const char*, va_list); 37 | 38 | /* old */ 39 | /* extern int ircsprintf(char *str, char *format, ...); */ 40 | /* */ 41 | 42 | /* 43 | * ircsprintf - optimized sprintf 44 | */ 45 | #if 1 46 | extern int ircsprintf(char*, const char*, ...) 47 | __attribute__ ((format(printf, 2, 3))); 48 | #else 49 | extern int ircsprintf(char *str, const char *format, ...); 50 | #endif 51 | 52 | #endif /* SPRINTF_IRC */ 53 | -------------------------------------------------------------------------------- /include/userhost.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * userhost.h: A header for global user limits. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id$ 23 | */ 24 | 25 | #ifndef INCLUDED_userhost_h 26 | #define INCLUDED_userhost_h 27 | 28 | struct NameHost 29 | { 30 | dlink_node node; /* point to other names on this hostname */ 31 | char name[USERLEN + 1]; 32 | int icount; /* number of =local= identd on this name*/ 33 | int gcount; /* global user count on this name */ 34 | int lcount; /* local user count on this name */ 35 | }; 36 | 37 | struct UserHost 38 | { 39 | dlink_list list; /* list of names on this hostname */ 40 | struct UserHost *next; 41 | char host[HOSTLEN + 1]; 42 | }; 43 | 44 | extern void count_user_host(const char *, const char *, int *, int *, int *); 45 | extern void add_user_host(const char *, const char *, int); 46 | extern void delete_user_host(const char *, const char *, int global); 47 | #endif /* INCLUDED_userhost_h */ 48 | -------------------------------------------------------------------------------- /BUGS: -------------------------------------------------------------------------------- 1 | Known Bugs worthy of a mention: 2 | -------------------------------------------------------------------------------- 3 | 4 | 1. /MODUNLOAD causes cores: 5 | - If a module is modified before being unloaded, /MODUNLOAD (and 6 | therefore /MODRELOAD) may cause a core. 7 | 8 | This problem is caused by the behaviour of the OS, which treats 9 | shared libraries differently to executables (modifying the ircd 10 | binary whilst it is running would also cause a core, but is denied 11 | by the OS). There is no way to fix this at the application level, 12 | and fixing the OS to do the right thing is also difficult. 13 | 14 | A workaround to avoid coring is possible however. To install new 15 | modules, first remove or rename the old module, then copy/move the 16 | new file into place. /MODUNLOAD will then work successfully. 17 | 18 | Alternatively, running ./configure with the --disable-shared-modules 19 | argument will link all the commands statically, losing the advantages 20 | of upgrading at runtime, but reducing the chances of accidentally 21 | coring your server. 22 | 23 | 2. Solaris stock 32bit stdio is limited to 256 fds. This breaks when using 24 | cryptlinks. 25 | 26 | BUG REPORTS: If you run this code and encounter problems, you should report 27 | the bug on our SourceForge.net bug tracker, which you can find at this URL: 28 | 29 | https://sourceforge.net/tracker/?atid=409046&group_id=33573&func=browse 30 | 31 | Please include a gdb backtrace and a copy of your setup.h and ircd.conf with 32 | any report (with passwords and other sensitive information masked). 33 | 34 | For information how to get a gdb backtrace, see INSTALL (near the end of file). 35 | 36 | -------------------------------------------------------------------------------- 37 | $Id$ 38 | -------------------------------------------------------------------------------- /tools/README.mkpasswd: -------------------------------------------------------------------------------- 1 | mkpasswd.c documentation 2 | $Id$ 3 | 4 | This is documentation for the mkpasswd.c included in ircd-hybrid-7. 5 | 6 | This version of mkpasswd can create both DES and MD5 passwords, with 7 | either randomly generated or user provided salts. 8 | 9 | Options: 10 | -m - Create an MD5 password 11 | -d - Create a DES password 12 | -l - Specify the length of a random MD5 salt 13 | -p - Specify the plaintext password at the command line 14 | -s - Specify the salt at the command line 15 | -h - Get help 16 | 17 | Without the presence of any parameters, it'll behave like the old mkpasswd, 18 | creating a DES password with a randomly generated salt and prompting for 19 | the password (without echo). 20 | 21 | A DES salt is a pair of alphanumeric characters ('.' and '/' are permitted 22 | as well), such as 'a4' or 'Td'. 23 | 24 | An MD5 salt consists of up to 16 (though most implementations limit you to 25 | 8) alphanumeric characters (plus '.' and '/'), 26 | such as 'tGd' or 'J6d4dfG'. 27 | 28 | Known bugs: 29 | Blowfish (on OpenBSD) is not yet supported 30 | The encryption algorithms supported depend on your system's crypt() 31 | implementation. 32 | The maximum length of an MD5 salt is limited to your systems crypt() 33 | implementation, typically 8. 34 | crypt.c (MD5 implementation) is included, but not yet compiled into the 35 | program for systems that do not support MD5. 36 | 37 | Supported Platforms (Known and tested): 38 | Linux glibc (DES and MD5) 39 | FreeBSD 3.x (DES (MD5 maybe)) 40 | FreeBSD 4.x (DES and MD5) 41 | Solaris 2.5-2.6 (DES only) 42 | Cygwin 1.1.4 (DES only) 43 | Prior Cygwin with the MD5 libcrypt (MD5 only) 44 | OpenBSD 2.7 (don't link with -lcrypt) (DES and MD5, no Blowfish support) 45 | Mac OS-X (Darwin) (don't link with -lcrypt) (DES only) 46 | 47 | Other systems probably work, but they haven't been amply tested. 48 | -------------------------------------------------------------------------------- /include/ircd_handler.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * ircd_handler.h: A header for the IRC message handlers. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id$ 23 | */ 24 | 25 | #ifndef INCLUDED_ircd_handler_h 26 | #define INCLUDED_ircd_handler_h 27 | 28 | struct Client; 29 | 30 | /* 31 | * MessageHandler 32 | */ 33 | typedef enum HandlerType { 34 | UNREGISTERED_HANDLER, 35 | CLIENT_HANDLER, 36 | SERVER_HANDLER, 37 | ENCAP_HANDLER, 38 | OPER_HANDLER, 39 | DUMMY_HANDLER, 40 | LAST_HANDLER_TYPE 41 | } HandlerType; 42 | 43 | /* 44 | * MessageHandler function 45 | * Params: 46 | * struct Client* client_p - connection message originated from 47 | * struct Client* source_p - source of message, may be different from client_p 48 | * int parc - parameter count 49 | * char* parv[] - parameter vector 50 | */ 51 | typedef void (*MessageHandler)(struct Client*, struct Client*, int, char*[]); 52 | 53 | 54 | #endif /* INCLUDED_ircd_handler_h */ 55 | -------------------------------------------------------------------------------- /servlink/io.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, servlink/io.h 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 1, or (at your option) 7 | * any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | * 18 | * $Id$ 19 | */ 20 | 21 | #ifndef INCLUDED_servlink_io_h 22 | #define INCLUDED_servlink_io_h 23 | 24 | #include "control.h" 25 | 26 | #define IO_READ 0 27 | #define IO_WRITE 1 28 | #define IO_SELECT 2 29 | 30 | #define IO_TYPE(io) ((io==IO_SELECT)?"select": \ 31 | ((io==IO_WRITE)?"write":"read")) 32 | 33 | #define FD_NAME(fd) (fd_name(fd)) 34 | 35 | extern void io_loop(int nfds); 36 | extern void write_data(void); 37 | extern void read_data(void); 38 | extern void write_ctrl(void); 39 | extern void read_ctrl(void); 40 | extern void write_net(void); 41 | extern void read_net(void); 42 | extern void send_error(const char *, ...) __attribute__((format (printf, 1, 2))); 43 | extern void send_data_blocking(int fd, unsigned char *data, int datalen); 44 | extern cmd_handler process_recvq; 45 | extern cmd_handler process_sendq; 46 | extern cmd_handler send_zipstats; 47 | 48 | #endif /* INCLUDED_servlink_io_h */ 49 | -------------------------------------------------------------------------------- /contrib/ircd.init.in: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # ircd This shell script takes care of starting and stopping 4 | # ircd-hybrid. 5 | # 6 | # $Id$ 7 | # 8 | # chkconfig: 2345 92 11 9 | # description: ircd-hybrid is an Internet Relay Chat server 10 | # processname: ircd 11 | # config: @sysconfdir@/ircd.conf 12 | # pidfile: @sysconfdir@/ircd.pid 13 | 14 | # Source function library. 15 | . /etc/rc.d/init.d/functions 16 | 17 | # Source networking configuration. 18 | [ -f /etc/sysconfig/network ] && . /etc/sysconfig/network 19 | 20 | # Source ircd init configuration. 21 | if [ -f /etc/sysconfig/ircd ] ; then 22 | . /etc/sysconfig/ircd 23 | fi 24 | 25 | # Check that networking is up. 26 | [ "${NETWORKING}" = "no" ] && exit 0 27 | 28 | RETVAL=0 29 | prog="ircd" 30 | 31 | start() { 32 | echo -n $"Starting $prog: " 33 | daemon --user=ircd @bindir@/ircd $IRCD_OPTIONS 34 | RETVAL=$? 35 | echo 36 | [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ircd 37 | return $RETVAL 38 | } 39 | 40 | reload() { 41 | echo -n $"reloading $prog: " 42 | killproc ircd -HUP 43 | RETVAL=$? 44 | echo 45 | return $RETVAL 46 | } 47 | 48 | restart() { 49 | stop 50 | sleep 3 51 | start 52 | } 53 | 54 | stop() { 55 | echo -n $"Shutting down $prog: " 56 | killproc ircd 57 | RETVAL=$? 58 | echo 59 | return $RETVAL 60 | } 61 | 62 | 63 | # See how we were called. 64 | case "$1" in 65 | start) 66 | start 67 | RETVAL=$? 68 | ;; 69 | stop) 70 | stop 71 | RETVAL=$? 72 | ;; 73 | reload) 74 | reload 75 | RETVAL=$? 76 | ;; 77 | restart) 78 | stop 79 | start 80 | RETVAL=$? 81 | ;; 82 | condrestart) 83 | if [ -f /var/lock/subsys/ircd ]; then 84 | stop 85 | start 86 | RETVAL=$? 87 | fi 88 | ;; 89 | status) 90 | status ircd 91 | RETVAL=$? 92 | ;; 93 | *) 94 | echo $"Usage: $0 {start|stop|restart|condrestart|status}" 95 | exit 1 96 | esac 97 | 98 | exit $RETVAL 99 | -------------------------------------------------------------------------------- /doc/technical/whats-new-code.txt: -------------------------------------------------------------------------------- 1 | 2 | Whats changed in the codebase 3 | 4 | # $Id$ 5 | 6 | First, please note one thing - a *LOT* has changed in hybrid-7. 7 | 8 | * Most of the file descriptor and network code has been rewritten. 9 | A lot of ideas were borrowed from squid, but they have been simplified 10 | in places and extended in others to cover the needs of hybrid-7. 11 | 12 | The core network routines now sit in src/s_bsd.c. There are some remnants 13 | of client/server specific functions which should really be moved. 14 | The actual network IO loop lives in src/s_bsd_${type}.c where ${type} 15 | is the type of network loop (poll, select, kqueue, etc.) 16 | You can select the type of network loop by passing --enable-${type} / 17 | --disable-${type} to configure. 18 | 19 | Note: the code hasn't been rearranged, its been rewritten. We think 20 | it is more efficient, but the split-list code in s_bsd_poll.c needs some 21 | further research. 22 | 23 | Please read the documentation available, which will go into more detail. 24 | 25 | * An event system has been added, again borrowed mainly from squid. This 26 | allows periodic events (channel cleanup, server connection retries, etc) 27 | to be scheduled without needing to add it to the main loop. 28 | 29 | * Server to server links are now handled by the 'servlink' program 30 | (located in the servlink/ directory). After negotiating a server<->server 31 | link, (CAPAB/SERVER/PASS or CAPAB/CRYPTSERV/CRYPTAUTH) hybrid-7 will 32 | fork, then exec a servlink process. ircd-hybrid communicates with the 33 | program using a control socket (turn on/off crypto/zip, etc), and 34 | a data socket (which looks to the rest of the code like a network socket 35 | connected to the remote server). The servlink process handles encryption 36 | and compression of server links, but is still compatable with ziplinks 37 | used in hybrid-6, and the hybrid-6 cryptlinks patch. 38 | -------------------------------------------------------------------------------- /include/event.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * event.h: The ircd event header. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id: event.h 33 2005-10-02 20:50:00Z knight $ 23 | */ 24 | 25 | #ifndef INCLUDED_event_h 26 | #define INCLUDED_event_h 27 | 28 | /* 29 | * How many event entries we need to allocate at a time in the block 30 | * allocator. 16 should be plenty at a time. 31 | */ 32 | #define MAX_EVENTS 50 33 | 34 | 35 | typedef void EVH(void *); 36 | 37 | /* The list of event processes */ 38 | struct ev_entry 39 | { 40 | EVH *func; 41 | void *arg; 42 | const char *name; 43 | time_t frequency; 44 | time_t when; 45 | int active; 46 | }; 47 | 48 | extern void eventAdd(const char *, EVH *, void *, time_t); 49 | extern void eventAddIsh(const char *, EVH *, void *, time_t); 50 | extern void eventRun(void); 51 | extern time_t eventNextTime(void); 52 | extern void eventInit(void); 53 | extern void eventDelete(EVH *, void *); 54 | extern void set_back_events(time_t); 55 | extern void show_events(struct Client *); 56 | 57 | #endif /* INCLUDED_event_h */ 58 | -------------------------------------------------------------------------------- /include/resv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * resv.h: A header for the RESV functions. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id$ 23 | */ 24 | 25 | #ifndef INCLUDED_resv_h 26 | #define INCLUDED_resv_h 27 | 28 | struct ResvChannel 29 | { 30 | dlink_node node; 31 | struct ResvChannel *hnext; 32 | time_t hold; /* Hold action until this time (calendar time) */ 33 | /* +1 for \0 */ 34 | char name[CHANNELLEN + 1]; 35 | char *reason; 36 | int conf; /* 1 if set from ircd.conf, 0 if from elsewhere */ 37 | }; 38 | 39 | extern dlink_list nresv_items; 40 | extern dlink_list resv_channel_list; 41 | 42 | extern struct ConfItem *create_channel_resv(char *, char *, int); 43 | extern struct ConfItem *create_nick_resv(char *, char *, int); 44 | 45 | extern int delete_channel_resv(struct ResvChannel *); 46 | 47 | extern void clear_conf_resv(void); 48 | extern void report_resv(struct Client *); 49 | 50 | extern int valid_wild_card_simple(const char *); 51 | extern struct ResvChannel *match_find_resv(const char *); 52 | #endif /* INCLUDED_resv_h */ 53 | -------------------------------------------------------------------------------- /include/irc_reslib.h: -------------------------------------------------------------------------------- 1 | /* 2 | * include/irc_reslib.h (C)opyright 1992 Darren Reed. 3 | * 4 | * $Id: irc_reslib.h 33 2005-10-02 20:50:00Z knight $ 5 | */ 6 | #ifndef INCLUDED_ircdreslib_h 7 | #define INCLUDED_ircdreslib_h 8 | 9 | /* 10 | * Inline versions of get/put short/long. Pointer is advanced. 11 | */ 12 | #define IRC_NS_GET16(s, cp) { \ 13 | const unsigned char *t_cp = (const unsigned char *)(cp); \ 14 | (s) = ((u_int16_t)t_cp[0] << 8) \ 15 | | ((u_int16_t)t_cp[1]) \ 16 | ; \ 17 | (cp) += NS_INT16SZ; \ 18 | } 19 | 20 | #define IRC_NS_GET32(l, cp) { \ 21 | const unsigned char *t_cp = (const unsigned char *)(cp); \ 22 | (l) = ((u_int32_t)t_cp[0] << 24) \ 23 | | ((u_int32_t)t_cp[1] << 16) \ 24 | | ((u_int32_t)t_cp[2] << 8) \ 25 | | ((u_int32_t)t_cp[3]) \ 26 | ; \ 27 | (cp) += NS_INT32SZ; \ 28 | } 29 | 30 | #define IRC_NS_PUT16(s, cp) { \ 31 | u_int16_t t_s = (u_int16_t)(s); \ 32 | unsigned char *t_cp = (unsigned char *)(cp); \ 33 | *t_cp++ = t_s >> 8; \ 34 | *t_cp = t_s; \ 35 | (cp) += NS_INT16SZ; \ 36 | } 37 | 38 | #define IRC_NS_PUT32(l, cp) { \ 39 | u_int32_t t_l = (u_int32_t)(l); \ 40 | unsigned char *t_cp = (unsigned char *)(cp); \ 41 | *t_cp++ = t_l >> 24; \ 42 | *t_cp++ = t_l >> 16; \ 43 | *t_cp++ = t_l >> 8; \ 44 | *t_cp = t_l; \ 45 | (cp) += NS_INT32SZ; \ 46 | } 47 | 48 | extern int irc_res_init(void); 49 | extern int irc_dn_expand(const unsigned char *msg, const unsigned char *eom, const unsigned char *src, char *dst, int dstsiz); 50 | extern int irc_dn_skipname(const unsigned char *ptr, const unsigned char *eom); 51 | extern unsigned int irc_ns_get16(const unsigned char *src); 52 | extern unsigned long irc_ns_get32(const unsigned char *src); 53 | extern void irc_ns_put16(unsigned int src, unsigned char *dst); 54 | extern void irc_ns_put32(unsigned long src, unsigned char *dst); 55 | extern int irc_res_mkquery(const char *dname, int class, int type, unsigned char *buf, int buflen); 56 | #endif /* INCLUDED_res_h */ 57 | 58 | -------------------------------------------------------------------------------- /include/hook.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * hook.h: A header for the hooks into parts of ircd. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id: hook.h 33 2005-10-02 20:50:00Z knight $ 23 | */ 24 | 25 | #ifndef __HOOK_H_INCLUDED 26 | #define __HOOK_H_INCLUDED 27 | 28 | #include "tools.h" 29 | #define HOOK_V2 30 | 31 | typedef void *CBFUNC(va_list); 32 | 33 | struct Callback 34 | { 35 | char *name; 36 | dlink_list chain; 37 | dlink_node node; 38 | unsigned int called; 39 | time_t last; 40 | }; 41 | 42 | struct Client; 43 | 44 | extern dlink_list callback_list; /* listing/debugging purposes */ 45 | 46 | extern struct Callback *register_callback(const char *, CBFUNC *); 47 | extern void *execute_callback(struct Callback *, ...); 48 | extern struct Callback *find_callback(const char *); 49 | extern dlink_node *install_hook(struct Callback *, CBFUNC *); 50 | extern void uninstall_hook(struct Callback *, CBFUNC *); 51 | extern void *pass_callback(dlink_node *, ...); 52 | extern void stats_hooks(struct Client *); 53 | 54 | #define is_callback_present(c) (!!dlink_list_length(&c->chain)) 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /modules/core/Makefile.am: -------------------------------------------------------------------------------- 1 | MAINTAINERCLEANFILES=Makefile.in 2 | AM_CPPFLAGS=-I$(top_srcdir)/include -I$(top_srcdir)/lib/pcre $(OPENSSL_INCLUDES) 3 | if USE_SHARED_MODULES 4 | AM_LDFLAGS= -module 5 | pkglib_LTLIBRARIES= m_die.la \ 6 | m_join.la \ 7 | m_kick.la \ 8 | m_kill.la \ 9 | m_message.la \ 10 | m_mode.la \ 11 | m_nick.la \ 12 | m_part.la \ 13 | m_quit.la \ 14 | m_server.la \ 15 | m_sjoin.la \ 16 | m_squit.la \ 17 | spy_admin_notice.la \ 18 | spy_info_notice.la \ 19 | spy_links_notice.la \ 20 | spy_motd_notice.la \ 21 | spy_stats_notice.la \ 22 | spy_stats_p_notice.la \ 23 | spy_trace_notice.la \ 24 | spy_whois_notice.la 25 | else 26 | AM_LDFLAGS=-static 27 | noinst_LTLIBRARIES= m_die.la \ 28 | m_join.la \ 29 | m_kick.la \ 30 | m_kill.la \ 31 | m_message.la \ 32 | m_mode.la \ 33 | m_nick.la \ 34 | m_part.la \ 35 | m_quit.la \ 36 | m_server.la \ 37 | m_sjoin.la \ 38 | m_squit.la \ 39 | spy_admin_notice.la \ 40 | spy_info_notice.la \ 41 | spy_links_notice.la \ 42 | spy_motd_notice.la \ 43 | spy_stats_notice.la \ 44 | spy_stats_p_notice.la \ 45 | spy_trace_notice.la \ 46 | spy_whois_notice.la 47 | endif 48 | 49 | install-exec-local: 50 | rm -f $(DESTDIR)/$(pkglibdir)/*.la $(DESTDIR)/$(pkblibdir)/*.a $(DESTDIR)/$(pkblibdir)/*.so 51 | -------------------------------------------------------------------------------- /include/s_misc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * s_misc.h: A header for the miscellaneous functions. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id: s_misc.h 33 2005-10-02 20:50:00Z knight $ 23 | */ 24 | 25 | #ifndef INCLUDED_s_misc_h 26 | #define INCLUDED_s_misc_h 27 | 28 | extern char *date(time_t); 29 | extern char *small_file_date(time_t); 30 | extern const char *smalldate(time_t); 31 | #ifdef HAVE_LIBCRYPTO 32 | extern char *ssl_get_cipher(SSL *); 33 | X509 * 34 | create_certificate(RSA *, RSA *, const char *, const char *, unsigned int); 35 | #endif 36 | void base16_encode(char *, size_t, const char *, size_t); 37 | int base16_decode(char *, size_t, const char *, size_t); 38 | int get_rsa_fingerprint(RSA *, char *); 39 | 40 | #define _1MEG (1024.0) 41 | #define _1GIG (1024.0*1024.0) 42 | #define _1TER (1024.0*1024.0*1024.0) 43 | #define _GMKs(x) (((x) > _1TER) ? "Terabytes" : (((x) > _1GIG) ? "Gigabytes" :\ 44 | (((x) > _1MEG) ? "Megabytes" : "Kilobytes"))) 45 | #define _GMKv(x) (((x) > _1TER) ? (float)((x)/_1TER) : (((x) > _1GIG) ? \ 46 | (float)((x)/_1GIG) : (((x) > _1MEG) ? (float)((x)/_1MEG) : \ 47 | (float)(x)))) 48 | #endif 49 | -------------------------------------------------------------------------------- /messages/ayb.lang: -------------------------------------------------------------------------------- 1 | ; ircd-hybrid-7 custom message file 2 | ; Copyright (C) 2000 3 | ; David Taylor <davidt@yadt.co.uk>, 2000. 4 | ; $Id$ 5 | 6 | RPL_WELCOME: :%s 001 %s :ALL YOUR BASE ARE BELONG TO %s, %s!!! 7 | RPL_CREATED: :%s 003 %s :Someone set up us the server %s 8 | RPL_ISUPPORT: :%s 005 %s %s :are moved for great justice 9 | RPL_REDIR: :%s 010 %s %s %d :You have no chance to survive make this Server/Port instead. Ha ha ha. 10 | RPL_STATSUPTIME: :%s 242 %s :Someone set up us the bomb %d days, %d:%02d:%02d ago 11 | RPL_LUSERCLIENT: :%s 251 %s :There are %d minor Zigs and %d invisible on %d servers 12 | RPL_LUSEROP: :%s 252 %s %d :Zigs online 13 | RPL_LUSERME: :%s 255 %s :%d clients and %d servers are belong to me 14 | RPL_LOAD2HI: :%s 263 %s %s :What you say!?? The server is moving too many zigs.. 15 | RPL_LOCALUSERS: :%s 265 %s :%d users (max %d) are belong to me 16 | RPL_GLOBALUSERS: :%s 266 %s :%d users (max %d) are belong to the network 17 | RPL_UNAWAY: :%s 305 %s :OK, you're not /away anymore. Did you move Zig for great justice? 18 | RPL_NOWAWAY: :%s 306 %s :OK, you're /away now. Hurry back! 19 | RPL_YOUREOPER: :%s 381 %s :SOMEONE SET YOU UP THE /KILL FOR GREAT JUSTICE! 20 | ERR_NOSUCHNICK: :%s 401 %s %s :No such Zig 21 | ERR_TOOMANYCHANNELS: :%s 405 %s %s :Too many channels are belong to you 22 | ERR_WASNOSUCHNICK: :%s 406 %s %s :There was no such Zig 23 | ERR_TOOMANYTARGETS: :%s 407 %s %s :Too many recipients. Your message is only belong to %d 24 | ERR_NORECIPIENT: :%s 411 %s :No Zigs Moved (%s) 25 | ERR_UNKNOWNCOMMAND: :%s 421 %s %s :THAT COMMAND IS NOT BELONG TO ME!!! 26 | ERR_NOMOTD: :%s 422 %s :MOTD file is not belong to me 27 | ERR_NICKNAMEINUSE: :%s 433 %s %s :Zig is belong to someone else. 28 | ERR_CHANOPRIVSNEEDED: :%s 482 %s %s :You know what you doing, you need +o 29 | ERR_CANTKILLSERVER: :%s 483 %s :You have no chance to kill a SERVER make your time. 30 | -------------------------------------------------------------------------------- /help/opers/set: -------------------------------------------------------------------------------- 1 | SET <option> <value> 2 | 3 | <option> can be one of the following: 4 | AUTOCONN - Sets auto-connect on or off for a particular 5 | server 6 | AUTOCONNALL - Sets auto-connect on or off for all servers 7 | FLOODCOUNT - The number of lines allowed before 8 | throttling a connection due to flooding 9 | Note that this variable is used for both 10 | channels and clients 11 | IDLETIME - The number of seconds a client can be idle 12 | before disconnecting them 13 | JFLOODCOUNT - Sets the number of joins in JFLOODTIME to 14 | count as flooding. Use 0 to disable. 15 | JFLOODTIME - The amount of time in seconds in JFLOODCOUNT to consider 16 | as join flooding. Use 0 to disable. 17 | LOG - Sets the Logging level for what is logged 18 | to ircd.log and syslog. 19 | MAX - Sets the number of max connections 20 | to <value>. (This number cannot exceed 21 | HARD_FDLIMIT in defaults.h) 22 | MSGLOCALE - Set the message locale 23 | standard - Compiled in defaults 24 | custom - Old CUSTOM_ERR messages 25 | REJECTTIME - Sets the amount of time before disconnecting 26 | a rejected client. Use 0 to disable. 27 | SPAMNUM - Sets how many join/parts to channels 28 | constitutes a possible spambot. 29 | SPAMTIME - Below this time on a channel 30 | counts as a join/part as above. 31 | SPLITMODE - Sets splitmode to <value>: 32 | ON - splitmode is permanently on 33 | OFF - splitmode is permanently off 34 | AUTO - ircd chooses splitmode based on 35 | SPLITUSERS and SPLITNUM 36 | SPLITNUM - Sets the minimum amount of servers needed to 37 | deactivate automatic splitmode. 38 | SPLITUSERS - Sets the minimum amount of users needed to 39 | deactivate automatic splitmode. 40 | 41 | # $Id: set 416 2006-02-10 09:50:59Z michael $ 42 | -------------------------------------------------------------------------------- /src/list.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * list.c: Various assorted functions for various structures. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id: list.c 33 2005-10-02 20:50:00Z knight $ 23 | */ 24 | 25 | #include "stdinc.h" 26 | #include "tools.h" 27 | #include "client.h" 28 | #include "list.h" 29 | #include "memory.h" 30 | #include "balloc.h" 31 | 32 | static BlockHeap *dnode_heap; 33 | 34 | 35 | /* init_dlink_nodes() 36 | * 37 | * inputs - NONE 38 | * output - NONE 39 | * side effects - initializes the dnode BlockHeap 40 | */ 41 | void 42 | init_dlink_nodes(void) 43 | { 44 | dnode_heap = BlockHeapCreate("dlink node", sizeof(dlink_node), DNODE_HEAP_SIZE); 45 | } 46 | 47 | /* make_dlink_node() 48 | * 49 | * inputs - NONE 50 | * output - pointer to new dlink_node 51 | * side effects - NONE 52 | */ 53 | dlink_node * 54 | make_dlink_node(void) 55 | { 56 | dlink_node *lp = BlockHeapAlloc(dnode_heap); 57 | 58 | return(lp); 59 | } 60 | 61 | /* free_dlink_node() 62 | * 63 | * inputs - pointer to dlink_node 64 | * output - NONE 65 | * side effects - free given dlink_node 66 | */ 67 | void 68 | free_dlink_node(dlink_node *ptr) 69 | { 70 | BlockHeapFree(dnode_heap, ptr); 71 | } 72 | -------------------------------------------------------------------------------- /include/motd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * motd.h: A header for the MOTD functions. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id$ 23 | */ 24 | 25 | #ifndef INCLUDED_motd_h 26 | #define INCLUDED_motd_h 27 | #include "ircd_defs.h" 28 | 29 | 30 | #define MESSAGELINELEN 256 31 | 32 | struct MessageFileLine 33 | { 34 | char line[MESSAGELINELEN + 1]; 35 | struct MessageFileLine *next; 36 | }; 37 | 38 | typedef struct MessageFileLine MessageFileLine; 39 | 40 | typedef enum { 41 | USER_MOTD, 42 | USER_LINKS, 43 | OPER_MOTD, 44 | ISSUPPORT 45 | } MotdType; 46 | 47 | struct MessageFile 48 | { 49 | MotdType motdType; 50 | MessageFileLine *contentsOfFile; 51 | char fileName[PATH_MAX + 1]; 52 | char lastChangedDate[MAX_DATE_STRING + 1]; 53 | }; 54 | 55 | typedef struct MessageFile MessageFile; 56 | 57 | struct Client; 58 | 59 | extern void init_message_file(MotdType, const char *, struct MessageFile *); 60 | extern int send_message_file(struct Client *, struct MessageFile *); 61 | extern int read_message_file(MessageFile *); 62 | extern MessageFile *init_MessageLine(void); 63 | extern void addto_MessageLine(MessageFile *, const char *); 64 | extern void destroy_MessageLine(MessageFile *); 65 | 66 | #endif /* INCLUDED_motd_h */ 67 | -------------------------------------------------------------------------------- /modules/m_omotd.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * m_omotd.c: Shows the operator message of the day. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id$ 23 | */ 24 | 25 | #include "stdinc.h" 26 | #include "client.h" 27 | #include "tools.h" 28 | #include "motd.h" 29 | #include "ircd.h" 30 | #include "send.h" 31 | #include "numeric.h" 32 | #include "handlers.h" 33 | #include "hook.h" 34 | #include "msg.h" 35 | #include "s_serv.h" /* hunt_server */ 36 | #include "parse.h" 37 | #include "modules.h" 38 | #include "s_conf.h" 39 | 40 | static void m_omotd(struct Client*, struct Client*, int, char**); 41 | 42 | struct Message omotd_msgtab = { 43 | "OMOTD", 0, 0, 0, 1, MFLG_SLOW, 0, 44 | {m_unregistered, m_not_oper, m_ignore, m_ignore, m_omotd, m_ignore} 45 | }; 46 | #ifndef STATIC_MODULES 47 | 48 | void 49 | _modinit(void) 50 | { 51 | mod_add_cmd(&omotd_msgtab); 52 | } 53 | 54 | void 55 | _moddeinit(void) 56 | { 57 | mod_del_cmd(&omotd_msgtab); 58 | } 59 | 60 | const char *_version = "$Revision$"; 61 | #endif 62 | 63 | /* m_omotd() 64 | * 65 | * parv[0] = sender prefix 66 | */ 67 | static void 68 | m_omotd(struct Client *client_p, struct Client *source_p, 69 | int parc, char *parv[]) 70 | { 71 | send_message_file(source_p, &ConfigFileEntry.opermotd); 72 | } 73 | -------------------------------------------------------------------------------- /messages/README: -------------------------------------------------------------------------------- 1 | Translated message files (user/admin submitted) 2 | 3 | There are user submitted message files for ircd-hybrid-7. Read the 4 | example file in this directory (ircd-standard.example.lang) and the file 5 | doc/messages.txt to learn how to create, install, and possibly submit 6 | your own .lang files. 7 | 8 | At the present time, the following languages are supported: 9 | 10 | swedish - maintained by trbz - Chris C <chris@mircscripter.com> 11 | croatian - maintained by Martin - Vid Strpic <strpic@bofhlet.net> 12 | french - maintained by joshk - Joshua Kwan <joshk@triplehelix.org> 13 | german - maintained by dmalloc - Darian Lanx <bio@gmx.net> 14 | norwegian - maintained by inglish - Stephen Olsen <inglish@sol.no> 15 | danish - maintained by Xride - Soren Straarup Andersen <xride@eit.ihk-edu.dk> 16 | spanish - maintained by ermak - anonymous <ermak@cyberdude.com> 17 | dutch - maintained by Riedel - Dennis Vink <vink@vuurwerk.nl> 18 | polish - maintained by adx - Piotr Nizynski <adx@irc7.pl> 19 | russian - maintained by Ilya - Ilya Shtift <ishtift@tagil.svrw.ru> 20 | 21 | All of the files are installed into the prefix directory, under messages. 22 | Each is installed into a different directory, prefixed by ircd-. 23 | 24 | The message locale is settable at runtime with /quote SET MSGLOCALE language, 25 | ex. /quote SET MSGLOCALE ircd-german 26 | 27 | and via the message_locale="language"; in the general block of the ircd.conf. 28 | ex. message_locale="ircd-german"; 29 | 30 | -- 31 | The ircd-hybrid team is not accountable for any mistakes, mistranslations, or 32 | accidental insults from the use of one of the included translations. All 33 | translations are done by individuals who have given their time and skills to 34 | provide localized users with pre-built translations. The ircd-hybrid team 35 | will try, but cannot guarantee that the translations are up to date with the 36 | rest of the source tree, and with the "customized" messages. 37 | 38 | Contributions are welcome, at present time please send contributed translations 39 | to bugs@ircd-hybrid.org, hybrid@ircd-hybrid.org, or directly to one of the people 40 | who work with the translations. 41 | 42 | $Id$ 43 | -------------------------------------------------------------------------------- /include/s_gline.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * s_gline.h: A header for the gline functions. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id$ 23 | */ 24 | 25 | #ifndef INCLUDED_s_gline_h 26 | #define INCLUDED_s_gline_h 27 | 28 | #include "ircd_defs.h" 29 | 30 | struct AccessItem; 31 | 32 | extern void cleanup_glines(void *); 33 | extern struct AccessItem *find_is_glined(const char *, const char *); 34 | 35 | struct gline_pending 36 | { 37 | dlink_node node; 38 | 39 | char oper_nick1[NICKLEN + 1]; 40 | char oper_user1[USERLEN + 1]; 41 | char oper_host1[HOSTLEN + 1]; 42 | char oper_server1[HOSTLEN + 1]; 43 | char reason1[REASONLEN + 1]; 44 | time_t time_request1; 45 | 46 | char oper_nick2[NICKLEN + 1]; 47 | char oper_user2[USERLEN + 1]; 48 | char oper_host2[HOSTLEN + 1]; 49 | char oper_server2[HOSTLEN + 1]; 50 | char reason2[REASONLEN + 1]; 51 | time_t time_request2; 52 | 53 | time_t last_gline_time; /* for expiring entry */ 54 | char user[USERLEN * 2 + 2]; 55 | char host[HOSTLEN * 2 + 2]; 56 | }; 57 | 58 | /* 59 | * how long a pending G line can be around 60 | * 10 minutes should be plenty 61 | */ 62 | #define GLINE_PENDING_EXPIRE 600 63 | #define CLEANUP_GLINES_TIME 300 64 | 65 | extern dlink_list pending_glines; 66 | #endif /* INCLUDED_s_gline_h */ 67 | -------------------------------------------------------------------------------- /include/irc_getnameinfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the project nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * $Id: irc_getnameinfo.h 33 2005-10-02 20:50:00Z knight $ 30 | */ 31 | 32 | extern int irc_getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, 33 | size_t hostlen, char *serv, size_t servlen, int flags); 34 | 35 | #ifndef IN_MULTICAST 36 | #define IN_MULTICAST(a) ((((long int) (a)) & 0xf0000000) == 0xe0000000) 37 | #endif 38 | 39 | #ifndef IN_EXPERIMENTAL 40 | #define IN_EXPERIMENTAL(a) ((((long int) (a)) & 0xe0000000) == 0xe0000000) 41 | #endif 42 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Run this to generate all the initial makefiles, etc. 3 | # Shamelessly stolen from lighttpd - which is licensed under the GPL 4 | 5 | LIBTOOLIZE_FLAGS="--automake --ltdl --copy --force" 6 | AUTOMAKE_FLAGS="--add-missing" 7 | ACLOCAL_FLAGS="-I m4 --install" 8 | 9 | ARGV0=$0 10 | 11 | run() { 12 | echo "$ARGV0: running \`$@'" 13 | "$@" 14 | } 15 | 16 | ## jump out if one of the programs returns 'false' 17 | set -e 18 | 19 | ## on macosx glibtoolize, others have libtool 20 | if test x$LIBTOOLIZE = x; then 21 | if test \! x`which glibtoolize` = x; then 22 | LIBTOOLIZE=glibtoolize 23 | elif test \! x`which libtoolize-1.5` = x; then 24 | LIBTOOLIZE=libtoolize-1.5 25 | elif test \! x`which libtoolize` = x; then 26 | LIBTOOLIZE=libtoolize 27 | fi 28 | fi 29 | 30 | if test x$ACLOCAL = x; then 31 | if test \! x`which aclocal-1.14` = x; then 32 | ACLOCAL=aclocal-1.14 33 | AUTOMAKE=automake-1.14 34 | elif test \! x`which aclocal` = x; then 35 | ACLOCAL=aclocal 36 | AUTOMAKE=automake 37 | fi 38 | fi 39 | 40 | if test x$AUTOMAKE = x; then 41 | if test \! x`which automake-1.14` = x; then 42 | AUTOMAKE=automake-1.14 43 | elif test \! x`which automake` = x; then 44 | AUTOMAKE=automake 45 | fi 46 | fi 47 | 48 | 49 | ## macosx has autoconf-2.59 and autoconf-2.60 50 | if test x$AUTOCONF = x; then 51 | if test \! x`which autoconf-2.59` = x; then 52 | AUTOCONF=autoconf-2.59 53 | elif test \! x`which autoconf` = x; then 54 | AUTOCONF=autoconf 55 | fi 56 | fi 57 | 58 | if test x$AUTOHEADER = x; then 59 | if test \! x`which autoheader-2.59` = x; then 60 | AUTOHEADER=autoheader-2.59 61 | elif test \! x`which autoheader` = x; then 62 | AUTOHEADER=autoheader 63 | fi 64 | fi 65 | 66 | 67 | run $LIBTOOLIZE $LIBTOOLIZE_FLAGS 68 | run $ACLOCAL $ACLOCAL_FLAGS 69 | run $AUTOHEADER 70 | run $AUTOMAKE $AUTOMAKE_FLAGS 71 | run $AUTOCONF 72 | 73 | # update include/serno.h 74 | if [ -d .git ]; then 75 | REVISION=$(git describe --tags) 76 | echo "#define SERIALNUM \"$REVISION\"" > include/serno.h.new 77 | if ! diff include/serno.h.new include/serno.h > /dev/null; then 78 | mv include/serno.h.new include/serno.h 79 | fi 80 | rm -f include/serno.h.new 81 | fi 82 | 83 | run ./oftc-configure.sh "$@" 84 | -------------------------------------------------------------------------------- /modules/core/spy_motd_notice.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * spy_motd_notice.c: Sends a notice when someone uses MOTD. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id$ 23 | */ 24 | #include "stdinc.h" 25 | #ifndef STATIC_MODULES 26 | #include "tools.h" 27 | #include "modules.h" 28 | #include "hook.h" 29 | #include "client.h" 30 | #include "ircd.h" 31 | #include "send.h" 32 | 33 | static struct Callback *motd_cb = NULL; 34 | static dlink_node *prev_hook; 35 | 36 | static void *show_motd(va_list); 37 | 38 | void 39 | _modinit(void) 40 | { 41 | if ((motd_cb = find_callback("doing_motd"))) 42 | prev_hook = install_hook(motd_cb, show_motd); 43 | } 44 | 45 | void 46 | _moddeinit(void) 47 | { 48 | if (motd_cb) 49 | uninstall_hook(motd_cb, show_motd); 50 | } 51 | 52 | const char *_version = "$Revision: 33 $"; 53 | 54 | static void * 55 | show_motd(va_list args) 56 | { 57 | struct Client *source_p = va_arg(args, struct Client *); 58 | int parc = va_arg(args, int); 59 | char **parv = va_arg(args, char **); 60 | 61 | if (IsClient(source_p)) 62 | sendto_gnotice_flags(UMODE_SPY, L_ALL, me.name, &me, NULL, 63 | "motd requested by %s (%s@%s) [%s]", 64 | source_p->name, source_p->username, 65 | source_p->host, source_p->servptr->name); 66 | 67 | return pass_callback(prev_hook, source_p, parc, parv); 68 | } 69 | #endif 70 | -------------------------------------------------------------------------------- /modules/core/spy_info_notice.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * spy_info_notice.c: Sends a notice when someone uses INFO. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id$ 23 | */ 24 | 25 | #include "stdinc.h" 26 | #ifndef STATIC_MODULES 27 | #include "tools.h" 28 | #include "modules.h" 29 | #include "hook.h" 30 | #include "client.h" 31 | #include "ircd.h" 32 | #include "send.h" 33 | 34 | static struct Callback *info_cb = NULL; 35 | static dlink_node *prev_hook; 36 | 37 | static void *show_info(va_list args); 38 | 39 | void 40 | _modinit(void) 41 | { 42 | if ((info_cb = find_callback("doing_info"))) 43 | prev_hook = install_hook(info_cb, show_info); 44 | } 45 | 46 | void 47 | _moddeinit(void) 48 | { 49 | if (info_cb) 50 | uninstall_hook(info_cb, show_info); 51 | } 52 | 53 | const char *_version = "$Revision: 33 $"; 54 | 55 | static void * 56 | show_info(va_list args) 57 | { 58 | struct Client *source_p = va_arg(args, struct Client *); 59 | int parc = va_arg(args, int); 60 | char **parv = va_arg(args, char **); 61 | 62 | if (IsClient(source_p)) 63 | sendto_gnotice_flags(UMODE_SPY, L_ALL, me.name, &me, NULL, 64 | "info requested by %s (%s@%s) [%s]", 65 | source_p->name, source_p->username, 66 | source_p->host, source_p->servptr->name); 67 | 68 | return pass_callback(prev_hook, source_p, parc, parv); 69 | } 70 | #endif 71 | -------------------------------------------------------------------------------- /modules/core/spy_admin_notice.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * spy_admin_notice.c: Sends a notice when someone uses ADMIN. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id$ 23 | */ 24 | 25 | #include "stdinc.h" 26 | #ifndef STATIC_MODULES 27 | #include "tools.h" 28 | #include "modules.h" 29 | #include "hook.h" 30 | #include "client.h" 31 | #include "ircd.h" 32 | #include "send.h" 33 | 34 | static struct Callback *admin_cb = NULL; 35 | static dlink_node *prev_hook; 36 | 37 | static void *show_admin(va_list); 38 | 39 | void 40 | _modinit(void) 41 | { 42 | if ((admin_cb = find_callback("doing_admin"))) 43 | prev_hook = install_hook(admin_cb, show_admin); 44 | } 45 | 46 | void 47 | _moddeinit(void) 48 | { 49 | if (admin_cb) 50 | uninstall_hook(admin_cb, show_admin); 51 | } 52 | 53 | const char *_version = "$Revision: 33 $"; 54 | 55 | static void * 56 | show_admin(va_list args) 57 | { 58 | struct Client *source_p = va_arg(args, struct Client *); 59 | int parc = va_arg(args, int); 60 | char **parv = va_arg(args, char **); 61 | 62 | if (IsClient(source_p)) 63 | sendto_gnotice_flags(UMODE_SPY, L_ALL, me.name, &me, NULL, 64 | "admin requested by %s (%s@%s) [%s]", 65 | source_p->name, source_p->username, 66 | source_p->host, source_p->servptr->name); 67 | 68 | return pass_callback(prev_hook, source_p, parc, parv); 69 | } 70 | #endif 71 | -------------------------------------------------------------------------------- /include/listener.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * listener.h: A header for the listener code. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id$ 23 | */ 24 | 25 | #ifndef INCLUDED_listener_h 26 | #define INCLUDED_listener_h 27 | 28 | #define LISTENER_SSL 0x1 29 | #define LISTENER_HIDDEN 0x2 30 | #define LISTENER_SERVER 0x4 31 | 32 | #include "ircd_defs.h" 33 | #include "tools.h" 34 | #include "fdlist.h" 35 | 36 | struct Client; 37 | 38 | struct Listener 39 | { 40 | dlink_node listener_node; /* list node pointer */ 41 | const char* name; /* listener name */ 42 | fde_t fd; /* file descriptor */ 43 | int port; /* listener IP port */ 44 | int ref_count; /* number of connection references */ 45 | int active; /* current state of listener */ 46 | struct irc_ssaddr addr; /* virtual address or INADDR_ANY */ 47 | char vhost[HOSTLEN + 1]; /* virtual name of listener */ 48 | unsigned int flags; 49 | }; 50 | 51 | extern void add_listener(int, const char *, unsigned int); 52 | extern void close_listeners(void); 53 | extern const char *get_listener_name(const struct Listener *); 54 | extern void show_ports(struct Client *); 55 | extern void free_listener(struct Listener *); 56 | struct Listener *find_listener(int port, struct irc_ssaddr *addr); 57 | #endif /* INCLUDED_listener_h */ 58 | -------------------------------------------------------------------------------- /modules/core/spy_links_notice.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * spy_links_notice.c: Sends a notice when someone uses LINKS. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id$ 23 | */ 24 | 25 | #include "stdinc.h" 26 | #ifndef STATIC_MODULES 27 | #include "tools.h" 28 | #include "modules.h" 29 | #include "hook.h" 30 | #include "client.h" 31 | #include "ircd.h" 32 | #include "send.h" 33 | 34 | static struct Callback *links_cb = NULL; 35 | static dlink_node *prev_hook; 36 | 37 | static void *show_links(va_list); 38 | 39 | void 40 | _modinit(void) 41 | { 42 | if ((links_cb = find_callback("doing_links"))) 43 | prev_hook = install_hook(links_cb, show_links); 44 | } 45 | 46 | void 47 | _moddeinit(void) 48 | { 49 | if (links_cb) 50 | uninstall_hook(links_cb, show_links); 51 | } 52 | 53 | const char *_version = "$Revision: 33 $"; 54 | 55 | static void * 56 | show_links(va_list args) 57 | { 58 | struct Client *source_p = va_arg(args, struct Client *); 59 | int parc = va_arg(args, int); 60 | char **parv = va_arg(args, char **); 61 | 62 | if (IsClient(source_p)) 63 | sendto_gnotice_flags(UMODE_SPY, L_ALL, me.name, &me, NULL, 64 | "LINKS '%s' requested by %s (%s@%s) [%s]", 65 | parv[1] ? parv[1] : "", source_p->name, 66 | source_p->username, source_p->host, 67 | source_p->servptr->name); 68 | 69 | return pass_callback(prev_hook, source_p, parc, parv); 70 | } 71 | #endif 72 | -------------------------------------------------------------------------------- /include/packet.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * packet.h: A header for the packet functions. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id$ 23 | */ 24 | 25 | #ifndef INCLUDED_packet_h 26 | #define INCLUDED_packet_h 27 | 28 | #include "fdlist.h" 29 | 30 | /* 31 | * this hides in here rather than in defaults.h because it really shouldn't 32 | * be tweaked unless you *REALLY REALLY* know what you're doing! 33 | * Remember, messages are only anti-flooded on incoming from the client, not on 34 | * incoming from a server for a given client, so if you tweak this you risk 35 | * allowing a client to flood differently depending upon where they are on 36 | * the network.. 37 | * -- adrian 38 | */ 39 | /* MAX_FLOOD is the amount of lines in a 'burst' we allow from a client, 40 | * anything beyond MAX_FLOOD is limited to about one line per second. 41 | * 42 | * MAX_FLOOD_CONN is the amount of lines we allow from a client who has 43 | * just connected. this allows clients to rejoin multiple channels 44 | * without being so heavily penalised they excess flood. 45 | */ 46 | #define MAX_FLOOD 5 47 | #define MAX_FLOOD_BURST MAX_FLOOD * 8 48 | 49 | struct Callback; 50 | 51 | void *iorecv_default(va_list); 52 | extern struct Callback *iorecv_cb; 53 | extern struct Callback *iorecvctrl_cb; 54 | 55 | PF read_ctrl_packet; 56 | PF read_packet; 57 | PF flood_recalc; 58 | void flood_endgrace(struct Client *); 59 | 60 | #endif /* INCLUDED_packet_h */ 61 | -------------------------------------------------------------------------------- /include/s_log.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * s_log.h: A header for the logger functions. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id: s_log.h 33 2005-10-02 20:50:00Z knight $ 23 | */ 24 | 25 | #ifndef INCLUDED_s_log_h 26 | #define INCLUDED_s_log_h 27 | 28 | struct Client; 29 | 30 | #define L_CRIT 0 31 | #define L_ERROR 1 32 | #define L_WARN 2 33 | #define L_NOTICE 3 34 | #define L_TRACE 4 35 | #define L_INFO 5 36 | #define L_DEBUG 6 37 | 38 | extern void init_log(const char *); 39 | extern void reopen_log(const char *); 40 | extern void set_log_level(const int); 41 | extern int get_log_level(void); 42 | #if 1 43 | extern void ilog(const int, const char *, ...) __attribute__((format(printf, 2, 3))); 44 | #else 45 | extern void ilog(const int, const char *, ...); 46 | #endif 47 | extern const char *get_log_level_as_string(int); 48 | extern void log_user_exit(struct Client *); 49 | extern void log_oper_action(int type, const struct Client *, const char *, ...) __attribute__((format(printf, 3, 4))); 50 | extern void oftc_log(char *, ...) __attribute__((format(printf, 1, 2))); 51 | 52 | 53 | enum { 54 | LOG_OPER_TYPE, 55 | LOG_FAILED_OPER_TYPE, 56 | LOG_KLINE_TYPE, 57 | LOG_TEMP_KLINE_TYPE, 58 | LOG_RKLINE_TYPE, 59 | LOG_TEMP_RKLINE_TYPE, 60 | LOG_DLINE_TYPE, 61 | LOG_TEMP_DLINE_TYPE, 62 | LOG_GLINE_TYPE, 63 | LOG_KILL_TYPE, 64 | LOG_OPERSPY_TYPE, 65 | LOG_IOERR_TYPE 66 | }; 67 | 68 | #endif /* INCLUDED_s_log_h */ 69 | -------------------------------------------------------------------------------- /modules/m_eob.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * m_eob.c: Signifies the end of a server burst. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id$ 23 | */ 24 | 25 | #include "stdinc.h" 26 | #include "handlers.h" 27 | #include "client.h" 28 | #include "ircd.h" 29 | #include "numeric.h" 30 | #include "s_conf.h" 31 | #include "s_serv.h" 32 | #include "send.h" 33 | #include "msg.h" 34 | #include "parse.h" 35 | #include "modules.h" 36 | #include <stdlib.h> 37 | 38 | static void ms_eob(struct Client*, struct Client*, int, char**); 39 | 40 | struct Message eob_msgtab = { 41 | "EOB", 0, 0, 0, 0, MFLG_SLOW | MFLG_UNREG, 0, 42 | {m_unregistered, m_ignore, ms_eob, m_ignore, m_ignore, m_ignore} 43 | }; 44 | #ifndef STATIC_MODULES 45 | void 46 | _modinit(void) 47 | { 48 | mod_add_cmd(&eob_msgtab); 49 | } 50 | 51 | void 52 | _moddeinit(void) 53 | { 54 | mod_del_cmd(&eob_msgtab); 55 | } 56 | 57 | const char *_version = "$Revision$"; 58 | #endif 59 | 60 | /* 61 | * ms_eob - EOB command handler 62 | * parv[0] = sender prefix 63 | * parv[1] = servername 64 | */ 65 | static void 66 | ms_eob(struct Client *client_p, struct Client *source_p, 67 | int parc, char *parv[]) 68 | { 69 | sendto_gnotice_flags(UMODE_ALL, L_ALL, me.name, &me, NULL, 70 | "End of burst from %s (%d seconds)", 71 | source_p->name, 72 | (unsigned int)(CurrentTime - source_p->firsttime)); 73 | SetEob(client_p); 74 | } 75 | -------------------------------------------------------------------------------- /include/Makefile.am: -------------------------------------------------------------------------------- 1 | MAINTAINERCLEANFILES=Makefile.in setup.h.in setup.h.in~ 2 | noinst_HEADERS= balloc.h \ 3 | hook.h \ 4 | irc_string.h \ 5 | restart.h \ 6 | s_misc.h \ 7 | channel.h \ 8 | hostmask.h \ 9 | listener.h \ 10 | resv.h \ 11 | sprintf_irc.h \ 12 | channel_mode.h \ 13 | inet_misc.h \ 14 | list.h \ 15 | rlimits.h \ 16 | s_serv.h \ 17 | client.h \ 18 | ircd_defs.h \ 19 | memory.h \ 20 | rsa.h \ 21 | stdinc.h \ 22 | common.h \ 23 | ircd_getopt.h \ 24 | m_info.h \ 25 | s_auth.h \ 26 | supported.h \ 27 | dbuf.h \ 28 | ircd.h \ 29 | modules.h \ 30 | s_bsd.h \ 31 | s_user.h \ 32 | defaults.h \ 33 | ircd_handler.h \ 34 | motd.h \ 35 | s_conf.h \ 36 | tools.h \ 37 | event.h \ 38 | ircd_signal.h \ 39 | msg.h \ 40 | send.h \ 41 | userhost.h \ 42 | fdlist.h \ 43 | irc_getaddrinfo.h \ 44 | numeric.h \ 45 | serno.h \ 46 | fileio.h \ 47 | irc_getnameinfo.h \ 48 | packet.h \ 49 | setup.h.in \ 50 | whowas.h \ 51 | handlers.h \ 52 | irc_res.h \ 53 | parse.h \ 54 | s_gline.h \ 55 | hash.h \ 56 | irc_reslib.h \ 57 | patchlevel.h \ 58 | s_stats.h \ 59 | s_log.h 60 | -------------------------------------------------------------------------------- /modules/m_realhost.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * m_realhost.c: Sets a users real host(after cloaking). 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id$ 23 | * 24 | */ 25 | 26 | #include "stdinc.h" 27 | #include "handlers.h" 28 | #include "client.h" 29 | #include "hash.h" 30 | #include "ircd.h" 31 | #include "numeric.h" 32 | #include "s_conf.h" 33 | #include "s_stats.h" 34 | #include "s_user.h" 35 | #include "hash.h" 36 | #include "whowas.h" 37 | #include "s_serv.h" 38 | #include "send.h" 39 | #include "channel.h" 40 | #include "resv.h" 41 | #include "msg.h" 42 | #include "parse.h" 43 | #include "modules.h" 44 | #include "common.h" 45 | #include "packet.h" 46 | #include "irc_string.h" 47 | 48 | 49 | static void ms_realhost(struct Client *, struct Client *, int, char**); 50 | 51 | struct Message realhost_msgtab = { 52 | "REALHOST", 0, 0, 2, 0, MFLG_SLOW, 0, 53 | {m_ignore, m_ignore, ms_realhost, m_ignore} 54 | }; 55 | 56 | const char *_version = "$Revision 0.1$"; 57 | 58 | void _modinit(void) 59 | { 60 | mod_add_cmd(&realhost_msgtab); 61 | } 62 | 63 | void 64 | _moddeinit(void) 65 | { 66 | mod_del_cmd(&realhost_msgtab); 67 | } 68 | 69 | static void ms_realhost(struct Client *source_p, struct Client *client_p, int parc, char **parv) 70 | { 71 | struct Client *target_p; 72 | 73 | if ((target_p = find_person(client_p, parv[1])) == NULL) 74 | return; 75 | 76 | if(target_p->realhost[0] == '\0') 77 | strlcpy(target_p->realhost, parv[2], HOSTLEN); 78 | } 79 | 80 | -------------------------------------------------------------------------------- /modules/core/spy_stats_p_notice.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * spy_stats_p_notice.c: Sends a notice when someone uses STATS p. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id$ 23 | */ 24 | 25 | #include "stdinc.h" 26 | #ifndef STATIC_MODULES 27 | #include "tools.h" 28 | #include "modules.h" 29 | #include "hook.h" 30 | #include "client.h" 31 | #include "ircd.h" 32 | #include "send.h" 33 | 34 | static struct Callback *stats_cb = NULL; 35 | static dlink_node *prev_hook; 36 | 37 | static void *show_stats_p(va_list args); 38 | 39 | void 40 | _modinit(void) 41 | { 42 | if ((stats_cb = find_callback("doing_stats"))) 43 | prev_hook = install_hook(stats_cb, show_stats_p); 44 | } 45 | 46 | void 47 | _moddeinit(void) 48 | { 49 | if (stats_cb) 50 | uninstall_hook(stats_cb, show_stats_p); 51 | } 52 | 53 | const char *_version = "$Revision: 33 $"; 54 | 55 | static void * 56 | show_stats_p(va_list args) 57 | { 58 | struct Client *source_p = va_arg(args, struct Client *); 59 | int parc = va_arg(args, int); 60 | char **parv = va_arg(args, char **); 61 | 62 | if (parc < 2) 63 | return NULL; /* shouldn't happen */ 64 | 65 | if (parv[1][0] == 'p') 66 | sendto_gnotice_flags(UMODE_SPY, L_ALL, me.name, &me, NULL, 67 | "STATS p requested by %s (%s@%s) [%s]", 68 | source_p->name, source_p->username, 69 | source_p->host, source_p->servptr->name); 70 | 71 | return pass_callback(prev_hook, source_p, parc, parv); 72 | } 73 | #endif 74 | -------------------------------------------------------------------------------- /modules/m_log.c: -------------------------------------------------------------------------------- 1 | /* log.c - oftc specific server logging 2 | 3 | * Copyright (C) 2002 Stuart Walsh 4 | * 5 | * See file AUTHORS in IRC package for additional names of 6 | * the programmers. 7 | * 8 | * This program is free softwmare; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 1, or (at your option) 11 | * any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 21 | */ 22 | 23 | #include "stdinc.h" 24 | #include "common.h" 25 | #include "handlers.h" 26 | #include "client.h" 27 | #include "channel.h" 28 | #include "channel_mode.h" 29 | #include "hash.h" 30 | #include "ircd.h" 31 | #include "numeric.h" 32 | #include "s_serv.h" 33 | #include "send.h" 34 | #include "s_conf.h" 35 | #include "msg.h" 36 | #include "parse.h" 37 | #include "modules.h" 38 | #include "sprintf_irc.h" 39 | #include "irc_string.h" 40 | 41 | /* $Id$ */ 42 | 43 | static void mo_log(struct Client *client_p, struct Client *source_p, int parc, char **parv); 44 | 45 | const char* _version = "$Revision: 301 $"; 46 | 47 | struct Message log_msgtab = { 48 | "LOG", 0, 0, 2, 0, MFLG_SLOW, 0, 49 | {m_unregistered, m_not_oper, mo_log, m_ignore, mo_log, m_ignore} 50 | }; 51 | 52 | 53 | void _modinit(void) 54 | { 55 | mod_add_cmd(&log_msgtab); 56 | } 57 | 58 | void 59 | _moddeinit(void) 60 | { 61 | mod_del_cmd(&log_msgtab); 62 | } 63 | 64 | 65 | static void mo_log(struct Client *client_p, struct Client *source_p, int parc, char *parv[]) 66 | { 67 | FBFILE *logfile = NULL; 68 | char buf[IRCD_BUFSIZE+NICKLEN]; 69 | 70 | if(parc < 2) 71 | return; 72 | 73 | if (IsClient(source_p) && (logfile = fbopen(OFTCLOG, "a+")) != NULL) 74 | { 75 | ircsprintf(buf, "%s %s %s\n", 76 | myctime(time(NULL)), source_p->name, parv[1]); 77 | fbputs(buf, logfile, sizeof(buf)); 78 | fbclose(logfile); 79 | } 80 | return; 81 | } 82 | -------------------------------------------------------------------------------- /servlink/control.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, servlink/control.h 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 1, or (at your option) 7 | * any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | * 18 | * $Id$ 19 | */ 20 | 21 | #ifndef INCLUDED_servlink_control_h 22 | #define INCLUDED_servlink_control_h 23 | 24 | #define CMD_SET_ZIP_OUT_LEVEL 1 /* data */ 25 | #define CMD_START_ZIP_OUT 2 26 | #define CMD_START_ZIP_IN 3 27 | #define CMD_SET_CRYPT_IN_CIPHER 4 /* data */ 28 | #define CMD_SET_CRYPT_IN_KEY 5 /* data */ 29 | #define CMD_START_CRYPT_IN 6 30 | #define CMD_SET_CRYPT_OUT_CIPHER 7 /* data */ 31 | #define CMD_SET_CRYPT_OUT_KEY 8 /* data */ 32 | #define CMD_START_CRYPT_OUT 9 33 | #define CMD_INJECT_RECVQ 10 /* data */ 34 | #define CMD_INJECT_SENDQ 11 /* data */ 35 | #define CMD_INIT 12 36 | #define CMD_ZIPSTATS 13 37 | 38 | #define RPL_ERROR 1 /* data */ 39 | #define RPL_ZIPSTATS 2 /* data */ 40 | 41 | /* flags */ 42 | #define COMMAND_FLAG_DATA 0x0001 /* command has data 43 | following */ 44 | struct ctrl_command 45 | { 46 | unsigned int command; 47 | int datalen; 48 | int gotdatalen; 49 | int readdata; 50 | unsigned char *data; 51 | }; 52 | 53 | typedef void cmd_handler(struct ctrl_command *); 54 | 55 | struct command_def 56 | { 57 | unsigned int commandid; 58 | cmd_handler *handler; 59 | unsigned int flags; 60 | }; 61 | 62 | extern struct command_def command_table[]; 63 | #endif /* INCLUDED_servlink_control_h */ 64 | -------------------------------------------------------------------------------- /modules/m_gnotice.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * m_gnotice.c: Sends a NOTICE to all opers on the network 4 | * 5 | * Copyright (C) 2002 Stuart Walsh 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id$ 23 | */ 24 | 25 | #include "stdinc.h" 26 | #include "handlers.h" 27 | #include "client.h" 28 | #include "ircd.h" 29 | #include "numeric.h" 30 | #include "common.h" 31 | #include "s_conf.h" 32 | #include "s_serv.h" 33 | #include "send.h" 34 | #include "msg.h" 35 | #include "parse.h" 36 | #include "modules.h" 37 | 38 | #include "channel.h" 39 | #include "channel_mode.h" 40 | #include "hash.h" 41 | #include "msg.h" 42 | #include "packet.h" 43 | #include "irc_string.h" 44 | 45 | 46 | static void ms_gnotice(struct Client *, struct Client *, int, char **); 47 | 48 | struct Message gnotice_msgtab = { 49 | "GNOTICE", 0, 0, 3, 0, MFLG_SLOW | MFLG_UNREG, 0L, 50 | {m_ignore, m_ignore, ms_gnotice, m_ignore, m_ignore, m_ignore} 51 | }; 52 | 53 | #ifndef STATIC_MODULES 54 | 55 | void 56 | _modinit(void) 57 | { 58 | mod_add_cmd(&gnotice_msgtab); 59 | } 60 | 61 | void 62 | _moddeinit(void) 63 | { 64 | mod_del_cmd(&gnotice_msgtab); 65 | } 66 | 67 | const char *_version = "$Revision: 334 $"; 68 | #endif 69 | 70 | static void ms_gnotice(struct Client *client_p, 71 | struct Client *source_p, int parc, char *parv[]) 72 | { 73 | char* message; 74 | 75 | message = parv[3]; 76 | 77 | if (EmptyString(message) || EmptyString(parv[1])) 78 | { 79 | sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS), 80 | me.name, parv[0], "GNOTICE"); 81 | return; 82 | } 83 | 84 | sendto_gnotice_flags(atoi(parv[2]), L_ALL, parv[1], source_p, client_p, "%s", message); 85 | } 86 | -------------------------------------------------------------------------------- /modules/m_certfp.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * m_certfp.c: Sets a users certificate fingerprint 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id: m_realhost.c 612 2006-06-09 00:11:27Z stu $ 23 | * 24 | */ 25 | 26 | #include "stdinc.h" 27 | #include "handlers.h" 28 | #include "client.h" 29 | #include "hash.h" 30 | #include "ircd.h" 31 | #include "numeric.h" 32 | #include "s_conf.h" 33 | #include "s_misc.h" 34 | #include "s_stats.h" 35 | #include "s_user.h" 36 | #include "hash.h" 37 | #include "whowas.h" 38 | #include "s_serv.h" 39 | #include "send.h" 40 | #include "channel.h" 41 | #include "resv.h" 42 | #include "msg.h" 43 | #include "parse.h" 44 | #include "modules.h" 45 | #include "common.h" 46 | #include "packet.h" 47 | #include "irc_string.h" 48 | 49 | 50 | static void ms_certfp(struct Client *, struct Client *, int, char**); 51 | 52 | struct Message certfp_msgtab = { 53 | "CERTFP", 0, 0, 2, 0, MFLG_SLOW, 0, 54 | {m_ignore, m_ignore, ms_certfp, m_ignore} 55 | }; 56 | 57 | const char *_version = "$Revision 0.1$"; 58 | 59 | void _modinit(void) 60 | { 61 | mod_add_cmd(&certfp_msgtab); 62 | } 63 | 64 | void 65 | _moddeinit(void) 66 | { 67 | mod_del_cmd(&certfp_msgtab); 68 | } 69 | 70 | static void ms_certfp(struct Client *source_p, struct Client *client_p, int parc, char **parv) 71 | { 72 | struct Client *target_p; 73 | 74 | if ((target_p = find_person(client_p, parv[1])) == NULL) 75 | return; 76 | 77 | strlcpy(target_p->certfp, parv[2], sizeof(target_p->certfp)); 78 | 79 | sendto_server(client_p, NULL, NULL, NOCAPS, NOCAPS, NOFLAGS, 80 | ":%s CERTFP %s %s", parv[0], parv[1], parv[2]); 81 | } 82 | -------------------------------------------------------------------------------- /src/memory.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * memory.c: Memory utilities. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id: memory.c 33 2005-10-02 20:50:00Z knight $ 23 | */ 24 | 25 | 26 | #include "stdinc.h" 27 | #include "ircd_defs.h" 28 | #include "ircd.h" 29 | #include "irc_string.h" 30 | #include "memory.h" 31 | #include "list.h" 32 | #include "client.h" 33 | #include "send.h" 34 | #include "tools.h" 35 | #include "s_log.h" 36 | #include "restart.h" 37 | 38 | 39 | /* 40 | * MyMalloc - allocate memory, call outofmemory on failure 41 | */ 42 | void * 43 | MyMalloc(size_t size) 44 | { 45 | void *ret = calloc(1, size); 46 | 47 | if (ret == NULL) 48 | outofmemory(); 49 | return(ret); 50 | } 51 | 52 | /* 53 | * MyRealloc - reallocate memory, call outofmemory on failure 54 | */ 55 | inline void * 56 | MyRealloc(void *x, size_t y) 57 | { 58 | void *ret = realloc(x, y); 59 | 60 | if (ret == NULL) 61 | outofmemory(); 62 | return(ret); 63 | } 64 | 65 | inline void 66 | MyFree(void *x) 67 | { 68 | if (x) 69 | free(x); 70 | } 71 | 72 | inline void 73 | _DupString(char **x, const char *y) 74 | { 75 | (*x) = malloc(strlen(y) + 1); 76 | strcpy((*x), y); 77 | } 78 | 79 | /* outofmemory() 80 | * 81 | * input - NONE 82 | * output - NONE 83 | * side effects - simply try to report there is a problem. 84 | * Abort if it was called more than once 85 | */ 86 | void 87 | outofmemory(void) 88 | { 89 | static int was_here = 0; 90 | 91 | if (was_here) 92 | abort(); 93 | 94 | was_here = 1; 95 | 96 | ilog(L_CRIT, "Out of memory: restarting server..."); 97 | restart("Out of Memory"); 98 | } 99 | -------------------------------------------------------------------------------- /include/s_stats.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * s_stats.h: A header for the statistics functions. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id$ 23 | */ 24 | 25 | #ifndef INCLUDED_s_stats_h 26 | #define INCLUDED_s_stats_h 27 | 28 | struct Client; 29 | 30 | /* 31 | * statistics structures 32 | */ 33 | struct ServerStatistics { 34 | unsigned int is_cl; /* number of client connections */ 35 | unsigned int is_sv; /* number of server connections */ 36 | unsigned int is_ni; /* connection but no idea who it was */ 37 | 38 | uint64_t is_cbs; /* bytes sent to clients */ 39 | uint64_t is_cbr; /* bytes received from clients */ 40 | uint64_t is_sbs; /* bytes sent to servers */ 41 | uint64_t is_sbr; /* bytes received from servers */ 42 | time_t is_cti; /* time spent connected by clients */ 43 | time_t is_sti; /* time spent connected by servers */ 44 | unsigned int is_ac; /* connections accepted */ 45 | unsigned int is_ref; /* accepts refused */ 46 | unsigned int is_unco; /* unknown commands */ 47 | unsigned int is_wrdi; /* command going in wrong direction */ 48 | unsigned int is_unpf; /* unknown prefix */ 49 | unsigned int is_empt; /* empty message */ 50 | unsigned int is_num; /* numeric message */ 51 | unsigned int is_kill; /* number of kills generated on collisions */ 52 | unsigned int is_asuc; /* successful auth requests */ 53 | unsigned int is_abad; /* bad auth requests */ 54 | }; 55 | 56 | extern struct ServerStatistics *ServerStats; 57 | 58 | extern void init_stats(void); 59 | extern void tstats(struct Client *); 60 | 61 | #endif /* INCLUDED_s_stats_h */ 62 | -------------------------------------------------------------------------------- /help/opers/Makefile.am: -------------------------------------------------------------------------------- 1 | MAINTAINERCLEANFILES=Makefile.in 2 | ohelpdir=$(datadir)/@PACKAGE@/help/opers 3 | dist_ohelp_DATA= accept \ 4 | admin \ 5 | away \ 6 | capab \ 7 | cburst \ 8 | challenge \ 9 | client \ 10 | close \ 11 | cmode \ 12 | connect \ 13 | cryptlink \ 14 | die \ 15 | dline \ 16 | drop \ 17 | eob \ 18 | error \ 19 | etrace \ 20 | gline \ 21 | hash \ 22 | help \ 23 | index \ 24 | info \ 25 | invite \ 26 | ison \ 27 | join \ 28 | kick \ 29 | kill \ 30 | kline \ 31 | knock \ 32 | links \ 33 | list \ 34 | locops \ 35 | lusers \ 36 | map \ 37 | modlist \ 38 | modload \ 39 | modrestart \ 40 | modunload \ 41 | motd \ 42 | names \ 43 | nick \ 44 | notice \ 45 | omotd \ 46 | oper \ 47 | operwall \ 48 | part \ 49 | pass \ 50 | ping \ 51 | pong \ 52 | post \ 53 | privmsg \ 54 | quit \ 55 | rehash \ 56 | restart \ 57 | resv \ 58 | rkline \ 59 | rxline \ 60 | server \ 61 | set \ 62 | shedding \ 63 | sjoin \ 64 | squit \ 65 | stats \ 66 | svinfo \ 67 | testgecos \ 68 | testline \ 69 | testmask \ 70 | time \ 71 | topic \ 72 | trace \ 73 | uhelp \ 74 | umode \ 75 | undline \ 76 | ungline \ 77 | unkline \ 78 | unresv \ 79 | unxline \ 80 | user \ 81 | userhost \ 82 | users \ 83 | version \ 84 | wallops \ 85 | who \ 86 | whois \ 87 | whowas \ 88 | xline 89 | -------------------------------------------------------------------------------- /modules/core/spy_whois_notice.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * spy_whois_notice.c: Sends a notice when someone uses WHOIS. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id$ 23 | */ 24 | #include "stdinc.h" 25 | #ifndef STATIC_MODULES 26 | #include "tools.h" 27 | #include "modules.h" 28 | #include "hash.h" 29 | #include "hook.h" 30 | #include "client.h" 31 | #include "ircd.h" 32 | #include "send.h" 33 | 34 | static struct Callback *whois_cb = NULL; 35 | static dlink_node *prev_hook; 36 | 37 | static void *show_notice(va_list); 38 | 39 | void 40 | _modinit(void) 41 | { 42 | if ((whois_cb = find_callback("doing_whois"))) 43 | prev_hook = install_hook(whois_cb, show_notice); 44 | } 45 | 46 | void 47 | _moddeinit(void) 48 | { 49 | if (whois_cb) 50 | uninstall_hook(whois_cb, show_notice); 51 | } 52 | 53 | const char *_version = "$Revision: 33 $"; 54 | 55 | /* show_notice 56 | * 57 | * inputs - source_p, parc, parv 58 | * output - inherited 59 | * side effects - show a whois notice source_p does a /whois on client_p 60 | */ 61 | void * 62 | show_notice(va_list args) 63 | { 64 | struct Client *source_p = va_arg(args, struct Client *); 65 | int parc = va_arg(args, int); 66 | char **parv = va_arg(args, char **); 67 | struct Client *target_p; 68 | 69 | target_p = parv[1] ? find_client(parv[1]) : NULL; 70 | 71 | if (target_p != NULL && target_p != source_p) 72 | if (IsOper(target_p) && (target_p->umodes & UMODE_SPY)) 73 | { 74 | sendto_one(target_p, ":%s NOTICE %s :*** Notice -- %s (%s@%s) is doing " 75 | "a whois on you", me.name, target_p->name, source_p->name, 76 | source_p->username, source_p->host); 77 | } 78 | 79 | return pass_callback(prev_hook, source_p, parc, parv); 80 | } 81 | #endif 82 | -------------------------------------------------------------------------------- /src/Makefile.am: -------------------------------------------------------------------------------- 1 | MAINTAINERCLEANFILES=Makefile.in 2 | bin_PROGRAMS=ircd 3 | ircd_SOURCES= balloc.c \ 4 | channel.c \ 5 | channel_mode.c \ 6 | client.c \ 7 | csvlib.c \ 8 | dbuf.c \ 9 | dynlink.c \ 10 | event.c \ 11 | fdlist.c \ 12 | fileio.c \ 13 | getopt.c \ 14 | hash.c \ 15 | hook.c \ 16 | hostmask.c \ 17 | irc_getaddrinfo.c \ 18 | irc_getnameinfo.c \ 19 | irc_res.c \ 20 | irc_reslib.c \ 21 | irc_string.c \ 22 | ircd.c \ 23 | ircd_signal.c \ 24 | list.c \ 25 | listener.c \ 26 | m_error.c \ 27 | match.c \ 28 | memory.c \ 29 | modules.c \ 30 | motd.c \ 31 | packet.c \ 32 | parse.c \ 33 | s_conf.c \ 34 | s_bsd_epoll.c \ 35 | s_bsd_poll.c \ 36 | s_bsd_sigio.c \ 37 | s_bsd_devpoll.c \ 38 | s_bsd_kqueue.c \ 39 | s_bsd_select.c \ 40 | s_bsd_win32.c \ 41 | restart.c \ 42 | resv.c \ 43 | rsa.c \ 44 | s_auth.c \ 45 | s_bsd.c \ 46 | s_gline.c \ 47 | s_log.c \ 48 | s_misc.c \ 49 | s_serv.c \ 50 | s_user.c \ 51 | s_stats.c \ 52 | send.c \ 53 | sprintf_irc.c \ 54 | tools.c \ 55 | version.c \ 56 | whowas.c \ 57 | ircd_parser.y \ 58 | ircd_lexer.l 59 | 60 | if HAVE_CRYPT 61 | ircd_SOURCES+=crypt.c 62 | endif 63 | 64 | ircd_LDFLAGS=-export-dynamic $(OPENSSL_LDFLAGS) 65 | AM_CPPFLAGS=$(LTDLINCL) -I$(top_srcdir)/include -I$(top_srcdir)/lib/pcre $(OPENSSL_INCLUDES) 66 | 67 | if USE_SHARED_MODULES 68 | ircd_LDADD=$(LIBLTDL) 69 | ircd_DEPENDENCIES=$(LTDLDEPS) 70 | else 71 | ircd_LDADD=$(top_builddir)/modules/libmodules.la 72 | endif 73 | ircd_LDADD+=$(top_builddir)/lib/pcre/libpcre.a $(OPENSSL_LIBS) 74 | AM_YFLAGS=-d 75 | -------------------------------------------------------------------------------- /lib/pcre/pcre_tables.c: -------------------------------------------------------------------------------- 1 | /* $Id: pcre_tables.c 33 2005-10-02 20:50:00Z knight $ */ 2 | 3 | /************************************************* 4 | * Perl-Compatible Regular Expressions * 5 | *************************************************/ 6 | 7 | /* PCRE is a library of functions to support regular expressions whose syntax 8 | and semantics are as close as possible to those of the Perl 5 language. 9 | 10 | Written by Philip Hazel 11 | Copyright (c) 1997-2005 University of Cambridge 12 | 13 | ----------------------------------------------------------------------------- 14 | Redistribution and use in source and binary forms, with or without 15 | modification, are permitted provided that the following conditions are met: 16 | 17 | * Redistributions of source code must retain the above copyright notice, 18 | this list of conditions and the following disclaimer. 19 | 20 | * Redistributions in binary form must reproduce the above copyright 21 | notice, this list of conditions and the following disclaimer in the 22 | documentation and/or other materials provided with the distribution. 23 | 24 | * Neither the name of the University of Cambridge nor the names of its 25 | contributors may be used to endorse or promote products derived from 26 | this software without specific prior written permission. 27 | 28 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 29 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 30 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 31 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 32 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 33 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 34 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 35 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 36 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 37 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38 | POSSIBILITY OF SUCH DAMAGE. 39 | ----------------------------------------------------------------------------- 40 | */ 41 | 42 | 43 | /* This module contains some fixed tables that are used by more than one of the 44 | PCRE code modules. */ 45 | 46 | 47 | #include "pcre_internal.h" 48 | 49 | 50 | /* Table of sizes for the fixed-length opcodes. It's defined in a macro so that 51 | the definition is next to the definition of the opcodes in internal.h. */ 52 | 53 | const uschar _pcre_OP_lengths[] = { OP_LENGTHS }; 54 | 55 | /* End of pcre_tables.c */ 56 | -------------------------------------------------------------------------------- /doc/messages.txt: -------------------------------------------------------------------------------- 1 | Message Customization Overview 2 | 3 | $Id$ 4 | 5 | Copyright (c) 2005 by ircd-hybrid team 6 | 7 | ---------------------------------------------------------------------- 8 | 9 | Hybrid now supports its own .lang format for i18n'd IRC status messages. 10 | 11 | This document is split into two parts, using message files, and creating 12 | your own. 13 | 14 | ---------------------------------------------------------------------- 15 | 16 | Using Provided or Pre-made Message Files 17 | 18 | There are a number of message files provided with Hybrid 7. These can be 19 | found in the source tree in messages/. 20 | 21 | These files are NOT installed by default; run `make install' within the 22 | messages directory to install them and they will automatically be used 23 | unless the paths in defaults.h were not adhered to. 24 | 25 | These message files can be used in ircd once they are installed. Try the 26 | installed message file with /quote SET MSGLOCALE <locale> first. The 27 | locale will be 'standard' for the plain messages that are Hybrid's 28 | default. 29 | 30 | If the desired message file works without any issues, it can be set to be 31 | the default message file in the ircd.conf file. Refer to example.conf's 32 | documentation on the message_locale setting. 33 | 34 | ---------------------------------------------------------------------- 35 | 36 | Creating Your Own Messages 37 | 38 | This process is a little more complicated. The easiest way to start 39 | editing messages is to take ircd-standard.example.lang, make a copy, 40 | and change whichever status lines you wish. 41 | 42 | Once you have your customized message file ready, just copy it into the 43 | same place as the rest of the messages, typically $PREFIX/messages. 44 | 45 | If you think your .lang file deserves to be in the official distribution, 46 | submit it to us at bugs@ircd-hybrid.org. It must be complete and as error- 47 | free as you can make it since it is subject to public consumption. Providing 48 | a translation will be a way that nearly anyone who knows multiple languages 49 | to contribute to ircd, and get their name in the translation credits. 50 | 51 | When making such a translation, you should base it off 52 | ircd-standard.example.lang, which is a conversion of our base (English) 53 | messages.tab into the .lang format. You should edit it from there into your 54 | own language, and of course give credit to yourself and whoever else you 55 | may have done the translation with. Then, send it off to us, and we'll see 56 | what we can do. 57 | -------------------------------------------------------------------------------- /include/supported.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * supported.h: Header for 005 numeric etc... 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id$ 23 | */ 24 | 25 | #ifndef INCLUDED_supported_h 26 | #define INCLUDED_supported_h 27 | 28 | #include "channel.h" 29 | #include "ircd_defs.h" 30 | #include "s_serv.h" 31 | 32 | #define CASEMAP "rfc1459" 33 | 34 | /* ConfigChannel.use_knock ? " KNOCK" */ 35 | 36 | /* 37 | * - from mirc's versions.txt 38 | * 39 | * mIRC now supports the numeric 005 tokens: CHANTYPES=# and 40 | * PREFIX=(ohv)@%+ and can handle a dynamic set of channel and 41 | * nick prefixes. 42 | * 43 | * mIRC assumes that @ is supported on all networks, any mode 44 | * left of @ is assumed to have at least equal power to @, and 45 | * any mode right of @ has less power. 46 | * 47 | * mIRC has internal support for @%+ modes. 48 | * 49 | * $nick() can now handle all mode letters listed in PREFIX. 50 | * 51 | * Also added support for CHANMODES=A,B,C,D token (not currently 52 | * supported by any servers), which lists all modes supported 53 | * by a channel, where: 54 | * 55 | * A = modes that take a parameter, and add or remove nicks 56 | * or addresses to a list, such as +bIe for the ban, 57 | * invite, and exception lists. 58 | * 59 | * B = modes that change channel settings, but which take 60 | * a parameter when they are set and unset, such as 61 | * +k key, and -k key. 62 | * 63 | * C = modes that change channel settings, but which take 64 | * a parameter only when they are set, such as +l N, 65 | * and -l. 66 | * 67 | * D = modes that change channel settings, such as +imnpst 68 | * and take no parameters. 69 | * 70 | * All unknown/unlisted modes are treated as type D. 71 | */ 72 | 73 | #endif /* INCLUDED_supported_h */ 74 | -------------------------------------------------------------------------------- /include/msg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * msg.h: A header for the message handler structure. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id$ 23 | */ 24 | 25 | #ifndef INCLUDED_msg_h 26 | #define INCLUDED_msg_h 27 | 28 | #include "ircd_handler.h" 29 | 30 | /* 31 | * Message table structure 32 | */ 33 | struct Message 34 | { 35 | const char *cmd; 36 | unsigned int count; /* number of times command used */ 37 | unsigned int rcount; /* number of times command used by server */ 38 | unsigned int parameters; /* at least this many args must be passed 39 | * or an error will be sent to the user 40 | * before the m_func is even called 41 | */ 42 | unsigned int maxpara; /* maximum permitted parameters */ 43 | unsigned int flags; /* bit 0 set means that this command is allowed 44 | * to be used only on the average of once per 2 45 | * seconds -SRB 46 | */ 47 | unsigned long bytes; /* bytes received for this message */ 48 | /* 49 | * client_p = Connected client ptr 50 | * source_p = Source client ptr 51 | * parc = parameter count 52 | * parv = parameter variable array 53 | */ 54 | /* handlers: 55 | * UNREGISTERED, CLIENT, SERVER, ENCAP, OPER, DUMMY, LAST 56 | */ 57 | MessageHandler handlers[LAST_HANDLER_TYPE]; 58 | }; 59 | 60 | /* 61 | * Constants 62 | */ 63 | #define MFLG_SLOW 0x001 /* Command can be executed roughly 64 | * once per 2 seconds. 65 | */ 66 | #define MFLG_UNREG 0x002 /* Command available to unregistered 67 | * clients. 68 | */ 69 | 70 | #define MAXPARA 15 71 | 72 | #endif /* INCLUDED_msg_h */ 73 | -------------------------------------------------------------------------------- /src/restart.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * restart.c: Functions to allow the ircd to restart. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id$ 23 | */ 24 | 25 | #include "stdinc.h" 26 | #include "tools.h" 27 | #include "restart.h" 28 | #include "common.h" 29 | #include "fdlist.h" 30 | #include "ircd.h" 31 | #include "irc_string.h" 32 | #include "send.h" 33 | #include "s_log.h" 34 | #include "client.h" /* for UMODE_ALL */ 35 | #include "memory.h" 36 | 37 | void 38 | restart(const char *mesg) 39 | { 40 | static int was_here = 0; /* redundant due to restarting flag below */ 41 | 42 | if (was_here) 43 | abort(); 44 | was_here = 1; 45 | 46 | server_die(mesg, YES); 47 | } 48 | 49 | void 50 | server_die(const char *mesg, int rboot) 51 | { 52 | char buffer[IRCD_BUFSIZE]; 53 | dlink_node *ptr = NULL; 54 | struct Client *target_p = NULL; 55 | static int was_here = 0; 56 | 57 | if (rboot && was_here++) 58 | abort(); 59 | 60 | if (EmptyString(mesg)) 61 | snprintf(buffer, sizeof(buffer), "Server %s", 62 | rboot ? "Restarting" : "Terminating"); 63 | else 64 | snprintf(buffer, sizeof(buffer), "Server %s: %s", 65 | rboot ? "Restarting" : "Terminating", mesg); 66 | 67 | DLINK_FOREACH(ptr, local_client_list.head) 68 | { 69 | target_p = ptr->data; 70 | 71 | sendto_one(target_p, ":%s NOTICE %s :%s", 72 | me.name, target_p->name, buffer); 73 | } 74 | 75 | DLINK_FOREACH(ptr, serv_list.head) 76 | { 77 | target_p = ptr->data; 78 | 79 | sendto_one(target_p, ":%s ERROR :%s", me.name, buffer); 80 | } 81 | 82 | ilog(L_NOTICE, "%s", buffer); 83 | 84 | send_queued_all(); 85 | close_fds(NULL); 86 | 87 | unlink(pidFileName); 88 | 89 | if (rboot) 90 | { 91 | execv(SPATH, myargv); 92 | exit(1); 93 | } 94 | else 95 | exit(0); 96 | } 97 | -------------------------------------------------------------------------------- /include/hash.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * hash.h: A header for the ircd hashtable code. 4 | * 5 | * Copyright (C) 2002 by the past and present ircd coders, and others. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id$ 23 | */ 24 | 25 | #ifndef INCLUDED_hash_h 26 | #define INCLUDED_hash_h 27 | 28 | #define FNV1_32_INIT 0x811c9dc5 29 | #define FNV1_32_BITS 16 30 | #define FNV1_32_SIZE (1 << FNV1_32_BITS) /* 2^16 = 65536 */ 31 | #define HASHSIZE FNV1_32_SIZE 32 | 33 | struct Client; 34 | struct Channel; 35 | struct ResvChannel; 36 | struct UserHost; 37 | 38 | enum { 39 | HASH_TYPE_ID, 40 | HASH_TYPE_CLIENT, 41 | HASH_TYPE_CHANNEL, 42 | HASH_TYPE_USERHOST, 43 | HASH_TYPE_RESERVED 44 | }; 45 | 46 | extern void init_hash(void); 47 | extern void hash_add_client(struct Client *); 48 | extern void hash_del_client(struct Client *); 49 | extern void hash_add_channel(struct Channel *); 50 | extern void hash_del_channel(struct Channel *); 51 | extern void hash_add_resv(struct ResvChannel *); 52 | extern void hash_del_resv(struct ResvChannel *); 53 | extern void hash_add_id(struct Client *); 54 | extern void hash_del_id(struct Client *); 55 | extern void hash_add_userhost(struct UserHost *); 56 | extern void hash_del_userhost(struct UserHost *); 57 | extern void dump_userhosttable(struct Client *); 58 | 59 | extern struct UserHost *hash_find_userhost(const char *); 60 | extern struct Client *hash_find_id(const char *); 61 | extern struct Client *find_client(const char *); 62 | extern struct Client *find_server(const char *); 63 | extern struct Channel *hash_find_channel(const char *); 64 | extern void *hash_get_bucket(int, unsigned int); 65 | extern struct ResvChannel *hash_find_resv(const char *); 66 | 67 | extern void free_list_task(struct ListTask *, struct Client *); 68 | extern void safe_list_channels(struct Client *, struct ListTask *, int, int); 69 | 70 | extern unsigned int strhash(const char *); 71 | #endif /* INCLUDED_hash_h */ 72 | -------------------------------------------------------------------------------- /modules/m_post.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). 3 | * m_post.c: Exits the user if unregistered, it is a web form. 4 | * 5 | * Copyright (C) 2001-2002 Hybrid Development Team 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 20 | * USA 21 | * 22 | * $Id$ 23 | */ 24 | 25 | #include "stdinc.h" 26 | #include "handlers.h" 27 | #include "client.h" 28 | #include "ircd.h" 29 | #include "numeric.h" 30 | #include "s_serv.h" 31 | #include "send.h" 32 | #include "msg.h" 33 | #include "parse.h" 34 | #include "modules.h" 35 | #include "s_conf.h" 36 | 37 | static void mr_dumb_proxy(struct Client*, struct Client*, int, char**); 38 | 39 | struct Message post_msgtab = { 40 | "POST", 0, 0, 0, 0, MFLG_SLOW | MFLG_UNREG, 0, 41 | {mr_dumb_proxy, m_ignore, m_ignore, m_ignore, m_ignore, m_ignore} 42 | }; 43 | 44 | struct Message get_msgtab = { 45 | "GET", 0, 0, 0, 0, MFLG_SLOW | MFLG_UNREG, 0, 46 | {mr_dumb_proxy, m_ignore, m_ignore, m_ignore, m_ignore, m_ignore} 47 | }; 48 | 49 | struct Message put_msgtab = { 50 | "PUT", 0, 0, 0, 0, MFLG_SLOW | MFLG_UNREG, 0, 51 | {mr_dumb_proxy, m_ignore, m_ignore, m_ignore, m_ignore, m_ignore} 52 | }; 53 | 54 | 55 | #ifndef STATIC_MODULES 56 | void 57 | _modinit(void) 58 | { 59 | mod_add_cmd(&post_msgtab); 60 | mod_add_cmd(&get_msgtab); 61 | mod_add_cmd(&put_msgtab); 62 | } 63 | 64 | void 65 | _moddeinit(void) 66 | { 67 | mod_del_cmd(&post_msgtab); 68 | mod_del_cmd(&get_msgtab); 69 | mod_del_cmd(&put_msgtab); 70 | } 71 | 72 | const char *_version = "$Revision$"; 73 | #endif 74 | 75 | /* 76 | ** mr_dumb_proxy 77 | ** parv[0] = sender prefix 78 | ** parv[1] = comment 79 | */ 80 | static void 81 | mr_dumb_proxy(struct Client *client_p, struct Client *source_p, 82 | int parc, char *parv[]) 83 | { 84 | sendto_realops_flags(UMODE_REJ, L_ALL, 85 | "HTTP Proxy disconnected: [%s@%s]", 86 | client_p->username, client_p->host); 87 | exit_client(source_p, source_p, "Client Exit"); 88 | } 89 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | $Id$ 2 | 3 | - dynamically extensible parser for modules 4 | 5 | - modularize channel, network code etc (not just commands) 6 | we can use override_function() or similar for this 7 | => means prepared, now just make use of them 8 | 9 | - username/passwords (iauth ?) 10 | 11 | - make the reserved FD limit run-time tunable, esp from comm_open() 12 | This involves making fd_table[] a dynamically growing/(don't bother with 13 | shrinking) list.. have the max fd list configurable in the conf file.. 14 | => partially done, just turn HARD_FDLIMIT into a variable 15 | 16 | - Add the IRCnet(?) split logic for nick collisions - on a nick collision, 17 | change to "%d-%s", random, nick 18 | => this is rather equal to their /nick 0, ie set nick to user's UID 19 | 20 | ------------------------------------------------------------------------------ 21 | Little things to be done given enough time and initiative -Hwy 22 | 23 | . <Riedel> walter : have you implemented the motd= thing in the auth block ? 24 | . A FAQ 25 | . More translations! 26 | 27 | 28 | -- Rodder's list 29 | . Add scalable database-based authentication. Probably part of Iauth. 30 | Also add support for server-side notify with the list stored in the 31 | auth database. This would make ircd an awesome instant messaging 32 | back-end. 33 | => currently possible to do as a module 34 | 35 | 36 | -- Diane's list 37 | * add logging to ircd.log of possible channel floods 38 | * add code to log a minute worth of flooding if the ircd gets n possible 39 | flood messages on a channel in t seconds.. This log would be available 40 | to hand to authorities if requested. 41 | 42 | 43 | -- Josh's list 44 | * Find out the status of the build with IRIX64/MIPSpro. 45 | * Make modules.c more flexible in anticipation of Win32 modules usability. 46 | * LAZY LINKS ARE BROKEN!!! 47 | * TENDRA IS BROKEN! (Not quite our fault) 48 | * Fix lack of error message for oper initiating /connect that fails because 49 | it's a leaf. 50 | 51 | 52 | -- knight's list 53 | * Add Czechoslovakian support. 54 | * Database Authentication (IAUTH). 55 | * VMS, NetBSD, Mac OS X (testing and porting). 56 | * AMD64, Sparc(64) testing and development. 57 | * Re-work nickname collision code to change 58 | nicknames on collide rather than issue a 59 | server kill. 60 | 61 | 62 | -- adx's list 63 | * modularize parser, channel modes, member flags and more 64 | * split libio (engines, logging etc) from irc related sources? 65 | * implement ND/CD split logic 66 | * implement /nick 0 and uid addressing 67 | * more I/O backends (ports) 68 | * make STATIC_MODULES more flexible 69 | * get rid of conf attaching as much as possible 70 | 71 | 72 | -- metalrock's list 73 | * Fix that missing server connection timed out notice. 74 | --------------------------------------------------------------------------------