├── .clang-format ├── .clang-format-ignore ├── .editorconfig ├── .github └── workflows │ └── clangformat.yml ├── .gitignore ├── common ├── bsd.c ├── bsd_ext.h ├── class_def.h ├── common_def.h ├── dbuf.c ├── dbuf_def.h ├── dbuf_ext.h ├── irc_sprintf.c ├── irc_sprintf_body.c ├── irc_sprintf_ext.h ├── match.c ├── match_ext.h ├── numeric_def.h ├── os.h ├── packet.c ├── packet_ext.h ├── parse.c ├── parse_ext.h ├── patchlevel.h ├── send.c ├── send_ext.h ├── struct_def.h ├── support.c ├── support_def.h └── support_ext.h ├── configure ├── contrib ├── README ├── RULES ├── alis.README ├── ircdwatch │ ├── README │ ├── ircdwatch.8 │ └── ircdwatch.c ├── mkpasswd │ ├── Makefile │ ├── README │ └── mkpasswd.c └── mod_passwd │ ├── README │ └── mod_passwd.c ├── doc ├── 2.10-New ├── 2.11-New ├── 2.9-New ├── Authors ├── BUGS ├── ChangeLog ├── Etiquette ├── INSTALL.appendix ├── INSTALL.info ├── INSTALL.sgml ├── INSTALL.txt ├── ISO-3166-1 ├── Juped │ ├── Advertisement │ ├── ChangeLog.common │ ├── ChangeLog.doc │ ├── ChangeLog.include │ ├── ChangeLog.irc │ ├── ChangeLog.ircd │ ├── INSTALL │ └── US-Admin │ │ └── Networking ├── LICENSE ├── Makefile ├── Nets │ ├── Europe │ │ ├── CoordEBIC │ │ ├── IRCNO │ │ ├── InfoEBIC │ │ ├── RulesEBIC │ │ ├── links.eu │ │ └── rules │ └── IRCNet ├── README ├── RELEASE_LOG ├── RELEASE_NOTES ├── SERVICE.sgml ├── SERVICE.txt ├── alt-irc-faq ├── confsplit.txt ├── iauth-internals.txt ├── iauth.8 ├── iauth.conf.5 ├── iauth.conf.example ├── ircd.8 ├── ircd.conf.example ├── m4macros ├── rfc1459.txt ├── rfc2810.txt ├── rfc2811.txt ├── rfc2812.txt ├── rfc2813.txt ├── stats.info ├── stats.sgml ├── stats.txt ├── whoistls.txt └── whox.md ├── iauth ├── a_conf.c ├── a_conf_def.h ├── a_conf_ext.h ├── a_defines.h ├── a_externs.h ├── a_io.c ├── a_io_ext.h ├── a_log.c ├── a_log_def.h ├── a_log_ext.h ├── a_struct_def.h ├── iauth.c ├── mod_dnsbl.c ├── mod_dnsbl_ext.h ├── mod_pipe.c ├── mod_pipe_ext.h ├── mod_rfc931.c ├── mod_rfc931_ext.h ├── mod_socks.c ├── mod_socks_ext.h ├── mod_webproxy.c └── mod_webproxy_ext.h ├── ircd ├── buildm4 ├── channel.c ├── channel_def.h ├── channel_ext.h ├── chkconf.c ├── class.c ├── class_ext.h ├── config_read.c ├── fileio.c ├── fileio.h ├── hash.c ├── hash_def.h ├── hash_ext.h ├── ircd.c ├── ircd_ext.h ├── list.c ├── list_ext.h ├── nameser_def.h ├── patricia.c ├── patricia_ext.h ├── res.c ├── res_comp.c ├── res_comp_ext.h ├── res_def.h ├── res_ext.h ├── res_init.c ├── res_init_ext.h ├── res_mkquery.c ├── res_mkquery_ext.h ├── resolv_def.h ├── s_auth.c ├── s_auth_ext.h ├── s_bsd.c ├── s_bsd_ext.h ├── s_conf.c ├── s_conf_ext.h ├── s_debug.c ├── s_debug_ext.h ├── s_defines.h ├── s_err.c ├── s_err_ext.h ├── s_externs.h ├── s_id.c ├── s_id_ext.h ├── s_misc.c ├── s_misc_ext.h ├── s_numeric.c ├── s_numeric_ext.h ├── s_send.c ├── s_send_ext.h ├── s_serv.c ├── s_serv_ext.h ├── s_service.c ├── s_service_ext.h ├── s_user.c ├── s_user_ext.h ├── s_zip.c ├── s_zip_ext.h ├── service_def.h ├── sys_def.h ├── version.c.SH.in ├── version_ext.h ├── whowas.c ├── whowas_def.h └── whowas_ext.h └── support ├── Makefile.in ├── config.guess ├── config.h.dist ├── config.sub ├── configure ├── configure.in ├── install-sh ├── ircd.motd ├── mkdirhier ├── setup.h.in └── sums.in /.clang-format: -------------------------------------------------------------------------------- 1 | # Generated from CLion C/C++ Code Style settings 2 | BasedOnStyle: LLVM 3 | AccessModifierOffset: -4 4 | AlignAfterOpenBracket: Align 5 | AlignConsecutiveAssignments: None 6 | AlignOperands: Align 7 | AllowAllArgumentsOnNextLine: false 8 | AllowAllConstructorInitializersOnNextLine: false 9 | AllowAllParametersOfDeclarationOnNextLine: false 10 | AllowShortBlocksOnASingleLine: Always 11 | AllowShortCaseLabelsOnASingleLine: false 12 | AllowShortFunctionsOnASingleLine: All 13 | AllowShortIfStatementsOnASingleLine: Always 14 | AllowShortLambdasOnASingleLine: All 15 | AllowShortLoopsOnASingleLine: true 16 | AlwaysBreakAfterReturnType: None 17 | AlwaysBreakTemplateDeclarations: Yes 18 | BreakBeforeBraces: Custom 19 | BraceWrapping: 20 | AfterCaseLabel: false 21 | AfterClass: true 22 | AfterControlStatement: Always 23 | AfterEnum: true 24 | AfterFunction: true 25 | AfterNamespace: true 26 | AfterUnion: true 27 | BeforeCatch: false 28 | BeforeElse: true 29 | IndentBraces: false 30 | SplitEmptyFunction: false 31 | SplitEmptyRecord: true 32 | BreakBeforeBinaryOperators: None 33 | BreakBeforeTernaryOperators: true 34 | BreakConstructorInitializers: BeforeColon 35 | BreakInheritanceList: BeforeColon 36 | ColumnLimit: 0 37 | CompactNamespaces: false 38 | ContinuationIndentWidth: 8 39 | IndentCaseLabels: true 40 | IndentPPDirectives: None 41 | IndentWidth: 4 42 | KeepEmptyLinesAtTheStartOfBlocks: true 43 | MaxEmptyLinesToKeep: 2 44 | NamespaceIndentation: All 45 | ObjCSpaceAfterProperty: false 46 | ObjCSpaceBeforeProtocolList: true 47 | PointerAlignment: Right 48 | ReflowComments: false 49 | SpaceAfterCStyleCast: true 50 | SpaceAfterLogicalNot: false 51 | SpaceAfterTemplateKeyword: false 52 | SpaceBeforeAssignmentOperators: true 53 | SpaceBeforeCpp11BracedList: false 54 | Cpp11BracedListStyle: false 55 | SpaceBeforeCtorInitializerColon: true 56 | SpaceBeforeInheritanceColon: true 57 | SpaceBeforeParens: ControlStatements 58 | SpaceBeforeRangeBasedForLoopColon: false 59 | SpaceInEmptyParentheses: false 60 | SpacesBeforeTrailingComments: 0 61 | SpacesInAngles: false 62 | SpacesInCStyleCastParentheses: false 63 | SpacesInContainerLiterals: false 64 | SpacesInParentheses: false 65 | SpacesInSquareBrackets: false 66 | TabWidth: 4 67 | UseTab: ForContinuationAndIndentation 68 | -------------------------------------------------------------------------------- /.clang-format-ignore: -------------------------------------------------------------------------------- 1 | iauth/a_log_def.h 2 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # top-most EditorConfig file 2 | root = true 3 | 4 | # Unix-style newlines with a newline ending every file 5 | [*] 6 | end_of_line = lf 7 | insert_final_newline = true 8 | indent_style = tab 9 | tab_width = 4 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.github/workflows/clangformat.yml: -------------------------------------------------------------------------------- 1 | on: [pull_request] 2 | name: clang-format changed code 3 | jobs: 4 | check-clang-format: 5 | runs-on: ubuntu-24.04 6 | steps: 7 | - name: install clang-format 8 | run: sudo apt install clang-format-18 clang-format 9 | - uses: actions/checkout@v4 10 | - name: fetch target ref 11 | run: 12 | | 13 | refs=($(git log -1 --format=%s)) 14 | git fetch --depth=1 origin "${refs[3]}" 15 | - name: configure clang-format 16 | run: 17 | | 18 | git config clangformat.extensions c,h,xs 19 | - name: run git-clang-format and Check if no changes are needed 20 | run: 21 | | 22 | CLANG_FORMAT=clang-format-18 git clang-format --diff FETCH_HEAD HEAD | tee git-clang-format.diff 23 | cmp -s <(echo no modified files to format) git-clang-format.diff || cmp -s <(echo -n) git-clang-format.diff 24 | - uses: actions/upload-artifact@v4 25 | if: failure() 26 | with: 27 | name: git-clang-format.diff 28 | path: git-clang-format.diff 29 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircnet/ircd/c1afc3395e710a34cec4c3e27bbd16f2fcf3b181/.gitignore -------------------------------------------------------------------------------- /common/bsd_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, common/bsd_ext.h 3 | * Copyright (C) 1997 Alain Nissen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in common/bsd.c. 22 | */ 23 | 24 | /* External definitions for global variables. 25 | */ 26 | #ifndef BSD_C 27 | #ifdef DEBUGMODE 28 | extern int writecalls, writeb[]; 29 | #endif /* DEBUGMODE */ 30 | #endif /* BSD_C */ 31 | 32 | /* External definitions for global functions. 33 | */ 34 | #ifndef BSD_C 35 | #define EXTERN extern 36 | #else /* BSD_C */ 37 | #define EXTERN 38 | #endif /* BSD_C */ 39 | EXTERN RETSIGTYPE dummy (int s); 40 | EXTERN int deliver_it (aClient *cptr, char *str, int len); 41 | #undef EXTERN 42 | -------------------------------------------------------------------------------- /common/class_def.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, common/class_def.h 3 | * Copyright (C) 1990 Darren Reed 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | #ifdef ENABLE_CIDR_LIMITS 21 | struct _patricia_tree_t; 22 | #endif 23 | 24 | typedef struct Class { 25 | int class; 26 | int conFreq; 27 | int pingFreq; 28 | int maxLinks; 29 | int maxSendq; 30 | int maxBSendq; 31 | int maxHLocal; 32 | int maxUHLocal; 33 | int maxHGlobal; 34 | int maxUHGlobal; 35 | int links; 36 | #ifdef ENABLE_CIDR_LIMITS 37 | int cidr_len; 38 | int cidr_amount; 39 | struct _patricia_tree_t *ip_limits; 40 | #endif 41 | struct Class *next; 42 | } aClass; 43 | 44 | #define Class(x) ((x)->class) 45 | #define ConFreq(x) ((x)->conFreq) 46 | #define PingFreq(x) ((x)->pingFreq) 47 | #define MaxLinks(x) ((x)->maxLinks) 48 | #define MaxSendq(x) ((x)->maxSendq) 49 | #define MaxBSendq(x) ((x)->maxBSendq) 50 | #define MaxHLocal(x) ((x)->maxHLocal) 51 | #define MaxUHLocal(x) ((x)->maxUHLocal) 52 | #define MaxHGlobal(x) ((x)->maxHGlobal) 53 | #define MaxUHGlobal(x) ((x)->maxUHGlobal) 54 | #define Links(x) ((x)->links) 55 | #define IncSendq(x) MaxSendq(x) = (int)((float)MaxSendq(x) * 1.1) 56 | 57 | #define ConfLinks(x) (Class(x)->links) 58 | #define ConfMaxLinks(x) (Class(x)->maxLinks) 59 | #define ConfClass(x) (Class(x)->class) 60 | #define ConfConFreq(x) (Class(x)->conFreq) 61 | #define ConfPingFreq(x) (Class(x)->pingFreq) 62 | #define ConfSendq(x) (Class(x)->maxSendq) 63 | #define ConfMaxHLocal(x) (Class(x)->maxHLocal) 64 | #define ConfMaxUHLocal(x) (Class(x)->maxUHLocal) 65 | #define ConfMaxHGlobal(x) (Class(x)->maxHGlobal) 66 | #define ConfMaxUHGlobal(x) (Class(x)->maxUHGlobal) 67 | #ifdef ENABLE_CIDR_LIMITS 68 | #define MaxCidrAmount(x) ((x)->cidr_amount) 69 | #define CidrLen(x) ((x)->cidr_len) 70 | #define CidrTree(x) ((x)->ip_limits) 71 | #define ConfMaxCidrAmount(x) (Class(x)->cidr_amount) 72 | #define ConfCidrLen(x) (Class(x)->cidr_len) 73 | #define ConfCidrTree(x) (Class(x)->ip_limits) 74 | #endif 75 | 76 | #define FirstClass() classes 77 | #define NextClass(x) ((x)->next) 78 | -------------------------------------------------------------------------------- /common/common_def.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, common/common_def.h 3 | * Copyright (C) 1990 Armin Gruner 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | #define DupString(x,y) do {x = (char *)MyMalloc(strlen((char *)y) + 1);\ 21 | (void)strcpy((char *)x, (char *)y);\ 22 | } while(0) 23 | 24 | #undef tolower 25 | #define tolower(c) (tolowertab[(u_char)(c)]) 26 | 27 | #undef toupper 28 | #define toupper(c) (touppertab[(u_char)(c)]) 29 | 30 | #undef isalpha 31 | #undef isdigit 32 | #undef isxdigit 33 | #undef isalnum 34 | #undef isprint 35 | #undef isascii 36 | #undef isgraph 37 | #undef ispunct 38 | #undef islower 39 | #undef isupper 40 | #undef isspace 41 | 42 | #define PRINT 0x0001 43 | #define CNTRL 0x0002 44 | #define ALPHA 0x0004 45 | #define PUNCT 0x0008 46 | #define DIGIT 0x0010 47 | #define SPACE 0x0020 48 | #define NVALID 0x0040 49 | #define UVALID 0x0080 50 | 51 | #define isalpha(c) (char_atribs[(u_char)(c)]&ALPHA) 52 | #define isspace(c) (char_atribs[(u_char)(c)]&SPACE) 53 | #define islower(c) ((char_atribs[(u_char)(c)]&ALPHA) && \ 54 | ((u_char)(c) > (u_char)0x5f)) 55 | #define isupper(c) ((char_atribs[(u_char)(c)]&ALPHA) && \ 56 | ((u_char)(c) < (u_char)0x60)) 57 | #define isdigit(c) (char_atribs[(u_char)(c)]&DIGIT) 58 | #define isxdigit(c) (isdigit(c) || \ 59 | ((u_char)'a' <= (u_char)(c) && \ 60 | (u_char)(c) <= (u_char)'f') || \ 61 | ((u_char)'A' <= (u_char)(c) && \ 62 | (u_char)(c) <= (u_char)'F')) 63 | #define isalnum(c) (char_atribs[(u_char)(c)]&(DIGIT|ALPHA)) 64 | #define isprint(c) (char_atribs[(u_char)(c)]&PRINT) 65 | #define isascii(c) ((u_char)(c) <= (u_char)0x7f) 66 | #define isgraph(c) ((char_atribs[(u_char)(c)]&PRINT) && \ 67 | ((u_char)(c) != (u_char)0x20)) 68 | #define ispunct(c) (!(char_atribs[(u_char)(c)]&(CNTRL|ALPHA|DIGIT))) 69 | #define isvalidnick(c) (char_atribs[(u_char)(c)]&NVALID) 70 | #define isvaliduser(c) (char_atribs[(u_char)(c)]&UVALID) 71 | 72 | #ifdef DEBUGMODE 73 | # define Debug(x) debug x 74 | # define DO_DEBUG_MALLOC 75 | #else 76 | # define Debug(x) ; 77 | # define LOGFILE "/dev/null" 78 | #endif 79 | 80 | #if defined(CHKCONF_COMPILE) || defined(CLIENT_COMPILE) 81 | #undef ZIP_LINKS 82 | #endif 83 | -------------------------------------------------------------------------------- /common/dbuf_def.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, common/dbuf_def.h 3 | * Copyright (C) 1990 Markku Savela 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | #define DBUF_TAIL 21 | 22 | /* 23 | ** dbuf is a collection of functions which can be used to 24 | ** maintain a dynamic buffering of a byte stream. 25 | ** Functions allocate and release memory dynamically as 26 | ** required [Actually, there is nothing that prevents 27 | ** this package maintaining the buffer on disk, either] 28 | */ 29 | 30 | /* 31 | ** These structure definitions are only here to be used 32 | ** as a whole, *DO NOT EVER REFER TO THESE FIELDS INSIDE 33 | ** THE STRUCTURES*! It must be possible to change the internal 34 | ** implementation of this package without changing the 35 | ** interface. 36 | */ 37 | #if !defined(_SEQUENT_) 38 | typedef struct dbuf 39 | { 40 | u_int length; /* Current number of bytes stored */ 41 | u_int offset; /* Offset to the first byte */ 42 | struct dbufbuf *head; /* First data buffer, if length > 0 */ 43 | #ifdef DBUF_TAIL 44 | /* added by mnystrom@mit.edu: */ 45 | struct dbufbuf *tail; /* last data buffer, if length > 0 */ 46 | #endif 47 | } dbuf; 48 | #else 49 | typedef struct dbuf 50 | { 51 | uint length; /* Current number of bytes stored */ 52 | uint offset; /* Offset to the first byte */ 53 | struct dbufbuf *head; /* First data buffer, if length > 0 */ 54 | #ifdef DBUF_TAIL 55 | /* added by mnystrom@mit.edu: */ 56 | struct dbufbuf *tail; /* last data buffer, if length > 0 */ 57 | #endif 58 | } dbuf; 59 | #endif 60 | /* 61 | ** And this 'dbufbuf' should never be referenced outside the 62 | ** implementation of 'dbuf'--would be "hidden" if C had such 63 | ** keyword... 64 | ** If it was possible, this would compile to be exactly 1 memory 65 | ** page in size. 2048 bytes seems to be the most common size, so 66 | ** as long as a pointer is 4 bytes, we get 2032 bytes for buffer 67 | ** data after we take away a bit for malloc to play with. -avalon 68 | */ 69 | typedef struct dbufbuf 70 | { 71 | struct dbufbuf *next; /* Next data buffer, NULL if this is last */ 72 | char data[2032]; /* Actual data stored here */ 73 | } dbufbuf; 74 | 75 | /* 76 | ** DBufLength 77 | ** Return the current number of bytes stored into the buffer. 78 | ** (One should use this instead of referencing the internal 79 | ** length field explicitly...) 80 | */ 81 | #define DBufLength(dyn) ((dyn)->length) 82 | 83 | /* 84 | ** DBufClear 85 | ** Scratch the current content of the buffer. Release all 86 | ** allocated buffers and make it empty. 87 | */ 88 | #define DBufClear(dyn) dbuf_delete((dyn),DBufLength(dyn)) 89 | 90 | /* This is a dangerous define because a broken compiler will set DBUFSIZ 91 | ** to 4, which will work but will be very inefficient. However, there 92 | ** are other places where the code breaks badly if this is screwed 93 | ** up, so... -- Wumpus 94 | */ 95 | 96 | #define DBUFSIZ sizeof(((dbufbuf *)0)->data) 97 | -------------------------------------------------------------------------------- /common/dbuf_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, common/dbuf_ext.h 3 | * Copyright (C) 1997 Alain Nissen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in common/dbuf.c. 22 | */ 23 | 24 | /* External definitions for global variables. 25 | */ 26 | #ifndef DBUF_C 27 | extern u_int poolsize; 28 | extern dbufbuf *freelist; 29 | #endif /* DBUF_C */ 30 | 31 | /* External definitions for global functions. 32 | */ 33 | #ifndef DBUF_C 34 | #define EXTERN extern 35 | #else /* DBUF_C */ 36 | #define EXTERN 37 | #endif /* DBUF_C */ 38 | EXTERN void dbuf_init(void); 39 | EXTERN int dbuf_malloc_error (dbuf *dyn); 40 | EXTERN int dbuf_put (dbuf *dyn, char *buf, int length); 41 | EXTERN char *dbuf_map (dbuf *dyn, int *length); 42 | EXTERN int dbuf_delete (dbuf *dyn, int length); 43 | EXTERN int dbuf_get (dbuf *dyn, char *buf, int length); 44 | EXTERN int dbuf_copy (dbuf *dyn, register char *buf, int length); 45 | EXTERN int dbuf_getmsg (dbuf *dyn, char *buf, register int length); 46 | #undef EXTERN 47 | -------------------------------------------------------------------------------- /common/irc_sprintf.c: -------------------------------------------------------------------------------- 1 | /* 2 | * IRC - Internet Relay Chat, common/irc_sprintf.c 3 | * Copyright (C) 2002 Piotr Kucharski 4 | * 5 | * BSD licence applies. Yeah! 6 | * 7 | */ 8 | 9 | #ifndef lint 10 | static const volatile char rcsid[] = "$Id: irc_sprintf.c,v 1.5 2004/10/01 20:22:12 chopin Exp $"; 11 | #endif 12 | 13 | #define IRC_SPRINTF_C 14 | #include "irc_sprintf_ext.h" 15 | #undef IRC_SPRINTF_C 16 | 17 | /* 18 | * Our sprintf. Currently supports: 19 | * formats: %s, %d, %i, %u, %c, %%, %x, %X, %o 20 | * flags: l, ll, '-', '+', space, 0 (zeropadding), 0-9 (width), 21 | * '#' (for o,x,X only), '*' (width), '.' (precision) 22 | * 23 | * Soon will handle: %y/%Y returning ->name or ->uid 24 | * from an aClient pointer, depending on target. 25 | */ 26 | 27 | #define MAXDIGS 32 28 | #undef _NOLONGLONG 29 | 30 | #define MEMSET(c, n){register int k = n; while (k--) *buf++ = c;} 31 | #define MEMCPY(s, n){register int k = n; while (k--) *buf++ = *s++;} 32 | 33 | static char dtmpbuf[MAXDIGS]; /* scratch buffer for numbers */ 34 | 35 | int irc_sprintf(aClient *target, char *buf, char *format, ...) 36 | #include "irc_sprintf_body.c" 37 | 38 | #define IRC_SPRINTF_V 1 39 | 40 | int irc_vsprintf(aClient *target, char *buf, char *format, va_list ap) 41 | #include "irc_sprintf_body.c" 42 | 43 | #if 0 44 | error SN version is unsafe so far, sorry 45 | 46 | #define IRC_SPRINTF_SN 1 47 | 48 | int irc_vsnprintf(aClient *target, char *buf, size_t size, char *format, va_list ap) 49 | #include "irc_sprintf_body.c" 50 | 51 | #undef IRC_SPRINTF_V 52 | 53 | int irc_snprintf(aClient *target, char *buf, size_t size, char *format, ...) 54 | #include "irc_sprintf_body.c" 55 | 56 | #undef IRC_SPRINTF_SN 57 | 58 | #endif /* 0 */ 59 | 60 | -------------------------------------------------------------------------------- /common/match_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, common/match_ext.h 3 | * Copyright (C) 1997 Alain Nissen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in common/match.c. 22 | */ 23 | 24 | /* External definitions for global variables. 25 | */ 26 | #ifndef MATCH_C 27 | extern unsigned char tolowertab[]; 28 | extern unsigned char touppertab[]; 29 | extern unsigned char char_atribs[]; 30 | #endif /* MATCH_C */ 31 | 32 | /* External definitions for global functions. 33 | */ 34 | #ifndef MATCH_C 35 | #define EXTERN extern 36 | #else /* MATCH_C */ 37 | #define EXTERN 38 | #endif /* MATCH_C */ 39 | EXTERN int match (char *mask, char *name); 40 | EXTERN char *collapse (char *pattern); 41 | EXTERN int mycmp (char *s1, char *s2); 42 | EXTERN int myncmp (char *str1, char *str2, int n); 43 | EXTERN int isvalidusername (char *username); 44 | #undef EXTERN 45 | -------------------------------------------------------------------------------- /common/packet_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, common/packet_ext.h 3 | * Copyright (C) 1997 Alain Nissen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in common/packet.c. 22 | */ 23 | 24 | /* External definitions for global functions. 25 | */ 26 | #ifndef PACKET_C 27 | #define EXTERN extern 28 | #else /* PACKET_C */ 29 | #define EXTERN 30 | #endif /* PACKET_C */ 31 | EXTERN int dopacket (Reg aClient *cptr, char *buffer, Reg int length); 32 | #undef EXTERN 33 | -------------------------------------------------------------------------------- /common/parse_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, common/parse_ext.h 3 | * Copyright (C) 1997 Alain Nissen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in common/parse.c. 22 | */ 23 | 24 | /* External definitions for global variables. 25 | */ 26 | #ifndef PARSE_C 27 | extern struct Message msgtab[]; 28 | #endif /* PARSE_C */ 29 | 30 | /* External definitions for global functions. 31 | */ 32 | #ifndef PARSE_C 33 | #define EXTERN extern 34 | #else /* PARSE_C */ 35 | #define EXTERN 36 | #endif /* PARSE_C */ 37 | EXTERN aClient *find_client (char *name, Reg aClient *cptr); 38 | EXTERN aClient *find_uid (char *uid, Reg aClient *cptr); 39 | EXTERN aClient *find_sid (char *sid, Reg aClient *cptr); 40 | EXTERN aClient *find_service (char *name, Reg aClient *cptr); 41 | EXTERN aClient *find_server (char *name, Reg aClient *cptr); 42 | EXTERN aClient *find_mask (char *name, aClient *cptr); 43 | EXTERN aClient *find_name (char *name, aClient *cptr); 44 | EXTERN aClient *find_matching_client (char *mask); 45 | EXTERN aClient *find_target (char *name, aClient *cptr); 46 | EXTERN aClient *find_userhost (char *user, char *host, aClient *cptr, 47 | int *count); 48 | EXTERN aClient *find_person (char *name, aClient *cptr); 49 | EXTERN int parse (aClient *cptr, char *buffer, char *bufend); 50 | EXTERN char *getfield (char *irc_newline); 51 | EXTERN int m_nop(aClient *, aClient *, int, char **); 52 | EXTERN int m_nopriv(aClient *, aClient *, int, char **); 53 | EXTERN int m_unreg(aClient *, aClient *, int, char **); 54 | EXTERN int m_reg(aClient *, aClient *, int, char **); 55 | #undef EXTERN 56 | -------------------------------------------------------------------------------- /common/patchlevel.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, common/patchlevel.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 | 19 | #ifndef PATCHLEVEL 20 | #define PATCHLEVEL "0211030000" /* for server identification */ 21 | #endif 22 | #define IRC_VERSION "2.11.3" /* A 'readable' version string */ 23 | -------------------------------------------------------------------------------- /common/send_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, common/send_ext.h 3 | * Copyright (C) 1997 Alain Nissen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in common/send.c. 22 | */ 23 | 24 | /* External definitions for global functions. 25 | */ 26 | #ifndef SEND_C 27 | #define EXTERN extern 28 | #else /* SEND_C */ 29 | #define EXTERN 30 | #endif /* SEND_C */ 31 | EXTERN int send_queued (aClient *to); 32 | EXTERN int vsendto_one (aClient *to, char *pattern, va_list va); 33 | EXTERN int sendto_one (aClient *to, char *pattern, ...); 34 | EXTERN void logfiles_open(void); 35 | EXTERN void logfiles_close(void); 36 | EXTERN int send_message (aClient *, char *, int); 37 | EXTERN void flush_connections (int fd); 38 | EXTERN void flush_fdary (FdAry *); 39 | EXTERN void setup_svchans(void); 40 | EXTERN void sendto_flog (aClient *cptr, char msg, 41 | char *username, char *hostname); 42 | EXTERN void sendto_channel_butone (aClient *one, aClient *from, 43 | aChannel *chptr, char *pattern, ...); 44 | EXTERN void sendto_serv_butone (aClient *one, char *pattern, ...); 45 | EXTERN int sendto_serv_v (aClient *one, int ver, char *pattern, ...); 46 | EXTERN void sendto_common_channels (aClient *user, char *pattern, ...); 47 | EXTERN void sendto_channel_butserv (aChannel *chptr, aClient *from, 48 | char *pattern, ...); 49 | EXTERN void sendto_match_servs (aChannel *chptr, aClient *from, 50 | char *format, ...); 51 | EXTERN int sendto_match_servs_v (aChannel *chptr, aClient *from, int ver, 52 | char *format, ...); 53 | #if 0 54 | EXTERN int sendto_serv_notv (aClient *one, int ver, char *pattern, ...); 55 | EXTERN int sendto_match_servs_notv (aChannel *chptr, aClient *from, int ver, 56 | char *format, ...); 57 | #endif 58 | EXTERN void sendto_match_butone (aClient *one, aClient *from, char *mask, 59 | int what, char *pattern, ...); 60 | EXTERN void sendto_ops_butone (aClient *one, char *from, char *pattern, 61 | ...); 62 | EXTERN void sendto_prefix_one (aClient *to, aClient *from, char *pattern, 63 | ...); 64 | EXTERN void sendto_flag (u_int chan, char *pattern, ...); 65 | EXTERN void initanonymous(void); 66 | #undef EXTERN 67 | -------------------------------------------------------------------------------- /common/support_def.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, common/support_def.h 3 | * Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc. 4 | * Contributed by Torbjorn Granlund (tege@sics.se). 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 1, or (at your option) 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 | */ 20 | 21 | #ifdef __ptr_t 22 | #undef __ptr_t 23 | #endif 24 | #if defined (__STDC__) && __STDC__ 25 | #define __ptr_t void * 26 | #else 27 | #define __ptr_t char * 28 | #endif 29 | -------------------------------------------------------------------------------- /common/support_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, common/support_ext.h 3 | * Copyright (C) 1997 Alain Nissen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in common/support.c. 22 | */ 23 | 24 | /* External definitions for global functions. 25 | */ 26 | #ifndef SUPPORT_C 27 | #define EXTERN extern 28 | #else /* SUPPORT_C */ 29 | #define EXTERN 30 | #endif /* SUPPORT_C */ 31 | EXTERN char ipv6string[INET6_ADDRSTRLEN]; 32 | EXTERN char *mystrdup (char *s); 33 | #if !defined(HAVE_STRTOKEN) 34 | EXTERN char *strtoken (char **save, char *str, char *fs); 35 | #endif /* HAVE_STRTOKEN */ 36 | #if !defined(HAVE_STRTOK) 37 | /* 38 | * 2014-08-21 Piotr Kucharski 39 | * * support.c/support_ext.h: use const char for second param of strtok. 40 | */ 41 | EXTERN char *strtok (char *str, const char *fs); 42 | #endif /* HAVE_STRTOK */ 43 | EXTERN int snprintf_append(char *str, int size, int pos, const char *fmt, ...); 44 | #if !defined(HAVE_STRERROR) 45 | EXTERN char *strerror (int err_no); 46 | #endif /* HAVE_STRERROR */ 47 | EXTERN char *myctime (time_t value); 48 | EXTERN char *mybasename (char *); 49 | EXTERN char *inetntop(int af, const void *in, char *local_dummy, size_t the_size); 50 | EXTERN int inetpton(int af, const char *src, void *dst); 51 | #if !defined(HAVE_INET_NTOA) 52 | EXTERN char *inetntoa (char *in); 53 | #endif /* HAVE_INET_NTOA */ 54 | #if !defined(HAVE_INET_NETOF) 55 | EXTERN int inetnetof (struct in_addr in); 56 | #endif /* HAVE_INET_NETOF */ 57 | #if !defined(HAVE_INET_ADDR) 58 | EXTERN u_long inetaddr (register const char *cp); 59 | #endif /* HAVE_INET_ADDR */ 60 | #if !defined(HAVE_INET_ATON) 61 | EXTERN int inetaton (register const char *cp, struct in_addr *addr); 62 | #endif /* HAVE_INET_ATON */ 63 | #if defined(DEBUGMODE) && !defined(CLIENT_COMPILE) 64 | EXTERN void dumpcore (char *msg, ...); 65 | #endif /* DEBUGMODE && !CLIENT_COMPILE */ 66 | #if defined(DEBUGMODE) && !defined(CLIENT_COMPILE) && defined(DO_DEBUG_MALLOC) 67 | EXTERN char *MyMalloc (size_t x); 68 | EXTERN char *MyRealloc (char *x, size_t y); 69 | EXTERN void MyFree (void *x); 70 | #else /* DEBUGMODE && !CLIENT_COMPILE && !DO_DEBUG_MALLOC */ 71 | EXTERN char *MyMalloc (size_t x); 72 | EXTERN char *MyRealloc (char *x, size_t y); 73 | #endif /* DEBUGMODE && !CLIENT_COMPILE && !DO_DEBUG_MALLOC */ 74 | EXTERN int dgets (int fd, char *buf, int num); 75 | EXTERN char **make_isupport(void); 76 | #ifdef SOLARIS_2_3 77 | EXTERN struct hostent *solaris_gethostbyname (const char *name); 78 | #endif /* SOLARIS_2_3 */ 79 | #if defined(HAVE_MEMCMP) && defined(MEMCMP_BROKEN) 80 | EXTERN int irc_memcmp (const __ptr_t s1, const __ptr_t s2, size_t len); 81 | #endif /* HAVE_MEMCMP && MEMCMP_BROKEN */ 82 | #undef EXTERN 83 | -------------------------------------------------------------------------------- /configure: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | quick_fwd= 4 | for arg 5 | do 6 | case "$arg" in 7 | -help | --help | --hel | --he) 8 | quick_fwd=yes 9 | break ;; 10 | -version | --version | --versio | --versi | --vers) 11 | quick_fwd=yes 12 | break ;; 13 | *) 14 | break ;; 15 | esac 16 | done 17 | if test "x$quick_fwd" = xyes 18 | then 19 | support/configure $* 20 | else 21 | echo "retrieving the system name, type and OS release..." 22 | rev=`support/config.guess` 23 | if test "${rev}" # test for no output 24 | then 25 | echo " your system seems to be ${rev}." 26 | if test ! -d "${rev}" 27 | then 28 | echo "creating directory ${rev}..." 29 | mkdir "${rev}" 30 | fi 31 | cd "${rev}" 32 | echo "now working in directory ${rev}..." 33 | cp -p ../support/configure . 34 | if test ! -f config.h 35 | then 36 | echo "copying config.h from config.h.dist..." 37 | cp -p ../support/config.h.dist config.h 38 | fi 39 | # 2014-08-19 Kurt Roeckx 40 | # * configure: Use quotes when calling support/configure 41 | ./configure "$@" 42 | if test $? = 0 43 | then 44 | echo "Have you read doc/README? (I hope so)" 45 | echo "Next cd ${rev}, edit \"config.h\" and \"Makefile\"," 46 | echo "run \"make all\" to build and \"make install\" to install." 47 | fi 48 | else 49 | echo Failed to determine your host type, giving up. 50 | echo Perhaps you should specify it manually. 51 | fi 52 | fi 53 | -------------------------------------------------------------------------------- /contrib/README: -------------------------------------------------------------------------------- 1 | $Id: README,v 1.7 2001/10/20 17:57:23 q Exp $ 2 | 3 | ********************************************************************** 4 | DISCLAIMER: 5 | This directory contains programs or patches that have been contributed 6 | by other people and/or are not suitable for including in IRCD program. 7 | IRCD team bears no responsibility for bugs in these programs. 8 | ********************************************************************** 9 | 10 | Each contribution lives in its own directory under contrib/ and has a 11 | README file. For those which need to be compiled, this can be done in 12 | the same directory as you compiled irc and/or ircd. 13 | 14 | If you want to submit a package for this directory, see the RULES file. 15 | 16 | --- 17 | 18 | mkpasswd utility to crypt a password. 19 | ircdwatch utility to keep ircd running (eventually restarting it). 20 | mod_passwd example of DSM module for iauth 21 | -------------------------------------------------------------------------------- /contrib/RULES: -------------------------------------------------------------------------------- 1 | $Id: RULES,v 1.2 1998/11/09 20:07:12 kalt Exp $ 2 | 3 | This file describes how to prepare a package for inclusion 4 | in the contrib/ directory. The goal is to have a consistent 5 | setup for all contributions, making it easy to install any 6 | of them. 7 | 8 | * each package must have a README file (at least) explaining 9 | what it is about. 10 | * a man page would be nice ;-) 11 | 12 | * packages are stored in contrib/ 13 | 14 | * C programs: 15 | * If possible, use the same coding style as in the 16 | rest of the package. 17 | * They need to be portable 18 | * They should use "setup.h" or "os.h" 19 | * If needed, they may have a *.h file generated by configure 20 | * They are to be compiled from within the same 21 | directory as irc/ircd, using the same Makefile 22 | 23 | 24 | * questions, submissions should be sent to ircd-dev@irc.org 25 | -------------------------------------------------------------------------------- /contrib/alis.README: -------------------------------------------------------------------------------- 1 | 2 | ALIS - Advanced List Service 3 | http://aliserv.sourceforge.net/ 4 | 5 | This service is an alternative to the /LIST command. 6 | 7 | Unlike the LIST command ALIS has various search parameters such 8 | as minimum users per channel and searching for specific topics. 9 | 10 | The server has to be compiled with USE_SERVICES in config.h 11 | 12 | -------------------------------------------------------------------------------- /contrib/ircdwatch/README: -------------------------------------------------------------------------------- 1 | $Id: README,v 1.6 2001/10/20 17:57:23 q Exp $ 2 | 3 | DESCRIPTION 4 | =========== 5 | ircdwatch is a daemon that regularly checks to see if ircd is running. 6 | if ircd should die or somehow stop running, ircdwatch will respawn the 7 | ircd daemon. if desirable, ircdwatch can be configured to check if 8 | the ircd configuration file is changed and send a SIGHUP to the ircd 9 | daemon which then causes the daemon to reload the configuration 10 | file. 11 | 12 | the ircdwatch program itself is also used as sort of a remote 13 | control depending on what command line arguments you feed it. you 14 | can use it to start ircd and stop ircd and ircdwatch. 15 | 16 | OPTIONS 17 | ======= 18 | if you invoke ircdwatch without any command line arguments it will 19 | either daemonize itself and become a daemon, or it will exit if it 20 | detects that an ircdwatch daemon is already running. 21 | 22 | for using the ircdwatch program as a remote control the following 23 | command line options are available: 24 | 25 | --kill 26 | stop both ircdwatch and ircd 27 | 28 | --rest 29 | stop ircdwatch but leave ircd running 30 | 31 | --help 32 | list command line arguments 33 | 34 | 35 | COMPILE TIME CONFIGURATION 36 | ========================== 37 | you configure ircdwatch by editing config.h in the directory where 38 | you build ircd. the configuration parameters available for 39 | ircdwatch are those starting with the prefix "IRCDWATCH_". please 40 | refer to the config.h file for more information on the parameter 41 | settings. most of the defaults should be okay if you want to use 42 | ircdwatch though. 43 | 44 | 45 | ADMINISTRATIVIA 46 | =============== 47 | ircdwatch was written by Bjorn Borud and is 48 | Copyright (C) 1998 Bjorn Borud 49 | 50 | the program is released under the GNU General Public License 51 | 52 | the current maintainer can be reached at: 53 | 54 | please report bugs to 55 | improvements are welcome. 56 | 57 | -------------------------------------------------------------------------------- /contrib/ircdwatch/ircdwatch.8: -------------------------------------------------------------------------------- 1 | .\" @(#)$Id: ircdwatch.8,v 1.2 2001/10/20 17:57:23 q Exp $ 2 | .TH IRCDWATCH 8 "$Date: 2001/10/20 17:57:23 $" 3 | .SH NAME 4 | ircdwatch \- Daemon for monitoring ircd and ircd.conf 5 | .SH SYNOPSIS 6 | .hy 0 7 | .IP \fBircdwatch\fP 8 | [ 9 | .BI \-\-kill 10 | ] [ 11 | .BI \-\-rest 12 | ] [ 13 | .BI \-\-help 14 | ] 15 | .SH DESCRIPTION 16 | .LP 17 | \fIircdwatch\fP is a daemon that periodically checks that the 18 | \fIircd\fP daemon is running, restarting it of necessary. This 19 | daemon can also be configured (at compile time) to check for 20 | changes to the \fIircd\fP configuration file and make \fIircd\fP 21 | reload its configuration file by sending it a SIGHUP signal. 22 | .LP 23 | Given command line arguments \fIircdwatch\fP will serve as a remote 24 | control for stopping both \fIircdwatch\fP and \fIircd\fP or just 25 | \fIircdwatch\fP. 26 | 27 | .SH OPTIONS 28 | .TP 29 | .B \-\-kill 30 | Stop both \fIircd\fP and \fIircdwatch\fP 31 | .TP 32 | .B \-\-rest 33 | Stop \fIircdwatch\fP but leave \fIircd\fP running 34 | .TP 35 | .B \-\-help 36 | List command line arguments 37 | .SH COPYRIGHT 38 | Copyright (C) 1998 Bjorn Borud, 39 | .LP 40 | .RE 41 | .SH FILES 42 | "ircd.conf" 43 | "ircd.pid" 44 | "ircdwatch.pid" 45 | .SH "SEE ALSO" 46 | ircd(8) 47 | .SH BUGS 48 | There may be some portability issues. Report bugs to 49 | .SH AUTHOR 50 | Bjorn Borud, 51 | -------------------------------------------------------------------------------- /contrib/mkpasswd/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for the mkpasswd 2 | # CVS $Id: Makefile,v 1.2 2001/10/20 17:57:23 q Exp $ 3 | 4 | CC=gcc 5 | CFLAGS = -O2 -Wall 6 | LDFLAGS = -lcrypt 7 | 8 | OBJS = mkpasswd.o 9 | SRCS = mkpasswd.c 10 | 11 | .c.o: 12 | $(CC) $(CFLAGS) -c $< 13 | 14 | all: mkpasswd 15 | 16 | clean: 17 | /bin/rm -rf *.o core *.core 18 | 19 | mkpasswd: $(OBJS) 20 | $(CC) $(CFLAGS) $(OBJS) -o $@ $(LDFLAGS) 21 | 22 | # Catch any changes in compilation options at the top of this file 23 | $(OBJS): Makefile 24 | -------------------------------------------------------------------------------- /contrib/mkpasswd/README: -------------------------------------------------------------------------------- 1 | mkpasswd.c documentation 2 | $Id: README,v 1.3 2002/11/29 00:29:17 jv Exp $ 3 | 4 | This is documentation for the updated mkpasswd.c included with a number 5 | of ircd, irc services, and non-IRC related programs 6 | 7 | This version of mkpasswd can create DES, Extended DES, BlowFish, and MD5 8 | passwords, with either randomly generated or user provided salts. 9 | 10 | Options: 11 | -m Generate an MD5 password 12 | -d Generate a DES password 13 | -b Generate a BlowFish password 14 | -e Generate an Extended (BSDi) DES password 15 | -l Specify a length for a random MD5 or BlowFish salt 16 | -r Specify a number of rounds for a BlowFish or Extended DES password 17 | BlowFish: no more than 6 recommended, no less than 4 accepted 18 | Extended DES: default of 25 19 | -s Specify a salt, 2 alphanumeric characters for DES, up to 16 for MD5, 20 | up to 22 for BlowFish, 2 for Extended DES 21 | -p Specify a plaintext password to use 22 | -? Get brief help 23 | -h Get extended help 24 | 25 | Without the presence of any parameters, it'll behave like the old mkpasswd, 26 | creating a DES password with a randomly generated salt and prompting for 27 | the password (without echo). 28 | 29 | A DES salt is a pair of alphanumeric characters ('.' and '/' are permitted 30 | as well), such as 'a4' or 'Td'. 31 | 32 | An MD5 salt consists of up to 16 (though most implementations limit you to 33 | 8) alphanumeric characters (plus '.' and '/'), 34 | such as 'tGd' or 'J6d4dfG'. 35 | 36 | A BlowFish salt consists of up to 22 alphanumeric characters (plus '.' and 37 | '/'). BlowFish also specifies a number of rounds*, by default 4. 38 | 39 | Known bugs: 40 | The encryption algorithms supported depend on your system's crypt() 41 | implementation. 42 | The maximum length of an MD5 salt is limited to your systems crypt() 43 | implementation, typically 8. 44 | 45 | Supported Platforms (Known and tested): 46 | Linux glibc (DES and MD5) 47 | FreeBSD 3.x (DES (MD5 maybe)) 48 | FreeBSD 4.x (DES, MD5, BlowFish, Extended DES) 49 | Solaris 2.5-2.6 (DES only) 50 | Cygwin 1.1.4 (DES only) 51 | Prior Cygwin with the MD5 libcrypt (MD5 only) 52 | OpenBSD 2.7 (don't link with -lcrypt) (DES, MD5, Blowfish) 53 | Mac OS-X (Darwin) (don't link with -lcrypt) (DES only) 54 | NetBSD 1.6 (DES, MD5, Extended DES) 55 | 56 | OpenVMS (MD5, with the included crypt.c implementation, Purdy) 57 | 58 | VMS Support works, but it unsupported by me. 59 | An MMK build script is included, as well as an MD5 crypt() implementation 60 | 61 | Other systems probably work, but they haven't been amply tested. 62 | 63 | * BlowFish's rounds parameter is a logarithm, not an integer value 64 | -------------------------------------------------------------------------------- /contrib/mod_passwd/README: -------------------------------------------------------------------------------- 1 | $Id: README,v 1.1 1999/03/13 23:06:15 kalt Exp $ 2 | 3 | This is an example module for the authentication program (iauth) used by 4 | the IRC server. 5 | 6 | * This module demonstrates how a module can access and use the PASS and 7 | USER information provided by users. It is *NOT* a finished product. In 8 | particular, the actual password validation is not implemented. 9 | 10 | * This module also demonstrates how a DSM module should be written. You'll 11 | note that it is completely identical to ordinary modules, except for one 12 | extra function: "passwd_load()" 13 | 14 | To be used, this module needs to be compiled from the normal compilation 15 | directory. It should be linked as a dynamic library. Methods vary 16 | depending on the compiler and platform. 17 | 18 | $ gcc -c -g -I../iauth -I../common -I. ../contrib/mod_passwd/mod_passwd.c 19 | $ ld -Bshareable mod_passwd.o -o mod_passwd.so 20 | $ ls -l mod_passwd.so 21 | -rwxr--r-- 1 kalt staff 26932 Mar 13 17:59 mod_passwd.so 22 | $ 23 | 24 | To be used by iauth, add the following lines to the iauth.conf file: 25 | 26 | extinfo 27 | shared passwd /path/to/mod_passwd.so 28 | module passwd 29 | 30 | See iauth.conf(5) for more information on configuring iauth. 31 | -------------------------------------------------------------------------------- /contrib/mod_passwd/mod_passwd.c: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, mod_passwd.c 3 | * Copyright (C) 1999 Christophe Kalt 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | #ifndef lint 21 | static const volatile char rcsid[] = "@(#)$Id: mod_passwd.c,v 1.3 2004/10/01 20:22:13 chopin Exp $"; 22 | #endif 23 | 24 | #include "os.h" 25 | #include "a_defines.h" 26 | #include "a_externs.h" 27 | 28 | /* 29 | * passwd_init 30 | * 31 | * This procedure is called when a particular module is loaded. 32 | * Returns NULL if everything went fine, 33 | * an error message otherwise. 34 | */ 35 | char *passwd_init(AnInstance *self) 36 | { 37 | return NULL; 38 | } 39 | 40 | /* 41 | * passwd_release 42 | * 43 | * This procedure is called when a particular module is unloaded. 44 | */ 45 | void passwd_release(AnInstance *self) 46 | { 47 | } 48 | 49 | /* 50 | * passwd_stats 51 | * 52 | * This procedure is called regularly to update statistics sent to ircd. 53 | */ 54 | void passwd_stats(AnInstance *self) 55 | { 56 | } 57 | 58 | /* 59 | * passwd_start 60 | * 61 | * This procedure is called to start an authentication. 62 | * Returns 0 if everything went fine, 63 | * +1 if still waiting for some data (username, password).. 64 | * -1 otherwise (nothing to be done, or failure) 65 | * 66 | * It is responsible for sending error messages where appropriate. 67 | * In case of failure, it's responsible for cleaning up (e.g. passwd_clean 68 | * will NOT be called) 69 | */ 70 | int passwd_start(u_int cl) 71 | { 72 | if (cldata[cl].authuser && 73 | cldata[cl].authfrom < cldata[cl].instance->in) 74 | { 75 | /* 76 | ** another instance preceding this one in the configuration 77 | ** has already authenticated the user, no need to bother 78 | ** doing anything here then. (the other takes precedence) 79 | */ 80 | return -1; 81 | } 82 | if ((cldata[cl].state & A_GOTU) == 0) 83 | /* haven't received username/password pair from ircd yet */ 84 | return 1; 85 | if ((cldata[cl].state & A_GOTP) == 0) 86 | { 87 | /* no password to check -> reject user! */ 88 | cldata[cl].state |= A_DENY; 89 | sendto_ircd("K %d %s %u ", cl, cldata[cl].itsip, 90 | cldata[cl].itsport); 91 | return -1; /* done */ 92 | } 93 | /* 94 | ** 95 | ** 96 | ** INSERT FUNCTION TO CHECK PASSWORD VALIDITY 97 | ** 98 | ** 99 | */ 100 | /* if failure, see above */ 101 | /* if success: */ 102 | cldata[cl].state |= A_UNIX; 103 | if (cldata[cl].authuser) 104 | free(cldata[cl].authuser); 105 | cldata[cl].authuser = mystrdup(cldata[cl].user); 106 | cldata[cl].authfrom = cldata[cl].instance->in; 107 | sendto_ircd("U %d %s %u %s", cl, cldata[cl].itsip, cldata[cl].itsport, 108 | cldata[cl].authuser); 109 | return -1; /* done */ 110 | } 111 | 112 | /* 113 | * passwd_work 114 | * 115 | * This procedure is called whenever there's new data in the buffer. 116 | * Returns 0 if everything went fine, and there is more work to be done, 117 | * Returns -1 if the module has finished its work (and cleaned up). 118 | * 119 | * It is responsible for sending error messages where appropriate. 120 | */ 121 | int passwd_work(u_int cl) 122 | { 123 | return -1; 124 | } 125 | 126 | /* 127 | * passwd_clean 128 | * 129 | * This procedure is called whenever the module should interrupt its work. 130 | * It is responsible for cleaning up any allocated data, and in particular 131 | * closing file descriptors. 132 | */ 133 | void passwd_clean(u_int cl) 134 | { 135 | } 136 | 137 | /* 138 | * passwd_timeout 139 | * 140 | * This procedure is called whenever the timeout set by the module is 141 | * reached. 142 | * 143 | * Returns 0 if things are okay, -1 if authentication was aborted. 144 | */ 145 | int passwd_timeout(u_int cl) 146 | { 147 | } 148 | 149 | static aModule Module_passwd = 150 | { "passwd", passwd_init, passwd_release, passwd_stats, 151 | passwd_start, passwd_work, passwd_timeout, passwd_clean }; 152 | 153 | aModule * 154 | passwd_load() 155 | { 156 | return &Module_passwd; 157 | } 158 | 159 | -------------------------------------------------------------------------------- /doc/2.10-New: -------------------------------------------------------------------------------- 1 | * +a (away) user mode 2 | This user mode is used to propagate users' away status between 3 | servers. 4 | 5 | * added channel mode +e (exceptions to bans). 6 | * added channel mode +I (invitations). 7 | * invites can now be used to override channel bans and limit. 8 | * banned users cannot speak on channel without +o/+v. 9 | * ! channels introduced (can't be collided); 10 | A quite detailed technical description can be found on the web: 11 | http://www.stealth.net/~kalt/irc/channel.html 12 | 13 | * NJOIN for 2.10 <-> 2.10 communication on connect bursts instead of 14 | the combined JOIN/MODE introduced by 2.9 (and now deprecated) 15 | 16 | * a slave process is now used to authenticate incoming connections. 17 | The slave's modular design makes it easy to add new authentication 18 | modules. 19 | -------------------------------------------------------------------------------- /doc/2.9-New: -------------------------------------------------------------------------------- 1 | * +a (anonymous) channel mode 2 | 3 | This channel mode is only allowed on &local channels. 4 | 5 | * +s user mode removed; 6 | * &KILLS, &NOTICES, &ERRORS, &CHANNEL, &HASH, &NUMERICS, &SERVERS 7 | channels created and used by the server for server notices 8 | (comments on what goes where please) and dividing notices up this 9 | way was better than using more user modes (they default to the 10 | server being on them and +amnt); 11 | 12 | &KILLS : server and oper KILLS 13 | &NOTICES : warnings and notices 14 | &ERRORS : server errors 15 | &LOCAL : notices concerning local clients. 16 | &CHANNEL : fake modes 17 | &HASH : hash tables growth 18 | &NUMERICS : numerics received by the server 19 | &SERVERS : servers joining and leaving the net 20 | 21 | * + channels reintroduced (can't have modes); 22 | * Config doesn't prompt for cc/includes/libs; 23 | * M-line doesn't define port, PORTNUM removed from config.h (must use 24 | P-lines or use inetd); 25 | * BIND 4.9.2 libresolv stuff included; 26 | * USERHOST will return as many id's as requested. 27 | * RECONNECT to pickup error'd sserver-server links (not activated) 28 | * chooses next bigger prime for hash table sizes rather than 29 | needing exact primes 30 | * hash tables grow to suit rather than being static in size 31 | * adaptive growth of sendq (suggested by msa) 32 | * Server parameter in USER message tokenised betweem 2.9 servers 33 | * whowas tables grow to suit rather than being static in size 34 | * NICK+USER+UMODE combined into NICK for 2.9 <-> 2.9 communication 35 | * MODE +ov and JOIN combined into JOIN for 2.9 <-> 2.9 communication 36 | on connect bursts 37 | * QUIT removed when possible for 2.9 <-> 2.9 communication on split 38 | * autoconf'iscated ircd. 39 | * userlog has single character appended to show cause of quit. 40 | * i lines (user mode +r) 41 | 42 | i lined users have a restricted access: They are forbidden 43 | MODE, KICK and TOPIC on #channels. They don't get channel 44 | operator status when creating a #channel, and cannot 45 | change their nickname once connected. 46 | 47 | * enhanced nick delay to prevent collisions 48 | 49 | The nickname of users splitting away is locked for 15 minutes, 50 | and cannot be used by local clients. 51 | 52 | * channel history to prevent op riding 53 | 54 | A user with channel operator status on #foo splitting away 55 | means that no local user can re-create the channel #foo during 56 | the next 15 minutes. It doesn't stop users from using #foo as 57 | as the channel is not empty. 58 | 59 | Some transition documentation from 2.8 to 2.9 version can be found in 60 | http://www.irc.org/~irc/server/ 61 | -------------------------------------------------------------------------------- /doc/Authors: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircnet/ircd/c1afc3395e710a34cec4c3e27bbd16f2fcf3b181/doc/Authors -------------------------------------------------------------------------------- /doc/BUGS: -------------------------------------------------------------------------------- 1 | # @(#)$Id: BUGS,v 1.22 2009/03/15 00:10:32 chopin Exp $ 2 | 3 | The list is probably not as scary as it once was. 4 | Anyone with some free time is welcome to fix those =) 5 | 6 | * chkconf shows wrong line numbers (and sometimes wrong filenames) when M4 7 | is used. 8 | 9 | * sometimes dual stack (v4/v6) servers do not want to connect to uplinks. 10 | it seems that somehow they try to connect to v4 from v6 source ip and fail. 11 | -------------------------------------------------------------------------------- /doc/Etiquette: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, doc/etiquette 3 | * Copyright (C) 1990, Lea Viljanen and Ari Husa 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | HOW TO BEHAVE ON IRC 21 | 22 | Authors: Lea Viljanen (LadyBug) viljanen@kreeta.helsinki.fi 23 | Ari Husa (luru) so-luru@tolsun.oulu.fi 24 | Revised, March 1994: Helen Rose (Trillian) hrose@kei.com 25 | 26 | 1) Language 27 | 28 | The most widely understood and spoken language on IRC is English. 29 | However! As IRC is used in many different countries, English is by 30 | no means the only language. If you want to speak some other language 31 | than English (for example with your friends), go to a separate channel 32 | and set the topic (with /topic) to indicate that. For example 33 | /topic #channelname Finnish only! 34 | would mean that this channel would be reserved for Finnish discussion. 35 | On the other hand, you should check the topic (with /list command) 36 | before you move to a channel to see if there are any restrictions about 37 | language. 38 | On a channel not restricted by /topic, please speak a language 39 | everybody can understand. If you want to do otherwise, change channels 40 | and set the topic accordingly. 41 | 42 | 43 | 2) Hello/Goodbye 44 | 45 | It's not necessary to greet everybody on a channel personally. 46 | Usually one "Hello" or equivalent is enough. And don't expect everybody 47 | to greet you back. On a channel with 20 people that would mean one 48 | screenful of hellos. It's sensible not to greet, in order not to be rude 49 | to the rest of the channel. If you must say hello, do it with a private /msg. 50 | The same applies to goodbyes. 51 | 52 | 53 | 3) Discussion 54 | 55 | When you come to a new channel it's advised you to listen 56 | for a while to get an impression of what's discussed. Please feel free 57 | to join in, but do not try to force your topic into the discussion 58 | if that doesn't come naturally. 59 | 60 | 61 | 4) {}|[]\ 62 | 63 | IRC has quite a lot of people from Scandinavian countries, 64 | the above characters are letters in their alphabet. This 65 | has been explained on IRC about a thousand and one times, so 66 | read the following, do not ask it on IRC: 67 | 68 | { is an A with 2 dots over it 69 | } is an A with a small circle above it 70 | | is either an O with 2 dots over it or an O with a dash (/) through it 71 | [, ], and \ are the preceding three letters in upper case. 72 | 73 | There are a lot of people from Japan as well, who use Kanji characters 74 | which may look quite exotic as well. As I don't know Kanji I don't 75 | even try to explain any of the characters. 76 | 77 | 5) ATTENTION! 78 | 79 | Remember, people on IRC form their opinions about you only by 80 | your actions, writings and comments on IRC. So think before you type. 81 | Do not "dump" to a channel or user (send large amounts of unwanted 82 | information). This is likely to get you /kicked off the channel or 83 | /killed off from irc. Dumping causes network 'burps', connections going 84 | down because servers cannot handle the large amount of traffic any more. 85 | -------------------------------------------------------------------------------- /doc/INSTALL.appendix: -------------------------------------------------------------------------------- 1 | Appendix A: Difference between IP addresses and hostnames 2 | 3 | 4 | There are 2 different types of INTERNET addresses, NAME addresses and 5 | NUMERIC addresses. NAME addresses look like ENGLISH words (and indeed 6 | they are ENGLISH words that refer to a given host). A NAME address looks 7 | like "tolsun.oulu.fi" - and that particular address refers to the machine 8 | named TOLSUN in Finland. It is a UNIQUE address because no other machine 9 | in the world has its NAME address the same as "tolsun.oulu.fi". Anytime 10 | you say "telnet tolsun.oulu.fi" - you would always connect to TOLSUN in 11 | Finland. NUMERIC addresses refer to those addresses that are made up of 12 | NUMBERS for example "128.214.5.6" is the NUMERIC address for TOLSUN. This 13 | address is also UNIQUE in that no other machine in the world will be use 14 | those NUMERIC numbers. The NUMERIC address is usually more reliable than 15 | the NAME address because not all sites can recognize and translate the 16 | NAME address into it's numeric counterpart. NUMERIC always seems to work 17 | best, but use a NAME address when you can because it is easier to tell 18 | what host you are connected to. 19 | 20 | 21 | Every Unix machine has a file called "/etc/hosts" on it. This file 22 | contains NAME and NUMERIC addresses. When you supply IRC with a NAME 23 | address it will at first try to find it in /etc/hosts, and then (if it's 24 | really smart), use the local Domain Name Server (DNS) to find the NUMERIC 25 | address for the host you want to connect to. Thus if you plan to use NAME 26 | addresses keep in mind that on SOME sites the entry for the TARGET machine 27 | must be found in /etc/hosts or the NAME address will fail. A typical 28 | entry in /etc/hosts looks like this: 29 | 30 | 130.253.1.15 orion.cair.du.edu orion.du.edu orion # BSD 4.3 31 | 32 | This particular example is the Host ORION at the University of Denver. 33 | Notice that on the far left is the NUMERIC Address for orion. The 34 | next few ENGLISH words are the NAME addresses that can be used for orion, 35 | "orion.cair.du.edu", "orion.du.edu", "orion". ALL of these NAME addresses 36 | will return the NUMERIC address "130.253.1.15" which IRC will use to 37 | connect to the TARGET UNIX. (when I say TARGET UNIX I am refering to the 38 | UNIX you want to connect to for IRC). Any futher questions about 39 | /etc/hosts should be directed to "man hosts". 40 | 41 | 42 | Appendix B: Enabling Summon Messages 43 | 44 | +-----------------------------------------------------------------------+ 45 | | E N A B L I N G / S U M M O N M E S S A G E S | 46 | +-----------------------------------------------------------------------+ 47 | 48 | *NOTE* You must have ROOT or special access to the GROUP tty ('/dev') 49 | to do this. If you want to allow users around the world to summon 50 | users at your site to irc, then you should make sure that summon works. 51 | 52 | The "IRCD" program needs access to the GROUP of '/dev'. This 53 | directory is where user TTY's are stored (as UNIX treats each Terminal 54 | as a FILE!) IRCD needs GROUP ACCESS to /dev so that users can be 55 | SUMMONED to the program by others users that are *in* the program. 56 | This allows people from other Universities around the world to SUMMON 57 | your users to IRC so that they can chat with them. Berkeley, SUN, HP-UX 58 | and most of the newer versions of UNIX check to see if a USER is 59 | accepting MESSAGES via the GROUP access rights on their TTY listing 60 | in the /dev directory. For example an entry in '/dev' looks like this: 61 | 62 | (Unix Path on BSD 4.3 UNIX is: /dev/ttyp0) 63 | 64 | crw------- 1 jtrim 20, 0 Apr 29 10:35 ttyp0 65 | 66 | You will note that 'jtrim' OWNS this terminal and can READ/WRITE to this 67 | terminal as well (which makes sense because I am ENTERING DATA and 68 | RECEIVEING DATA back from the UNIX). I logged into this particular 69 | UNIX on "April 29th" at "10:35am" and my TTY is "ttyp0". But further 70 | of *note* is that I do not have my MESSAGES ON! (mesg n) -- This is 71 | how my terminal would look with MESSAGES ON (mesg y): 72 | 73 | crw--w---- 1 jtrim 20, 0 Apr 29 10:35 ttyp0 74 | 75 | With my MESSAGES ON (mesg y) I can receive TALK(1) requests, use the 76 | UNIX WRITE(1) command and other commands that allow users to talk 77 | to one another. In IRC this would also allow me to get IRC /SUMMON 78 | messages. To set up the "IRCD" program to work with /SUMMON type 79 | the following: (using ROOT or an account that has access to '/dev'). 80 | 81 | % chgrp tty ircd 82 | % chmod 6111 ircd 83 | 84 | The above commands read: "Give IRCD access to GROUP tty (which is /dev) 85 | and then when ANYONE runs the IRCD allow SETUID and SETGID priviliges 86 | so that they can use the /SUMMON command. 87 | -------------------------------------------------------------------------------- /doc/Juped/Advertisement: -------------------------------------------------------------------------------- 1 | The Internet Relay Chat Program - IRC 2 | 3 | Author: Jeff Trim, April '89 4 | Revised: Greg Lindahl, Oct '90 (gl8f@virginia.edu) 5 | Re-Revised: Helen Rose, March '94 (hrose@kei.com) 6 | 7 | Have you ever wanted to talk with computer users in other parts of the 8 | world? Well guess what? You can! The network is called IRC and it is 9 | networked much over North America, Europe, and Asia, Oceania, and parts of 10 | Africa. This program is a substitution for talk(1), ytalk(1) and many 11 | other multiple talk programs you might have read about. When you are 12 | talking in IRC, everything you type will instantly be transmitted around 13 | the world to other users that might be watching their terminals at the 14 | time - they can then type something and RESPOND to your messages - and 15 | vise versa. I should warn you that the program can be very addictive once 16 | you begin to make friends and contacts on IRC ;-) especially when you 17 | learn how to cuss in 14 languages. 18 | 19 | Topics of discussion on IRC are varied, just like the topics of Usenet 20 | newsgroups are varied. Technical and political discussions are popular, 21 | especially when world events are in progress. IRC is also a way to expand 22 | your horizons, as people from many countries and cultures are on, 24 hours 23 | a day. Most conversations are in English, but there are always places to 24 | chat in German, Japanese, and Finnish, and occasionally other languages. 25 | 26 | How To Get IRC (technical) 27 | 28 | IRC is a fully-distributed client-server system, much like 29 | NNTP-Usenet, with several clients availble in C and elisp. You may ftp 30 | documentation and clients from any of the following sites: 31 | 32 | many kinds of clients (C, elisp, X11, VMS, REXX for VM, MSDOS, Macintosh): 33 | cs.bu.edu:/irc/clients 34 | ftp.acsu.buffalo.edu:/pub/irc 35 | ftp.funet.fi:/pub/unix/irc 36 | coombs.anu.edu.au:/pub/irc 37 | 38 | If you have any questions about IRC installation, write to hrose@kei.com. 39 | 40 | -------------------------------------------------------------------------------- /doc/Juped/ChangeLog.common: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, lib/ircd/ChangeLog 3 | * Copyright (C) 1990 Mike Bolotski 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | Mon Sep 02 17:08:43 1991 Darren Reed 21 | 22 | * general comments: 23 | 24 | various files now have dependencies depending on whether it is the 25 | client or server the files are being compiled for. 26 | 27 | * parse.c 28 | 29 | find_*() routines changed to use hash table lookup. 30 | 31 | * send.c 32 | 33 | changed to maximize presence of the local client array. 34 | sendto_ops_butone() fixed back to not broadcast wallops. 35 | 36 | Sun Jun 30 23:21:50 1991 Armin Gruner 37 | 38 | * parse.c 39 | Changed from->name to sender; Maybe double search can be removed 40 | 41 | * send.c 42 | LOOP detected!! 43 | Fixed sendto_channel_butone() as suggested by msa. 44 | send.c needs TOTAL cleanup. 45 | 46 | * bsd.c 47 | Final fixes of inet_netof() and inet_nota() 48 | 49 | * send.c 50 | Changed some SendMessage() into sendto_one() (code duplication ;)) 51 | 52 | Wed Jun 20 11:25:54 1990 Jarkko Oikarinen (jto@tolsun.oulu.fi) 53 | 54 | Added gruner's patches. 55 | Patches to make string channels work done as well to some files. 56 | 57 | Sun Jun 17 21:29:04 1990 Armin Gruner (gruner@informatik.tu-muenchen.de) 58 | 59 | * parse.c 60 | In case that a server sends an unknown command to a client (!!), 61 | debug() is called, as client handles debug outputs now. 62 | 63 | Thu May 10 17:15:12 1990 Jarkko Oikarinen (jto@tolsun.oulu.fi) 64 | 65 | * dbuf.c 66 | Fixed memcpy and bcopy problems in different machines 67 | 68 | Sat Jan 6 15:14:14 1990 Mike Bolotski (mikeb at coho.ee.ubc.ca) 69 | 70 | * config.h 71 | Added Poohbear's cleanup changes. 72 | Added #undef SYSV if mips is defined (as per jlp@hamblin.byu.edu) 73 | 74 | 75 | Sat Dec 16 16:06:17 1989 Mike Bolotski (mikeb at coho.ee.ubc.ca) 76 | 77 | * config.h 78 | 79 | Changed NOTTY to TTYON, and reversed the logic everywhere. 80 | Now TTYON has to be explicitly defined in order to produce 81 | tty output. 82 | 83 | 84 | Thu Dec 14 12:50:36 1989 Mike Bolotski (mikeb at coho.ee.ubc.ca) 85 | 86 | * version.c 87 | Added a version.c file to contain the version numbers and 88 | prompt strings. Removed the old #ifdef MAIN style definition 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /doc/Juped/ChangeLog.doc: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, doc/ChangeLog 3 | * Copyright (C) 1990, Mike Bolotski 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | 21 | Tue Mar 22 17:32:33 1994 Helen T. Rose Davis (hrose@rocza.kei.com) 22 | 23 | * Re-rewrite of documentation to coincide with 2.8.17 release. 24 | 25 | Mon Mar 29 01:26:16 1993 26 | 27 | * INTSALL updated. 28 | * m4macros added. 29 | 30 | Fri Jan 22 22:49:20 1993 31 | 32 | * INTSALL updated. 33 | 34 | Thu Dec 17 19:41:19 1992 Darren Reed 35 | 36 | * general Well, these docs were updated for 2.7, nobody 37 | documented it - must be a general distaste for 38 | documentation I'd say :) 39 | 40 | Work on 2.8 documentation slowly creaping along. 41 | 42 | Mon Sep 02 17:12:41 1991 Darren Reed 43 | 44 | * Documentation brought upto date with new features to 2.6.2 45 | 46 | 47 | Mon Aug 26 16:51:01 1991 Helen Trillian Rose (hrose@eff.org) 48 | 49 | * Rewrite of documentation (again) to coincide with the 2.6.2 50 | release. 51 | 52 | Wed Oct 31 18:05:12 1990 Jarkko Oikarinen 53 | 54 | * Added hrose@cs.bu.edu's patches to irc2.6 55 | - Documentation rewrites... 56 | - patches 57 | 58 | Fri Jun 29 18:54:40 1990 Armin Gruner (gruner@informatik.tu-muenchen.de) 59 | 60 | * NETWORKING 61 | 62 | Added some sites in Germany 63 | 64 | Sat Dec 16 15:56:41 1989 Mike Bolotski (mikeb at coho.ee.ubc.ca) 65 | 66 | * INSTALL 67 | 68 | Modified the installation document as per Valdis's nitpicking. 69 | Improved the grammer and speling of a lot of dokumentation. 70 | Removed lots and lots of informal wording, eh? and especially 71 | the long run on sentences that try to say a lot but really don't 72 | and are present only to show the author's superiority, especially 73 | when quoting from a prestigious work like Webster's New Collegiate 74 | Dictionary, gosh, specifically the 1979 version (ISBN 75 | 0-87779-3580-1), which I guess I should run out and purchase 76 | immediately, for otherwise I might be considered ignorant by 77 | wise men who have written a great deal of code in VS/Pascal and 78 | even IBM Assembler and still can't manage not to avoid including 79 | .QUIT in every goddam mail message. 80 | 81 | 82 | * HISTORY 83 | 84 | Added a recent history of the version numbers and the new 85 | patchlevel mechanism. 86 | 87 | 88 | * BugList 89 | 90 | Added a BugList file including the notation of bug numbers. 91 | -------------------------------------------------------------------------------- /doc/Juped/ChangeLog.include: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, ircd/ChangeLog 3 | * Copyright (C) 1990 Jarkko Oikarinen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | Sat Jul 25 05:52:43 1992 21 | * common.h Dynix (sequent) doesnt have malloc.h but it appears 22 | Dynix/PTX does. Blah. 23 | 24 | Fri Jul 24 18:43:35 1992 25 | * config.h, sys.h, common.h 26 | Applied patches from Adrian Hall for compiling on 27 | Dynix/PTX (email: csc260@central1.lancaster.ac.uk). 28 | 29 | Mon Sep 02 17:06:59 1991 Darren Reed 30 | 31 | * config.h 32 | added MAXCONNECTIONS (see config.h for details) 33 | added NICKNAMEHISTORYLENGTH 34 | 35 | * hash.h 36 | Added to support for ../ircd/hash.c 37 | 38 | * msg.h 39 | Commands reordered in (hopefully) order of useage. 40 | All commands now marked for flood protection. 41 | 42 | Tue Jul 02 11:10:26 1991 Armin Gruner 43 | 44 | * config.h 45 | changed MSG_MAIL to MSG_NOTE as requested by the author. 46 | 47 | Mon Jul 01 20:37:38 1991 Armin Gruner 48 | 49 | * config.h 50 | #define WALL a priori. WALL should be go away in future version. 51 | 52 | * numeric.h 53 | ERR_TOOMANYTARGETS added. 54 | 55 | Mon Dec 03 13:56:36 1990 Armin Gruner 56 | 57 | * config.h 58 | Switches for NEED_* added. 59 | 60 | Mon Nov 26 10:33:43 1990 Armin Gruner 61 | 62 | * sys.h[.SH] 63 | declaration of dummy() and restart() depending on configuration 64 | process. 65 | 66 | Sat Nov 10 18:00:44 1990 Armin Gruner 67 | 68 | * New header file: common.h, should be included into all source 69 | files. Created sys.h.SH, Makefile.SH, config.h.SH; these files 70 | are extracted by running Configure. 71 | 72 | * Added some function declarations 73 | Removed Makefile (do we need one here ?). 74 | 75 | Wed Jun 20 11:44:00 1990 Jarkko Oikarinen (jto@tolsun.oulu.fi) 76 | 77 | * config.h 78 | MAIL changes to config.h 79 | * struct.h 80 | Numerous changes to file to make string channels work 81 | 82 | Thu May 10 22:37:23 1990 Jarkko Oikarinen (jto@tolsun.oulu.fi) 83 | 84 | * config.h 85 | Added UPHOST into config.h (Who removed it ?) 86 | -------------------------------------------------------------------------------- /doc/Juped/ChangeLog.irc: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, irc/ChangeLog 3 | * Copyright (C) 1990 Mike Bolotski 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | Mon Dec 9 06:38:57 1991 Darren Reed 21 | * All files 22 | Updated to work properly with 2.7. Its early and I'm cold. 23 | 24 | Sun Jun 30 14:45:59 1991 Armin Gruner 25 | 26 | * irc.c 27 | Removed MSG protocol command. Kludge to get channel msgs working. 28 | * msg.c 29 | Reformatted WHOERPLY output :) 30 | 31 | Wed Nov 28 20:45:42 1990 Armin Gruner 32 | 33 | * c_msg.c 34 | Fixed abuf[123] overflow. (by using mybuf and removing the buffers) 35 | 36 | Sat Nov 10 17:59:29 1990 Armin Gruner 37 | 38 | * Added #include "common.h" into all source files, moved "common" 39 | and regularly used declarations to include/common.h 40 | 41 | Wed Jun 20 11:45:30 1990 Jarkko Oikarinen (jto@tolsun.oulu.fi) 42 | 43 | String channel fixes to files, added some numerics. 44 | 45 | Sun Jun 17 17:12:14 1990 Armin Gruner (gruner@informatik.tu-muenchen.de) 46 | 47 | * c_debug.c 48 | New created file, for the benefit of wrong server stuff output 49 | if client does not recognize it. common/debug.c has been removed. 50 | 51 | * c_numeric.c 52 | Changed output of YOUWILLBEBANNED and YOUREBANNEDCREEP, now only 53 | the first digits (== minutes) of the msg will be inserted. 54 | 55 | * irc.c 56 | Defined debuglevel to DEBUG_ERROR, now more error 57 | conditions are displayed. 58 | 59 | 60 | Sat Jan 6 14:48:34 1990 Mike Bolotski (mikeb at coho.ee.ubc.ca) 61 | 62 | * screen.c 63 | 64 | Changed insert = ~insert to be insert = !insert. 65 | Gotta be careful about those bitwise operators, WiZ. 66 | 67 | * swear.c 68 | 69 | Changed scroll to scroll_ok. Changed extern/static definitions 70 | of tgoto, getenv to work with ANSI C compilers. 71 | 72 | * edit.c 73 | 74 | Changed #if HPUX to #if HPUX || defined(mips) 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /doc/Makefile: -------------------------------------------------------------------------------- 1 | #************************************************************************ 2 | #* IRC - Internet Relay Chat, Makefile 3 | #* Copyright (C) 1990, Jarkko Oikarinen 4 | #* 5 | #* This program is free software; you can redistribute it and/or modify 6 | #* it under the terms of the GNU General Public License as published by 7 | #* the Free Software Foundation; either version 1, or (at your option) 8 | #* any later version. 9 | #* 10 | #* This program is distributed in the hope that it will be useful, 11 | #* but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | #* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | #* GNU General Public License for more details. 14 | #* 15 | #* You should have received a copy of the GNU General Public License 16 | #* along with this program; if not, write to the Free Software 17 | #* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | #* 19 | #* $Id: Makefile,v 1.3 1997/08/08 14:44:13 kalt Exp $ 20 | #* 21 | #*/ 22 | 23 | MANDIR=/usr/local/man 24 | 25 | all: 26 | 27 | sgml: service doc 28 | 29 | doc: INSTALL.sgml 30 | sgml2txt INSTALL.sgml 31 | sgml2info INSTALL.sgml 32 | 33 | service: SERVICE.sgml 34 | sgml2txt SERVICE.sgml 35 | 36 | install: all 37 | -${INSTALL} -c -m 644 ircd.8 ${MANDIR}/man8 38 | -${INSTALL} -c -m 644 irc.1 ${MANDIR}/man1 39 | 40 | -------------------------------------------------------------------------------- /doc/Nets/Europe/CoordEBIC: -------------------------------------------------------------------------------- 1 | ############################################################################ 2 | list updated the 8.11.1996 3 | ############################################################################ 4 | 5 | If you like in future to establish a link inside the EBIC area, 6 | please contact the coordinator of the affected toplevel domain. 7 | This coordinator will discuss the link with affected local server 8 | admins and inform other EBIC members about new links. Also a good 9 | idea is to join #EU-Opers and discuss the new link there. 10 | 11 | ############################################################################ 12 | These toplevel domains are currently participating EBIC: 13 | ############################################################################ 14 | 15 | at be ch zc de dk fi fr hr hu is it nl no pl ru(/su) se si sk uk 16 | 17 | ############################################################################ 18 | The following national coordinators have been choosen for '95: 19 | ############################################################################ 20 | 21 | *.at EASINET, ACONET 22 | 1. Fingwe, Bernhard Lorenz 23 | 24 | *.be BELNET 25 | 1. Frans Francis Vanhemmens 26 | 2. mro Marc Roger 27 | 28 | *.ch SWITCH, EUNET/CH 29 | 1. ksa Karim Saouli 30 | 31 | *.cz CESNET, PASNET 32 | 1. Kratz Tomas Kraus 33 | 34 | *.de WIN, BelWue 35 | 1. YeggMan Volker Paulsen 36 | 2. Haegar Thomas Thissen 37 | 38 | *.dk DENET, DKNET 39 | 1. karthy Karsten Thygesen 40 | 41 | *.fi FUNET 42 | 1. Vesa Vesa Ruokonen 43 | 44 | *.fr EASINET/ROCAD, RENATER 45 | 1. Nono Arnaud Girsch 46 | 2. Dumpty Marie-Laure Bruneton 47 | 48 | *.hr CARNET 49 | 1. Mozz Mario Mikocevic 50 | 51 | *.hu HUNGARNET 52 | 1. keksz Revoly Andras 53 | 54 | *.is ISnet 55 | 1. ra Richard Allen 56 | 57 | *.it CILEA 58 | 1. Francesco Francesco Messineo 59 | 2. Coccy Cosimo Riglietti 60 | 61 | *.nl SURFNET/NLNET 62 | 1. cor Cor Bosman 63 | 2. Steven Steven Hessing 64 | 65 | *.no UNINETT 66 | 1. Veggen Vegard Engen 67 | 68 | *.pl POLIP 69 | 1. Krzysio Krzysztof Mlynarski 70 | 71 | *.ru (*.su) DEMOS 72 | 1. mishania Mikhail Alekseevitch Sokolov 73 | 74 | *.se SUNET 75 | 1. Ace95 Adam Rappner 76 | 77 | *.sk UAKOM 78 | 1. Koleso Tibor Weis 79 | 80 | *.si 81 | 1. Iztok Iztok Umek 82 | 83 | *.uk JANET, JIPS 84 | 1. jim_bob James R. Grinter 85 | 86 | 87 | -------------------------------------------------------------------------------- /doc/Nets/Europe/InfoEBIC: -------------------------------------------------------------------------------- 1 | InfoEBIC - General information about European IRC //941115 2 | 3 | Online information sources in Europe 4 | ==================================== 5 | - By IRC 6 | #EU-Opers is an adminstrative channel for European IRC networking. 7 | 8 | - Help automatons in the IRC net (based on ircII help pages) 9 | Help_EU, Help_UK Send PRIVMSG, receive NOTICE 10 | Help_IT Requires DCC Chat 11 | 12 | - By WWW 13 | http://www.funet.fi/~irc/ 14 | http://irc.pages.de/ 15 | http://www.nvg.unit.no/irc/IRCNO-page.html 16 | 17 | Public IRC servers in Europe 18 | ============================ 19 | - Open for all domains 20 | irc.funet.fi Finland 21 | irc.Univ-Lyon1.FR France 22 | 23 | - Open for national and some neighbouring domains 24 | irc.cdc.polimi.it Italy 25 | irc.span.ch Switzerland 26 | irc.ludd.luth.se Sweden 27 | irc.nvg.unit.no Norway 28 | irc.sci.kun.nl Netherlands 29 | irc.uni-stuttgart.de Germany 30 | stork.doc.ic.ac.uk United Kingdom 31 | 32 | Anonymous FTP archives with IRC software in Europe 33 | ================================================== 34 | ftp.funet.fi:/pub/unix/irc 35 | ftp.informatik.tu-muenchen.de:/pub/comp/networking/irc 36 | hplyot.obspm.fr:/irc 37 | src.doc.ic.ac.uk:/packages/irc 38 | 39 | Mailing list 40 | ============ 41 | There is administrative mailing list for european IRC networking. 42 | The list address is irc-eu@ifens01.insa-lyon.fr. This list is run by 43 | an automated mailing-list manager tool, so all requests concerning 44 | the list should be mailed to listserv@ifens01.insa-lyon.fr. To get help, 45 | send "help" in mail message to the listserv address, and you will 46 | get help file in reply. 47 | 48 | 49 | -------------------------------------------------------------------------------- /doc/Nets/Europe/RulesEBIC: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | ##### RULES FOR ESTABLISHING NEW IRC SERVERS IN EUROPE (v1.1) ##### 3 | ######################################################################## 4 | 5 | 6 | 1.) Establishing a new server and inner domain linking should be 7 | a local toplevel domain (country) decision. 8 | 9 | Guidelines: 10 | 11 | + New servers should be leafed until their admin(s) 12 | have sufficient experience to handle their server 13 | responsibly. (This avoids routing disasters). 14 | 15 | + Only a link for ONE server should be given to the new 16 | server site, that means the new site shouldn't be able to 17 | connect test-servers to other than its own server. 18 | (This avoids confusion about linking hierarchy). 19 | 20 | + Be sure that if a toplevel domain hostmask link is given, 21 | all hubs of that domain can connect the masked server! 22 | (this should avoid disagreement between serveral hub 23 | admins in one domain). 24 | 25 | 26 | 2.) All other links between toplevel domains (countries) should be 27 | dicussed between the major link coordinators of each toplevel 28 | domain (country). These coordinators are called European Board 29 | of IRC Coordinators (EBIC). 30 | 31 | Guidelines: 32 | 33 | + Major link coordinators of each toplevel domain (country) 34 | should be published with the server sourcecode in 35 | directory ./doc/Europe 36 | 37 | + Each toplevel domain (country) participating in the 38 | European IRC net must have a coordinator, who is 39 | responsible for country-internal connections AND 40 | represents the country in contacts with the rest of the 41 | world. This person(s) is (are) chosen by their domain, 42 | but must be approved by the EBIC. 43 | 44 | + The EBIC is the only executive in charge of European 45 | interconnections and of connections from Europe to the 46 | rest of the world. They will decide linking issues 47 | WITH the affected local admins. 48 | 49 | + For establishing new links between several toplevel 50 | domains the affected EBIC coordinators should be 51 | consulted. If further coordination is needed it should 52 | be discussed within the EBIC. 53 | 54 | + Additional note: International links should also take 55 | care of the network topology, so even if several national 56 | opers agree on a same international link, they might be 57 | wrong and use unecessary network ressources. The EBIC 58 | should avoid such linking. 59 | 60 | + Any major linking change should be announced in the 61 | european mailing list: 62 | IRC-Operators Europe 63 | 64 | 65 | 3.) Cracked servers are the concern of EBIC, overiding all local 66 | interests. 67 | 68 | Guidelines: 69 | 70 | + In a server with non-standard source code which breaks 71 | the current irc protocol (especially the incorrect 72 | manipulation of channel modes and user/hostname authen- 73 | tication) EBIC will take action. 74 | 75 | + The recommended action is permanent withdrawl of the 76 | server from the IRC-net by removal from all its uplinks 77 | configuration files. 78 | 79 | 80 | 4.) A prerequisite for getting a NEW server connection within 81 | Europe is an understanding of and compliance to the above 82 | rules. 83 | 84 | Guideline: 85 | 86 | + All new admins should get a copy of these rules. 87 | 88 | 89 | ############################################################################ 90 | 91 | -------------------------------------------------------------------------------- /doc/Nets/Europe/links.eu: -------------------------------------------------------------------------------- 1 | Written by Per Persson , last update: 1996-06-18 2 | 3 | 1) Europe should always be a separate net from the other parts of 4 | (what was formerly known as) "EFNet". For example; Netherlands 5 | with leafs and Sweden/Finland (with leafs) should always be 6 | connected to eachother. There are a few times when that wont work 7 | though... NORDUnet might have fuckups from time to time and in 8 | those few cases we have to use more then one link to USA. 9 | 10 | 2) Europe "should" be connected this way; 11 | 12 | * irc.nada.kth.se is the primary HUB for northern Europe as well 13 | as some southern European servers (.at). irc.nada.kth.se is 14 | also the primary European HUB for connections to US. 15 | * warszawa.irc.pl is the primary .pl HUB, primary uplink for .pl 16 | is .se with .fi/.at as secondary 17 | (.pl is almost never connected to "EFNet" right now) 18 | * ircd.funet.fi is the primary .fi HUB and irc.cs.hut.fi is the 19 | backup. 20 | * irc.pvv.unit.no is the primary .no HUB and irc.ifi.uio.no is 21 | the backup, primary uplink for .no is .se with .fi as secondary. 22 | * irc.ru is the primary .ru HUB, primary uplink is .fi with .se as 23 | secondary. 24 | * irc.isnet.is's primary uplink is .fi, irc.ludd.luth.se is secondary 25 | * sunsite.auc.dk's primary uplink is irc.nada.kth.se 26 | * irc.ccii.unipi.it is the primary HUB for Italy, primary uplink is 27 | .se with .nl/.uk as secondary. 28 | * irc.felk.cvut.cz is the primary .cz HUB, primary uplink is .se. 29 | * irc.sanet.sk's primary uplink is .cz. 30 | 31 | * irc.nijnerode.nl is the primary HUB for sourthern Europe and .uk. 32 | Primary uplink is irc.ludd.luth.se(irc.nada.kth.se) with .fi as 33 | secondary 34 | * irc.univ-lyon1.fr is the primary .fr HUB and 35 | sil.polytechnique.fr is the backup. primary uplink for .fr is 36 | irc.ludd.luth.se and secondary uplink for .fr is irc.cerf.net. 37 | * stork.doc.ic.ac.uk is the primary .uk HUB and serv.eng.abdn.ac.uk 38 | is the backup. Primary uplink is .nl with .se/.fi as secondary. 39 | (.uk also has a .net server, as well as a netcom.net.uk server which 40 | uses a bit different uplinks--the rest of the .uk servers are 41 | connected to those on occasions as well) 42 | * irc.belnet.be is the primary .be HUB, primary uplink for .be is 43 | .uk with .fr/.nl as secondary. 44 | * irc.wu-wien.ac.at is the primary .at HUB, primary uplink for 45 | .at is .fr with .se as secondary. 46 | * irc.uni-paderborn.de is the primary .de HUB, primary uplink for 47 | .de is .nl with .fi as secondary. 48 | (.de isn't often connected, as they have sloooow links) 49 | * irc.arnes.si's primary uplink is .nl, secondary uplink is .se. 50 | 51 | * The primary link for Europe to USA is; .se - USA 52 | backups are; .fi/.nl - USA 53 | (USA can be one of the following; cs-pub.bu.edu, ircd.stealth.net 54 | eff.org, bazooka.rutgers.edu or irc.cerf.net. irc.cerf.net 55 | is the prefered one nowadays with ircd.stealth.net as secondary) 56 | 57 | 3) The ASCII map of all this, to make things "easier to comprehend". 58 | 59 | 60 | (.no .dk .pl .it) __ .se __ .fi __ (.is .ru) 61 | /|\ 62 | .uk __ .nl __/ | \__ .cz __ (.sk) 63 | | | | 64 | (.be) | .fr __ (.at) 65 | | 66 | (.si .ch .de) 67 | 68 | ()'s marks leafs 69 | \ _ /'s marks links 70 | 71 | -------------------------------------------------------------------------------- /doc/Nets/Europe/rules: -------------------------------------------------------------------------------- 1 | Rules for IRC networking - Ratified July 6th 1994 2 | 3 | 1.) The establishment of new servers and intra-domain linking should 4 | be a local toplevel domain (IE: country) decision. 5 | 6 | Guidelines: 7 | 8 | + Only a link for ONE server should be given to the new 9 | server site, that means the new site shouldn't be able to 10 | connect test-servers to other than its own server. 11 | (This avoids confusion about linking hierachy). 12 | 13 | + If a toplevel domain hostmask link is given, ensure that all 14 | hubs of that domain have connect access to the masked server 15 | (this should avoid disagreements between hub admins within a 16 | domain). 17 | 18 | 2.) Hacked or cracked servers (and the machines they run on) are the 19 | concern of all Admins, and override all local interests. 20 | 21 | Guidelines: 22 | 23 | + In a server with non-standard source code which breaks 24 | the current irc protocol (especially the incorrect 25 | manipulation of channel modes and user/hostname authen- 26 | tication) Admins will take action, this includes the 27 | testing of these patches. 28 | 29 | + The recommended action is permanent withdrawl of the 30 | server from the IRC-net by removal from all its uplinks 31 | configuration files. 32 | 33 | 3.) The Admins are responsible for all operator access. 34 | IRC Administrators should therefore be approved by the 35 | machine and network admins for the site in question. 36 | 37 | 4.) Operator power may be used only on server and network 38 | maintenance purposes. KILL may be used only when other 39 | methods to fix a problem don't exist. 40 | 41 | Infringement of the rules as outlined above should lead to 42 | operator and/or admin changes on the offending server. 43 | Responsibility for these changes is primarily that of the uplink 44 | server administrators. 45 | 46 | In the event of continued transgression, further action may be 47 | taken by remote IRC Administrators 24 hours after the problem 48 | has been identified and all responsible parties have been 49 | notified. 50 | 51 | All intended additions to this document must be announced to IRC 52 | Administrators for at least one week prior to ratification. 53 | 54 | -- 55 | Edited June 29th by #EU-Opers 56 | -------------------------------------------------------------------------------- /doc/Nets/IRCNet: -------------------------------------------------------------------------------- 1 | The IRC Net Mailing List 2 | 3 | The IRC Net Mailing List is meant for discussion about issues concerning the 4 | IRC Net network. It is currently an open mailing list and you can subscribe 5 | by typing the following in a shell: 6 | 7 | echo subscribe ircnet | mail majordomo@irc.org 8 | 9 | All messages to the mailing list itself are to be sent to: 10 | 11 | ircnet@irc.org 12 | 13 | For further help, use that command: 14 | 15 | echo help | mail majordomo@irc.org 16 | 17 | We also have a web page: 18 | 19 | http://www.irc.org/ 20 | 21 | Go there for a current news and infos. 22 | -------------------------------------------------------------------------------- /doc/README: -------------------------------------------------------------------------------- 1 | # @(#)$Id: README,v 1.9 2004/12/21 01:14:08 chopin Exp $ 2 | 3 | This directory contains the documentation related to this package. 4 | 5 | 6 | 7 | The files relevant to the software compilation and configuration are: 8 | 9 | RELEASE_NOTES - useful information for people upgrading from a previous 10 | version 11 | INSTALL.txt - detailed information about compilation and configuration 12 | ircd.conf.example - server configuration example file (useful complement 13 | to INSTALL) 14 | iauth.conf.example - iauth configuration example 15 | 16 | 17 | 18 | Other files of interest: 19 | 20 | LICENSE - license agreement 21 | ChangeLog - log of source changes 22 | BUGS - list of known bugs 23 | 2.11-New - transition documentation from 2.10 to 2.11 version 24 | 2.10-New - transition documentation from 2.9 to 2.10 version 25 | Etiquette - IRC Etiquette 26 | ircd.8 - man page for the server 27 | iauth.8 - man page for iauth 28 | iauth.conf.5 - man page for the iauth.conf file 29 | Authors - irc contributors 30 | Nets/ - documentation about various IRC networks 31 | Juped/ - old/obsolete documentation files 32 | alt-irc-faq - alt.irc faq 33 | m4macros - note on m4 macros for the server configuration file 34 | 2.9-New - old transition documentation from 2.8 to 2.9 version 35 | 36 | 37 | 38 | Related documents on the World Wide Web: 39 | 40 | http://www.irc.org/tech_docs/ircnet/faq.html 41 | http://www.irc.org/techie.html 42 | 43 | -------------------------------------------------------------------------------- /doc/RELEASE_LOG: -------------------------------------------------------------------------------- 1 | # @(#)$Id: RELEASE_LOG,v 1.21 2010/08/13 19:59:43 bif Exp $ 2 | 3 | 2010-08-13 2.11.2p3 4 | 2009-11-13 2.11.2p2 5 | 2008-06-24 2.11.2p1 6 | 2008-06-13 2.11.2 7 | 2005-06-06 2.11.0p2 8 | 2005-05-31 2.11.1p1 9 | 2005-05-13 2.11.1 10 | 2005-05-13 2.11.0p1 11 | 2004-12-21 2.11.0 12 | 2004-05-09 2.10.3p7 13 | 2004-02-26 2.10.3p6 14 | 2003-10-13 2.10.3p5 15 | 2003-10-11 2.10.3p4 16 | 2001-09-19 2.10.3p3 17 | 2001-07-13 2.10.3p2 18 | 2000-05-29 2.10.3p1 19 | 1999-08-13 2.10.3 20 | 1999-02-03 2.10.2 21 | 1998-11-12 2.10.1 22 | 1998-09-27 2.10.0 23 | 1998-06-13 2.9.5+IPv6 24 | 1998-02-18 2.9.5 25 | 1997-10-20 2.9.4 26 | 1997-07-24 2.9.3 27 | 1996-11-09 2.9.2 28 | 1996-07-07 2.9.1 29 | 1994-12-03 2.8.21 30 | 1994-06-10 2.8.20 31 | 1993-11-09 2.8.16 32 | 1993-09-14 2.8.14 33 | 1993-08-07 2.8.12 34 | 1993-06-26 2.8.10 35 | 1993-04-05 2.7.2h 36 | 1992-08-11 2.7.2g 37 | 1992-05-14 2.7.2 38 | 1992-01-14 2.7.1 39 | 1991-09-06 2.6.2 40 | -------------------------------------------------------------------------------- /doc/confsplit.txt: -------------------------------------------------------------------------------- 1 | ###################################################################### 2 | 3 | confsplit - SS/SU values in ircd.conf 4 | 5 | ###################################################################### 6 | 7 | This patch adds split-servers and split-users to ircd.conf to change 8 | values without recompiling the ircd. 9 | 10 | Two new MANDATORY fields have been added to the M-line after the SID: 11 | 12 | M:::: 13 | :::: 14 | 15 | These values will be applied on server startup and on /REHASH. 16 | Note that they will still respect the minimum limits set in 17 | config.h defines SPLIT_SERVERS and SPLIT_USERS. 18 | 19 | example: 20 | 21 | M:irc.example.net:127.0.0.1:Example server:6667:0PNX:10:10000: 22 | 23 | Will set the split-servers (SS) current value to 10 servers minimum 24 | and split-users (SU) current value to 10000 users minimum, then do 25 | a check for split-mode. 26 | 27 | ###################################################################### 28 | 29 | changelog: 30 | 31 | v1.03 32 | 33 | 2024-09-23 -- patrick 34 | * made SS/SU fields mandatory in ircd.conf 35 | * always read new values on /REHASH, removed CONFSPLIT_* 36 | 37 | v1.02 38 | 39 | 2020-01-24 -- mh 40 | 41 | * support/config.h.dist: made CONFSPLIT_REHASH undefine look less 42 | silly 43 | 44 | * ircd/s_conf.c:initconf(): added DEFAULT_SPLIT_* values to notice 45 | when changing values in a rehash 46 | 47 | * ircd/s_conf.c:initconf(): split check is only needed in a rehash, 48 | not on server (re)start - same for notices to ¬ices. fixed 49 | 50 | v1.01 51 | 52 | 2020-01-23 -- mh 53 | 54 | * common/patchlevel.h added CONFSPLIT_VERSION for good measure 55 | 56 | * ircd/s_debug.c: 'o' (CONFSPLIT defined) and 'O' (CONFSPLIT and 57 | CONFSPLIT_REHASH defined) serveropts added. they will show in 58 | /VERSION and can be V-lined if one so desire. 59 | 60 | v1.00 61 | 62 | 2020-01-23 -- mh 63 | 64 | * added the option to only apply the SS/SU values at server startup 65 | and not during /REHASH (CONFSPLIT_REHASH define) 66 | 67 | 2020-01-22 -- mh 68 | 69 | * ircd/s_conf.c:initconf() added 2 more fields to M-line after SID. 70 | SS and SU values respectively. these will be used on startup and 71 | on /REHASH. the values are checked against minimum defined values 72 | (SPLIT_SERVERS and SPLIT_USERS) before being applied. 73 | 74 | * project started 75 | 76 | ###################################################################### 77 | -------------------------------------------------------------------------------- /doc/iauth.8: -------------------------------------------------------------------------------- 1 | .\" @(#)$Id: iauth.8,v 1.5 2001/10/20 17:57:24 q Exp $ 2 | .TH IAUTH 8 "$Date: 2001/10/20 17:57:24 $" 3 | .SH NAME 4 | iauth \- The Internet Relay Chat Authentication Program 5 | .SH SYNOPSIS 6 | .hy 0 7 | .IP \fBiauth\fP 8 | [ 9 | .B -v 10 | | 11 | .BI \-c " configfile" 12 | ] 13 | .SH DESCRIPTION 14 | .LP 15 | \fIiauth\fP is a slave process used by the \fIircd\fP program to perform 16 | the authentication of incoming TCP connections. The \fIircd\fP program 17 | starts \fIiauth\fP upon startup. 18 | 19 | \fIiauth\fP will close and reopen the log file whenever it receives a user 20 | signal 2, SIGUSR2. This is useful to rotate the log file. 21 | .SH OPTIONS 22 | .TP 23 | .BI \-c " filename" 24 | When this flag is given, the program will read the configuration file 25 | specify and validate it. This is useful to check for errors in the setup. 26 | .TP 27 | .B \-v 28 | This option dumps information about the version. 29 | .SH EXAMPLE 30 | .RS 31 | .nf 32 | millennium% \fBiauth -c iauth.conf\fP 33 | iauth 2.10 34 | 35 | Reading "iauth.conf" 36 | 37 | Module(s) loaded: 38 | rfc931 39 | .fi 40 | .RE 41 | .SH COPYRIGHT 42 | (c) 1998 Christophe Kalt 43 | .LP 44 | For full COPYRIGHT see LICENSE file with IRC package. 45 | .LP 46 | .RE 47 | .SH FILES 48 | "iauth.conf" 49 | .SH "SEE ALSO" 50 | iauth.conf(5) ircd(8) 51 | .SH BUGS 52 | None... ;-) if somebody finds one, please send mail to ircd-bugs@irc.org 53 | .SH AUTHOR 54 | Christophe Kalt. 55 | -------------------------------------------------------------------------------- /doc/iauth.conf.example: -------------------------------------------------------------------------------- 1 | # 2 | # Default iauth configuration file 3 | # 4 | # $Id: iauth.conf.example,v 1.4 2004/09/21 15:40:38 chopin Exp $ 5 | # 6 | 7 | # Important note: there must be one tab only before modules options. 8 | # Otherwise iauth will be dieing continously. Make sure to check your 9 | # changes with iauth -c iauth.conf. 10 | 11 | # If iauth timeouts, then reject user 12 | #notimeout 13 | 14 | # This makes the IRC server require that iauth performs the authentication 15 | # in order for a new user connection to be accepted 16 | required 17 | 18 | # Perform ident lookups 19 | module rfc931 20 | 21 | # Modules below this keyword will work in delayed execution mode. 22 | # This means client will be allowed to enter irc and if any module below 23 | # decides it shouldn't have, this client will be removed. 24 | #delayed 25 | 26 | # Check and reject open SOCKS proxies 27 | #module socks 28 | # port = 1080 29 | # option = reject,paranoid 30 | # reason = Denied access (insecure proxy found) 31 | 32 | #module socks 33 | # port = 559 34 | # option = reject,paranoid 35 | # reason = Denied access (insecure proxy found) 36 | 37 | # Check and reject HTTP CONNECT proxies on port 8080 38 | #module webproxy 39 | # port = 8080 40 | # option = reject 41 | # reason = Denied access (insecure proxy found) 42 | 43 | # Check and reject HTTP CONNECT proxies on port 3128 44 | #module webproxy 45 | # port = 3128 46 | # option = reject,careful 47 | # reason = Denied access (insecure proxy found) 48 | 49 | # Reject clients based on DNS BL. 50 | #module dnsbl 51 | # option = log,reject,servers=bl1.example.org,bl2.example.org 52 | # reason = Denied access (DNSBL) -------------------------------------------------------------------------------- /doc/m4macros: -------------------------------------------------------------------------------- 1 | # @(#)$Id: m4macros,v 1.3 2002/05/19 22:45:47 jv Exp $ 2 | 3 | The following macros are included in "ircd.m4" for use with the m4 text 4 | preprocessor. "ircd.m4" is parsed before the IRC server conf file so they 5 | are all available for use with that. 6 | 7 | NOTE: The "ircd.m4" file is *ONLY* created by a "make install". 8 | 9 | VERSION - current version string as in patchlevel.h 10 | DEBUGMODE - if DEBUGMODE is define in config.h, is also defined for m4. 11 | HOSTNAME - taken from hostname(1) 12 | USER - username of person doing the "make install" 13 | PORT - default port number as in config.h 14 | PFREQ - default ping frequency as in config.h 15 | CFREQ - default connect frequency as in config.h 16 | MAXSENDQ - default max sendq as in config.h 17 | CL - use this to wrap a class number 18 | HOST - use this to wrap a hostname 19 | HOSTM - use this to wrap the hostmask number in N-lines 20 | ID - when wrapping the host field in an I-line, causes ident string return 21 | to be used instead of user supplised username. 22 | PASS - use this to wrap passwords in C/N/I/O lines 23 | PING - use this to wrap the ping value in Y-lines 24 | APORT - use this to wrap the port number in I-lines 25 | CPORT - use this to wrap the port number in C-lines 26 | SERV - use this to wrap server names 27 | 28 | You might use some of these as 29 | C:foo.bar.edu:PASS(boo):foo.bar.edu:CPORT(6667) 30 | I:ID(128.250.*)::ID(*.mu.oz.au):APORT(6667) 31 | 32 | In addition to these (rather weak macros), some more complete ones are 33 | defined which already perform the above. 34 | 35 | ADMIN - provide fields to it as you would an A-line 36 | ALLOW - provide fields to it as you would an N-line 37 | BAN - provide fields to it as you would an K-line 38 | CLASS - provide fields to it as you would an Y-line 39 | CLIENT - provide fields to it as you would an I-line 40 | RESTRICTED - provide fields to it as you would an i-line 41 | CONNECT - provide fields to it as you would an C-line 42 | ME - provide fields to it as you would an M-line 43 | HUB - first parameter is server you want to hub, second is optional and is 44 | a mask against which other servers introduced must match against. 45 | LEAF - works like HUB, except that the mask is matched against server names 46 | to check if the link should be dropped. 47 | SERVER - uses 6 fields, the first 4 as are found in an N-line, the last two 48 | should be as you would use in a C-line. It expands out to provide 49 | both a C and N line. 50 | EXCLUDEVERSION - provide fields to it as you would a V-line 51 | SERVICE - provide fields to it as you would an S-line 52 | EXTRAPORT - first parameter is the additional port you want to listen on, 53 | second is optional and is the IP to bind to. 54 | -------------------------------------------------------------------------------- /doc/whoistls.txt: -------------------------------------------------------------------------------- 1 | ###################################################### 2 | 3 | whoistls - SSL/TLS connected client RPL_WHOISTLS reply 4 | 5 | ###################################################### 6 | 7 | This will show in (local) /WHOIS if a client is connected via SSL/TLS. 8 | 9 | define WHOISTLS to the message you want to show in WHOIS reply 10 | 11 | Will use RPL_WHOISEXTRA. 12 | 13 | This is non-standard use of numeric 320. 14 | 15 | You can also define WHOISTLS_NOTICE to a message that is sent to the 16 | client upon connection to a secure port (undefine to disable this) 17 | 18 | This patch do not provide SSL/TLS encryption, but instead a P-line 19 | flag 'T' to mark a port as SSL/TLS secured - you have to ensure it 20 | actual is 21 | 22 | Example: 23 | P:irc.example.net:::6667::: 24 | P:ssl.example.net:::6679::T: 25 | 26 | The first port (6667) is a regular unencrypted port and the second 27 | port (6679) is one you have ensured provides a secure SSL/TLS 28 | connection 29 | 30 | ###################################################################### 31 | 32 | changelog: 33 | 34 | v1.00 35 | 36 | 2020-04-28 -- mh 37 | 38 | * first release 39 | 40 | 2020-04-27 -- mh 41 | 42 | * project started 43 | 44 | ###################################################################### 45 | -------------------------------------------------------------------------------- /doc/whox.md: -------------------------------------------------------------------------------- 1 | # WHOX 2 | ## Introduction 3 | See https://ircv3.net/specs/extensions/whox 4 | 5 | ## Standard fields 6 | | Field | Description | Hint | 7 | | ------ |----------------------------------------------| -------------- | 8 | |t| the \ specified by the client || 9 | |c| an arbitrary channel the client is joined to || 10 | |u| username || 11 | |i| IP address || 12 | |h| hostname || 13 | |s| server name || 14 | |n| nickname || 15 | |f| WHO flags (away, server operator, etc) || 16 | |d| hop count (distance) || 17 | |l| number of seconds the user has been idle for | Idle time of users on other servers is not available | 18 | |a| account name |SASL account name or "0" if the user is not logged in| 19 | |o| channel op level |Always "n/a"| 20 | |r| realname || 21 | 22 | ## Additional non-standard fields 23 | The following additional fields have been added: 24 | | Field | Description | 25 | | ------ | ------------- | 26 | | S | return the SID| 27 | | U | return the UID| 28 | 29 | 30 | ## Examples 31 | Username/ident, IP address, hostname, nick 32 | 33 | WHO #ircd %cihn 34 | :dev.irc.it 354 test #ircd 92.74.191.157 dslb-092-074-191-157.092.074.pools.vodafone-ip.de test 35 | :dev.irc.it 354 test #ircd 54.38.153.88 de.ircnet.com patrick_ 36 | :dev.irc.it 354 test #ircd 255.255.255.255 patrick.users.contempt.chat patrick 37 | :dev.irc.it 315 test #ircd :End of WHO list. 38 | 39 | Nick and UID 40 | 41 | WHO #ircd %cnU 42 | :dev.irc.it 354 test #ircd test 380DAAAAB 43 | :dev.irc.it 354 test #ircd patrick_ 380IAAADT 44 | :dev.irc.it 354 test #ircd patrick 380IAAADL 45 | :dev.irc.it 315 test #ircd :End of WHO list. 46 | 47 | SID only 48 | 49 | WHO #ircd %cS 50 | :dev.irc.it 354 test #ircd 380D 51 | :dev.irc.it 354 test #ircd 380I 52 | :dev.irc.it 354 test #ircd 380I 53 | :dev.irc.it 315 test #ircd :End of WHO list. 54 | 55 | 56 | All information and token 123 57 | 58 | WHO #ircd %tcuihsnfdlaorSU,123 59 | :dev.irc.it 354 test 123 #ircd ~username 92.74.191.157 dslb-092-074-191-157.092.074.pools.vodafone-ip.de dev.irc.it test H 0 262 0 n/a 380D 380DAAAAB :realname 60 | :dev.irc.it 354 test 123 #ircd ~patrick 54.38.153.88 de.ircnet.com nova.irc.it patrick_ H 1 0 0 n/a 380I 380IAAADS :email: patrick@ircnet.com 61 | :dev.irc.it 354 test 123 #ircd ~patrick 255.255.255.255 patrick.users.contempt.chat nova.irc.it patrick H*@ 1 0 patrick n/a 380I 380IAAADL :Patrick 62 | :dev.irc.it 315 test #ircd :End of WHO list. 63 | 64 | Legacy: Former 'o' flag which filters for opers is still working with or without WHOX fields 65 | 66 | who #ircd o%cn 67 | :dev.irc.it 354 test #ircd patrick 68 | :dev.irc.it 315 test #ircd :End of WHO list. -------------------------------------------------------------------------------- /iauth/a_conf_def.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, iauth/a_conf_def.h 3 | * Copyright (C) 1998 Christophe Kalt 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | typedef struct Module aModule; 21 | typedef struct Instance AnInstance; 22 | typedef struct Target aTarget; 23 | 24 | struct Module 25 | { 26 | char *name; /* module name */ 27 | char *(*init)(AnInstance *); /* instance initialization */ 28 | void (*release)(AnInstance *);/* instance releasing >UNUSED< */ 29 | void (*stats)(AnInstance *); /* send instance stats to ircd */ 30 | int (*start)(u_int); /* start authentication */ 31 | int (*work)(u_int); /* called whenever something has to be 32 | * done (incoming data, timeout..) */ 33 | int (*timeout)(u_int); /* called when timeout is reached */ 34 | void (*clean)(u_int); /* finish/abort: cleanup*/ 35 | }; 36 | 37 | struct Instance 38 | { 39 | AnInstance *nexti; 40 | u_char in; /* instance number */ 41 | aModule *mod; /* module */ 42 | char *opt; /* options read from file */ 43 | char *popt; /* options to send to ircd */ 44 | void *data; /* private data: stats, ... */ 45 | aTarget *address; 46 | aTarget *hostname; 47 | u_int timeout; 48 | u_int port; 49 | char *reason; /* reject reason */ 50 | u_char delayed; /* delayed execution mode */ 51 | }; 52 | 53 | struct Target 54 | { 55 | char *value; 56 | char yes; 57 | aTarget *nextt; 58 | }; 59 | -------------------------------------------------------------------------------- /iauth/a_conf_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, iauth/a_conf_ext.h 3 | * Copyright (C) 1998 Christophe Kalt 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in iauth/a_conf.c. 22 | */ 23 | 24 | /* External definitions for global variables. 25 | */ 26 | #ifndef A_CONF_C 27 | extern u_int debuglevel; 28 | extern AnInstance *instances; 29 | #endif /* A_CONF_C */ 30 | 31 | /* External definitions for global functions. 32 | */ 33 | #ifndef A_CONF_C 34 | # define EXTERN extern 35 | #else /* A_CONF_C */ 36 | # define EXTERN 37 | #endif /* A_CONF_C */ 38 | 39 | EXTERN char *conf_read (char *); 40 | EXTERN int conf_match (u_int, AnInstance *); 41 | EXTERN void conf_ircd(void); 42 | 43 | #undef EXTERN 44 | -------------------------------------------------------------------------------- /iauth/a_defines.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, iauth/a_defines.h 3 | * Copyright (C) 1998 Christophe Kalt 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file includes all files defining constants, macros and types 21 | definitions used by the authentication process. 22 | */ 23 | 24 | #undef IAUTH_DEBUG 25 | 26 | #include "config.h" 27 | #include "patchlevel.h" 28 | 29 | #include "dbuf_def.h" /* needed for struct_def.h, sigh */ 30 | #include "class_def.h" /* needed for struct_def.h, sigh */ 31 | #include "struct_def.h" 32 | #include "../ircd/nameser_def.h" 33 | #include "support_def.h" 34 | #include "common_def.h" /* for isdigit, isalpha etc. */ 35 | 36 | #include "a_conf_def.h" 37 | #include "a_struct_def.h" 38 | #include "a_log_def.h" 39 | -------------------------------------------------------------------------------- /iauth/a_externs.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, iauth/a_externs.h 3 | * Copyright (C) 1998 Christophe Kalt 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file includes all *_ext.h files containing external declarations 21 | * for the authentication process. 22 | */ 23 | 24 | #include "match_ext.h" 25 | #include "support_ext.h" 26 | 27 | #include "a_conf_ext.h" 28 | #include "a_io_ext.h" 29 | #include "a_log_ext.h" 30 | 31 | #include "mod_dnsbl_ext.h" 32 | #include "mod_pipe_ext.h" 33 | #include "mod_rfc931_ext.h" 34 | #include "mod_socks_ext.h" 35 | #include "mod_webproxy_ext.h" -------------------------------------------------------------------------------- /iauth/a_io_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, iauth/a_io_ext.h 3 | * Copyright (C) 1998 Christophe Kalt 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in iauth/a_io.c. 22 | */ 23 | 24 | /* External definitions for global variables. 25 | */ 26 | #ifndef A_IO_C 27 | extern anAuthData cldata[MAXCONNECTIONS]; 28 | #endif /* A_IO_C */ 29 | 30 | /* External definitions for global functions. 31 | */ 32 | #ifndef A_IO_C 33 | #define EXTERN extern 34 | #else /* A_IO_C */ 35 | #define EXTERN 36 | #endif /* A_IO_C */ 37 | 38 | EXTERN void io_init(void); 39 | EXTERN void vsendto_ircd (char *, va_list); 40 | EXTERN void sendto_ircd (char *, ...); 41 | EXTERN void init_io (void); 42 | EXTERN void loop_io (void); 43 | EXTERN int tcp_connect (char *, char *, u_short, char **); 44 | 45 | EXTERN char strConn[256]; 46 | EXTERN int strConnLen; 47 | 48 | /* () */ 49 | #undef EXTERN 50 | -------------------------------------------------------------------------------- /iauth/a_log.c: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, iauth/a_log.c 3 | * Copyright (C) 1998 Christophe Kalt 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | #ifndef lint 21 | static const volatile char rcsid[] = "@(#)$Id: a_log.c,v 1.11 2004/10/01 20:22:13 chopin Exp $"; 22 | #endif 23 | 24 | #include "os.h" 25 | #include "a_defines.h" 26 | #define A_LOG_C 27 | #include "a_externs.h" 28 | #undef A_LOG_C 29 | 30 | #if defined(IAUTH_DEBUG) 31 | static FILE *debug = NULL; 32 | #endif 33 | static FILE *authlog = NULL; 34 | 35 | void init_filelogs(void) 36 | { 37 | #if defined(IAUTH_DEBUG) 38 | if (debug) 39 | fclose(debug); 40 | if (debuglevel) 41 | { 42 | debug = fopen(IAUTHDBG_PATH, "w"); 43 | # if defined(USE_SYSLOG) 44 | if (!debug) 45 | syslog(LOG_ERR, "Failed to open \"%s\" for writing", 46 | IAUTHDBG_PATH); 47 | # endif 48 | } 49 | #endif /* IAUTH_DEBUG */ 50 | if (authlog) 51 | fclose(authlog); 52 | authlog = fopen(FNAME_AUTHLOG, "a"); 53 | #if defined(USE_SYSLOG) 54 | if (!authlog) 55 | syslog(LOG_NOTICE, "Failed to open \"%s\" for writing", 56 | FNAME_AUTHLOG); 57 | #endif 58 | } 59 | 60 | void init_syslog(void) 61 | { 62 | #if defined(USE_SYSLOG) 63 | openlog("iauth", LOG_PID|LOG_NDELAY, LOG_FACILITY); 64 | #endif 65 | } 66 | 67 | void vsendto_log(int flags, int slflag, char *pattern, va_list va) 68 | { 69 | char logbuf[4096]; 70 | 71 | logbuf[0] = '>'; 72 | vsprintf(logbuf+1, pattern, va); 73 | 74 | #if defined(USE_SYSLOG) 75 | if (slflag) 76 | syslog(slflag, "%s", logbuf+1); 77 | #endif 78 | 79 | strcat(logbuf, "\n"); 80 | 81 | #if defined(IAUTH_DEBUG) 82 | if ((flags & ALOG_DALL) && (flags & debuglevel) && debug) 83 | { 84 | fprintf(debug, "%s", logbuf+1); 85 | fflush(debug); 86 | } 87 | #endif 88 | if (authlog && (flags & ALOG_FLOG)) 89 | { 90 | fprintf(authlog, "%s: %s", myctime(time(NULL)), logbuf+1); 91 | fflush(authlog); 92 | } 93 | if (flags & ALOG_IRCD) 94 | { 95 | write(0, logbuf, strlen(logbuf)); 96 | #if defined(IAUTH_DEBUG) 97 | if ((ALOG_DSPY & debuglevel) && debug) 98 | { 99 | fprintf(debug, "To ircd: %s", logbuf+1); 100 | fflush(debug); 101 | } 102 | #endif 103 | } 104 | } 105 | 106 | void sendto_log(int flags, int slflag, char *pattern, ...) 107 | { 108 | va_list va; 109 | va_start(va, pattern); 110 | vsendto_log(flags, slflag, pattern, va); 111 | va_end(va); 112 | } 113 | 114 | -------------------------------------------------------------------------------- /iauth/a_log_def.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, iauth/a_log_def.h 3 | * Copyright (C) 1998 Christophe Kalt 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | #if defined(IAUTH_DEBUG) 21 | # define DebugLog(x) sendto_log x 22 | #else 23 | # define DebugLog(x) 24 | #endif 25 | 26 | #define ALOG_FLOG 0x01 /* file log */ 27 | #define ALOG_IRCD 0x02 /* notice sent to ircd (then sent to &AUTH) */ 28 | 29 | #define ALOG_DCONF 0x000100 /* debug: configuration file */ 30 | #define ALOG_DMISC 0x000200 /* debug: misc stuff */ 31 | #define ALOG_DIO 0x000400 /* debug: IO stuff */ 32 | #define ALOG_DSPY 0x001000 /* debug: show ircd stream */ 33 | #define ALOG_DIRCD 0x002000 /* debug: errors reported by ircd */ 34 | 35 | #define ALOG_D931 0x010000 /* debug: module rfc931 */ 36 | #define ALOG_DSOCKS 0x020000 /* debug: module socks */ 37 | #define ALOG_DSOCKSC 0x040000 /* debug: module socks cache */ 38 | #define ALOG_DPIPE 0x080000 /* debug: module pipe */ 39 | #define ALOG_DNSBL 0x100000 /* debug: module dnsbl */ 40 | #define ALOG_DNSBLC 0x200000 /* debug: module dnsbl cache */ 41 | #define ALOG_DALL 0x3f3700 /* any debug flag */ 42 | -------------------------------------------------------------------------------- /iauth/a_log_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, iauth/a_log_ext.h 3 | * Copyright (C) 1998 Christophe Kalt 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in iauth/a_log.c. 22 | */ 23 | 24 | /* External definitions for global variables. 25 | */ 26 | #ifndef A_LOG_C 27 | #endif /* A_LOG_C */ 28 | 29 | /* External definitions for global functions. 30 | */ 31 | #ifndef A_LOG_C 32 | # define EXTERN extern 33 | #else /* A_LOG_C */ 34 | # define EXTERN 35 | #endif /* A_LOG_C */ 36 | 37 | EXTERN void init_filelogs(void); 38 | EXTERN void init_syslog(void); 39 | EXTERN void vsendto_log (int, int, char *, va_list); 40 | EXTERN void sendto_log (int, int, char *, ...); 41 | 42 | #undef EXTERN 43 | -------------------------------------------------------------------------------- /iauth/a_struct_def.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, iauth/a_struct_def.h 3 | * Copyright (C) 1998 Christophe Kalt 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | 21 | typedef struct AuthData anAuthData; 22 | 23 | #define INBUFSIZE 4096 /* I/O buffer size */ 24 | #define MAXI 16 /* maximum number of instances */ 25 | #define BDSIZE ((MAXI + 7) / 8) /* bit data size */ 26 | 27 | struct AuthData 28 | { 29 | /* the following are set by a_io.c and may be read by modules */ 30 | char user[USERLEN+1]; /* username */ 31 | char passwd[PASSWDLEN+1]; /* password */ 32 | char host[HOSTLEN+1]; /* hostname */ 33 | char itsip[HOSTLEN+1]; /* client ip */ 34 | u_short itsport; /* client port */ 35 | char ourip[HOSTLEN+1]; /* our ip */ 36 | u_short ourport; /* our port */ 37 | u_int state; /* state (general) */ 38 | 39 | /* the following are set by modules */ 40 | char *authuser; /* authenticated username */ 41 | u_char authfrom; /* where we got authuser from */ 42 | 43 | /* the following are for use by a_io.c only */ 44 | char idone[BDSIZE]; /* keeping track of instances' work */ 45 | u_char ileft; /* time saver, anything left? */ 46 | 47 | /* the following are shared by a_io.c & modules */ 48 | char *inbuffer; /* input buffer */ 49 | u_int buflen; /* length of data in buffer */ 50 | int rfd, wfd; /* fd's */ 51 | AnInstance *instance; /* the module instanciation working */ 52 | u_int mod_status; /* used by the module only! */ 53 | time_t timeout; /* timeout */ 54 | }; 55 | 56 | #define A_ACTIVE 0x0001 /* entry is active */ 57 | #define A_START 0x0002 /* go through modules from beginning */ 58 | #define A_DONE 0x0004 /* nothing left to be done */ 59 | #define A_IGNORE 0x0010 /* ignore subsequent messages from ircd */ 60 | #define A_LATE 0x0080 /* ircd is no longer waiting for a reply */ 61 | 62 | #define A_GOTU 0x0100 /* got username (from ircd) */ 63 | #define A_GOTP 0x0200 /* got password (from ircd) */ 64 | #define A_GOTH 0x0400 /* got hostname (from ircd) */ 65 | #define A_NOH 0x0800 /* no hostname available */ 66 | 67 | #define A_UNIX 0x1000 /* authuser is suitable for use by ircd */ 68 | #define A_DELAYEDSENT 0x2000 /* client already has been let in to ircd */ 69 | #define A_DENY 0x8000 /* connection should be denied access */ 70 | 71 | #define SetBit(v,n) v[n/8] |= (1 << (n % 8)) 72 | #define UnsetBit(v,n) v[n/8] &= ~(1 << (n % 8)) 73 | #define CheckBit(v,n) (v[n/8] & (1 << (n % 8))) 74 | -------------------------------------------------------------------------------- /iauth/mod_dnsbl_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, iauth/mod_socks_ext.h 3 | * Copyright (C) 2003 erra@RusNet 4 | * Copyright (C) 2003 Francois Baligant 5 | * Copyright (C) 2024 IRCnet.com 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 1, or (at your option) 10 | * 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., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | */ 21 | 22 | /* This file contains external definitions for global variables and functions 23 | * defined in iauth/mod_dnsbl.c. 24 | */ 25 | 26 | /* 27 | * External definitions for global variables. 28 | */ 29 | #ifndef MOD_DNSBL_C 30 | extern aModule Module_dnsbl; 31 | #endif 32 | -------------------------------------------------------------------------------- /iauth/mod_pipe_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, iauth/mod_pipe_ext.h 3 | * Copyright (C) 1999 Christophe Kalt 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in iauth/mod_pipe.c. 22 | */ 23 | 24 | /* External definitions for global variables. 25 | */ 26 | #ifndef MOD_PIPE_C 27 | extern aModule Module_pipe; 28 | #endif /* MOD_PIPE_C */ 29 | -------------------------------------------------------------------------------- /iauth/mod_rfc931_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, iauth/mod_rfc931_ext.h 3 | * Copyright (C) 1998 Christophe Kalt 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in iauth/mod_rfc931.c. 22 | */ 23 | 24 | /* External definitions for global variables. 25 | */ 26 | #ifndef MOD_RFC931_C 27 | extern aModule Module_rfc931; 28 | #endif /* MOD_RFC931_C */ 29 | 30 | /* External definitions for global functions. 31 | */ 32 | #ifndef MOD_RFC931_C 33 | # define EXTERN extern 34 | #else /* MOD_RFC931_C */ 35 | # define EXTERN 36 | #endif /* MOD_RFC931_C */ 37 | 38 | /* 39 | EXTERN int rfc931_start (u_int); 40 | EXTERN int rfc931_work (u_int); 41 | EXTERN int rfc931_timeout (u_int); 42 | EXTERN void rfc931_clean (u_int); 43 | */ 44 | 45 | #undef EXTERN 46 | -------------------------------------------------------------------------------- /iauth/mod_socks_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, iauth/mod_socks_ext.h 3 | * Copyright (C) 1998 Christophe Kalt 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in iauth/mod_socks.c. 22 | */ 23 | 24 | /* External definitions for global variables. 25 | */ 26 | #ifndef MOD_SOCKS_C 27 | extern aModule Module_socks; 28 | #endif /* MOD_SOCKS_C */ 29 | -------------------------------------------------------------------------------- /iauth/mod_webproxy_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, iauth/mod_webproxy_ext.h 3 | * Copyright (C) 1998 Christophe Kalt 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in iauth/mod_webproxy.c. 22 | */ 23 | 24 | /* External definitions for global variables. 25 | */ 26 | #ifndef MOD_PROXY_C 27 | extern aModule Module_webproxy; 28 | #endif /* MOD_PROXY_C */ 29 | -------------------------------------------------------------------------------- /ircd/buildm4: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # IRC - Internet Relay Chat, ircd/buildm4 3 | # Copyright (C) 1993, 1994 Darren Reed 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 1, or (at your option) 8 | # any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | # 19 | # $Id: buildm4,v 1.12 2002/05/19 22:46:42 jv Exp $ 20 | # 21 | 22 | # 23 | # If only this was a perl script...*sigh* 24 | # 25 | INCLUDE=`../support/config.guess` 26 | # Installation with absolute path now (Kratz) 27 | M4=$1 28 | /bin/rm -f $M4 29 | egrep "^#def[^P]*PATCHLEVEL" ../common/patchlevel.h | \ 30 | sed -e 's/[^\"]*\"\([^\"]*\)\"/define(VERSION,\1)/' >>$M4 31 | DEBUG=`egrep "^#define[ ]*DEBUGMODE" config.h` 32 | if [ -n "$DEBUG" ] ; then 33 | echo "define(DEBUGMODE,1)" >>$M4 34 | else 35 | echo "undefine(DEBUGMODE)" >>$M4 36 | fi 37 | HOST="`hostname | sed -e 's/\([a-zA-Z0-9\-]*\).*/\1/'`" 38 | echo "define(HOSTNAME,$HOST)" >> $M4 39 | 40 | echo "define(USER,$USER)" >>$M4 41 | 42 | PORT=`egrep '^#define[ ]*PORT[ ]*[0-9]*' ../$INCLUDE/config.h | \ 43 | sed -e 's/[^0-9]*\([0-9]*\).*/\1/'` 44 | echo "define(PORT,$PORT)" >> $M4 45 | 46 | PING=`egrep '^#define[ ]*PINGFREQUENCY[ ]*[0-9]*' ../$INCLUDE/config.h\ 47 | | sed -e 's/[^0-9]*\([0-9]*\).*/\1/'` 48 | echo "define(PFREQ,$PING)" >> $M4 49 | 50 | CONT=`egrep '^#define[ ]*CONNECTFREQUENCY[ ]*[0-9]*' ../$INCLUDE/config.h\ 51 | | sed -e 's/[^0-9]*\([0-9]*\).*/\1/'` 52 | echo "define(CFREQ,$CONT)" >> $M4 53 | 54 | MAXL=`egrep '^#define[ ]*MAXIMUM_LINKS[ ]*[0-9]* | head -1' \ 55 | ../$INCLUDE/config.h | sed -e 's/[^0-9]*\([0-9]*\).*/\1/'` 56 | echo "define(MAXLINKS,$MAXL)" >> $M4 57 | 58 | DOM=`egrep '^domain' /etc/resolv.conf | \ 59 | sed -e 's/^domain[ ]*\([^ ]*\).*/\1/'` 60 | echo "define(DOMAIN,$DOM)" >> $M4 61 | 62 | cat >>$M4 <<_EOF_ 63 | define(CL,\`ifelse(len(\$1),0,0,\$1)') 64 | define(MAXSENDQ,0) 65 | define(HOST,\$1) 66 | define(HOSTM,\$1) 67 | define(ID,*@\$1) 68 | define(PASS,\$1) 69 | define(PING,\`ifelse(len(\$1),0,PFREQ,\$1)') 70 | define(APORT,\`ifelse(len(\$1),0,PORT,\$1)') 71 | define(FREQ,\`ifelse(len(\$1),0,CFREQ,\$1)') 72 | define(SENDQ,\`ifelse(len(\$1),0,MAXSENDQ,\$1)') 73 | define(MAX,\`ifelse(len(\$1),0,MAXLINKS,\$1)') 74 | define(UID,\`ifelse(len(\$1),0,unknown,\$1)') 75 | define(CPORT,\$1) 76 | define(SERV,\$1) 77 | define(ADMIN,A:\$1:\$2:\$3:\$4:\$5) 78 | define(ALLOW,N:\`HOST(\$1)':\`PASS(\$2)':\`SERV(\$3)':\`HOSTM(\$4)':\`CL(\$5)') 79 | define(BAN,K:\$1:\$2:\$3:\$4:) 80 | define(BANIDENT,k:\$1:\$2:\`UID(\$3)':\$4:) 81 | define(CLASS,Y:\$1:\`PING(\$2)':\$3:\`MAX(\$4)':\`SENDQ(\$5)':\$6:\$7) 82 | define(CLIENT,I:\`HOST(\$1)':\`PASS(\$2)':\`ifelse(len(HOST(\$3)),0,\$1,\$3)':\ 83 | \`APORT(\$4)':\`CL(\$5)') 84 | define(RESTRICTED,i:\`HOST(\$1)':\`PASS(\$2)':\ 85 | \`ifelse(len(HOST(\$3)),0,\$1,\$3)':\`APORT(\$4)':\`CL(\$5)') 86 | define(BOUNCE,B:\$1::\$2:\$3:) 87 | define(CONNECT,C:\`HOST(\$1)':\`PASS(\$2)':\`SERV(\$3)':\ 88 | \`CPORT(\$4)':\`CL(\$5)') 89 | define(EXCLUDEVERSION,V:\$1:\$2:\`ifelse(len(\$3),0,*,\$3)'::) 90 | define(ME,M:\$1:\$2:\$3:\$4:\$5 91 | P:\$2:*:*:\$4) 92 | define(HUB,H:\`ifelse(len(\$2),0,*,\$2)':*:\$1) 93 | define(LEAF,L:\`ifelse(len(\$2),0,*,\$2)':*:\$1:1) 94 | define(SERVER,\` 95 | CONNECT(\$1,\$2,\$3,\$5,\$6) 96 | ALLOW(\$1,\$2,\$3,\$4,\$6) 97 | ') 98 | define(SERVICE,S:\`HOST(\$1)':\`PASS(\$2)':\$3:\`ifelse(len(\$4),0,0,\$4)':\ 99 | \`CL(\$5)') 100 | define(EXTRAPORT,P:\`ifelse(len(\$2),0,*,\$2)':*:*:\$1) 101 | _EOF_ 102 | -------------------------------------------------------------------------------- /ircd/channel_def.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, ircd/channel_def.h 3 | * Copyright (C) 1990 Jarkko Oikarinen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | #define CREATE 1 /* whether a channel should be 21 | created or just tested for existance */ 22 | 23 | #define MODEBUFLEN 200 24 | 25 | #define NullChn ((aChannel *)0) 26 | 27 | #define ChannelExists(n) (find_channel(n, NullChn) != NullChn) 28 | -------------------------------------------------------------------------------- /ircd/channel_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, ircd/channel_ext.h 3 | * Copyright (C) 1997 Alain Nissen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in ircd/channel.c. 22 | */ 23 | 24 | /* External definitions for global variables. 25 | */ 26 | #ifndef CHANNEL_C 27 | extern aChannel *channel; 28 | #endif /* CHANNEL_C */ 29 | 30 | /* External definitions for global functions. 31 | */ 32 | #ifndef CHANNEL_C 33 | #define EXTERN extern 34 | #else /* CHANNEL_C */ 35 | #define EXTERN 36 | #endif /* CHANNEL_C */ 37 | EXTERN void remove_user_from_channel (aClient *sptr, aChannel *chptr); 38 | EXTERN int is_chan_op (aClient *cptr, aChannel *chptr); 39 | EXTERN int has_voice (aClient *cptr, aChannel *chptr); 40 | EXTERN int can_send (aClient *cptr, aChannel *chptr); 41 | 42 | #ifdef JAPANESE 43 | EXTERN char *get_channelmask (char *); 44 | EXTERN int jp_valid (aClient *, aChannel *, char *); 45 | #else 46 | #define get_channelmask(x) rindex((x), ':') 47 | #endif 48 | 49 | EXTERN aChannel *find_channel (Reg char *chname, Reg aChannel *chptr); 50 | EXTERN void setup_server_channels (aClient *mp); 51 | EXTERN void channel_modes (aClient *cptr, Reg char *mbuf, Reg char *pbuf, 52 | aChannel *chptr); 53 | EXTERN void send_channel_modes (aClient *cptr, aChannel *chptr); 54 | EXTERN void send_channel_members (aClient *cptr, aChannel *chptr); 55 | EXTERN int m_mode (aClient *cptr, aClient *sptr, int parc, char *parv[]); 56 | EXTERN int clean_channelname (Reg char *cn); 57 | EXTERN void del_invite (aClient *cptr, aChannel *chptr); 58 | EXTERN int m_join (Reg aClient *cptr, Reg aClient *sptr, int parc, 59 | char *parv[]); 60 | EXTERN int m_njoin (Reg aClient *cptr, Reg aClient *sptr, int parc, 61 | char *parv[]); 62 | EXTERN int m_part (aClient *cptr, aClient *sptr, int parc, char *parv[]); 63 | EXTERN int m_kick (aClient *cptr, aClient *sptr, int parc, char *parv[]); 64 | EXTERN int m_topic (aClient *cptr, aClient *sptr, int parc, char *parv[]); 65 | EXTERN int m_invite (aClient *cptr, aClient *sptr, int parc, 66 | char *parv[]); 67 | EXTERN int m_list (aClient *cptr, aClient *sptr, int parc, char *parv[]); 68 | EXTERN int m_names (aClient *cptr, aClient *sptr, int parc, char *parv[]); 69 | EXTERN time_t collect_channel_garbage (time_t now); 70 | #undef EXTERN 71 | -------------------------------------------------------------------------------- /ircd/class_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, ircd/class_ext.h 3 | * Copyright (C) 1997 Alain Nissen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in ircd/class.c. 22 | */ 23 | 24 | /* External definitions for global variables. 25 | */ 26 | #ifndef CLASS_C 27 | extern aClass *classes; 28 | #endif /* CLASS_C */ 29 | 30 | /* External definitions for global functions. 31 | */ 32 | #ifndef CLASS_C 33 | #define EXTERN extern 34 | #else /* CLASS_C */ 35 | #define EXTERN 36 | #endif /* CLASS_C */ 37 | EXTERN int get_conf_class (aConfItem *aconf); 38 | EXTERN int get_client_class (aClient *acptr); 39 | EXTERN int get_client_ping (aClient *acptr); 40 | EXTERN int get_con_freq (aClass *clptr); 41 | EXTERN void add_class (int class, int ping, int confreq, int maxli, 42 | int sendq, int bsendq, int hlocal, int uhlocal, 43 | int hglobal, int uhglobal 44 | #ifdef ENABLE_CIDR_LIMITS 45 | , char * 46 | #endif 47 | ); 48 | EXTERN aClass *find_class (int cclass); 49 | EXTERN void check_class(void); 50 | EXTERN void initclass(void); 51 | EXTERN void report_classes (aClient *sptr, char *to); 52 | EXTERN int get_sendq (aClient *cptr, int); 53 | #undef EXTERN 54 | -------------------------------------------------------------------------------- /ircd/fileio.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ircd-ratbox: A slightly useful ircd. 3 | * fileio.h: The file input/output header. 4 | * 5 | * Copyright (C) 1990 Jarkko Oikarinen and University of Oulu, Co Center 6 | * Copyright (C) 1996-2002 Hybrid Development Team 7 | * Copyright (C) 2002-2004 ircd-ratbox development team 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 22 | * USA 23 | * 24 | * $Id: fileio.h,v 1.1 2005/02/15 19:16:09 chopin Exp $ 25 | */ 26 | 27 | #ifndef INCLUDED_fileio_h 28 | #define INCLUDED_fileio_h 29 | 30 | #define FB_EOF 0x01 31 | #define FB_FAIL 0x02 32 | 33 | struct FileBuf 34 | { 35 | int fd; /* file descriptor */ 36 | char *endp; /* one past the end */ 37 | char *ptr; /* current read pos */ 38 | char *pbptr; /* pointer to push back char */ 39 | int flags; /* file state */ 40 | char buf[BUFSIZ]; /* buffer */ 41 | char pbuf[BUFSIZ + 1]; /* push back buffer */ 42 | }; 43 | 44 | /* XXX This shouldn't be here */ 45 | struct Client; 46 | 47 | /* 48 | * FileBuf is a mirror of the ANSI FILE struct, but it works for any 49 | * file descriptor. FileBufs are allocated when a file is opened with 50 | * fbopen, and they are freed when the file is closed using fbclose. 51 | */ 52 | typedef struct FileBuf FBFILE; 53 | 54 | /* 55 | * open a file and return a FBFILE*, see fopen(3) 56 | */ 57 | extern FBFILE *fbopen(const char *filename, const char *mode); 58 | /* 59 | * associate a file descriptor with a FBFILE* 60 | * if a FBFILE* is associated here it MUST be closed using fbclose 61 | * see fdopen(3) 62 | */ 63 | extern FBFILE *fdbopen(int fd, const char *mode); 64 | /* 65 | * close a file opened with fbopen, see fclose(3) 66 | */ 67 | extern void fbclose(FBFILE * fb); 68 | /* 69 | * return the next character from the file, EOF on end of file 70 | * see fgetc(3) 71 | */ 72 | extern int fbgetc(FBFILE * fb); 73 | /* 74 | * return next string in a file up to and including the newline character 75 | * see fgets(3) 76 | */ 77 | extern char *fbgets(char *buf, size_t len, FBFILE * fb); 78 | /* 79 | * ungets c to fb see ungetc(3) 80 | */ 81 | extern void fbungetc(char c, FBFILE * fb); 82 | /* 83 | * write a null terminated string to a file, see fputs(3) 84 | */ 85 | extern int fbputs(const char *str, FBFILE * fb); 86 | /* 87 | * return the status of the file associated with fb, see fstat(3) 88 | */ 89 | extern int fbstat(struct stat *sb, FBFILE * fb); 90 | /* 91 | * popen a file. 92 | */ 93 | extern FBFILE *fbpopen(const char *, const char *); 94 | 95 | #endif /* INCLUDED_fileio_h */ 96 | -------------------------------------------------------------------------------- /ircd/hash_def.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, ircd/hash_def.h 3 | * Copyright (C) 1991 Darren Reed 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | typedef struct hashentry { 21 | int hits; 22 | int links; 23 | void *list; 24 | } aHashEntry; 25 | 26 | /* 27 | * it is not important for these to be "big" as ircd will make them grow 28 | * as required. 29 | */ 30 | #define HASHSIZE ((int)((float)MAXCONNECTIONS*1.75)) 31 | #define CHANNELHASHSIZE ((int)(((float)MAXCONNECTIONS*1.75)/2.0)) 32 | #define SIDSIZE (MAXCONNECTIONS/10) 33 | #ifdef USE_HOSTHASH 34 | #define HOSTNAMEHASHSIZE ((int)((float)MAXCONNECTIONS*1.75)) 35 | #endif 36 | #ifdef USE_IPHASH 37 | #define IPHASHSIZE ((int)((float)MAXCONNECTIONS*1.75)) 38 | #endif 39 | #define UIDSIZE ((int)((float)MAXCONNECTIONS*1.75)) 40 | 41 | 42 | -------------------------------------------------------------------------------- /ircd/hash_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, ircd/hash_ext.h 3 | * Copyright (C) 1997 Alain Nissen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in ircd/hash.c. 22 | */ 23 | 24 | /* External definitions for global variables. 25 | */ 26 | #ifndef HASH_C 27 | extern int _HASHSIZE; 28 | extern int _UIDSIZE; 29 | extern int _CHANNELHASHSIZE; 30 | extern int _SIDSIZE; 31 | #ifdef USE_HOSTHASH 32 | extern int _HOSTNAMEHASHSIZE; 33 | #endif 34 | #ifdef USE_IPHASH 35 | extern int _IPHASHSIZE; 36 | #endif 37 | #endif /* HASH_C */ 38 | 39 | /* External definitions for global functions. 40 | */ 41 | #ifndef HASH_C 42 | #define EXTERN extern 43 | #else /* HASH_C */ 44 | #define EXTERN 45 | #endif /* HASH_C */ 46 | EXTERN void inithashtables(void); 47 | EXTERN int add_to_client_hash_table (char *name, aClient *cptr); 48 | EXTERN int add_to_uid_hash_table (char *uid, aClient *cptr); 49 | EXTERN int add_to_channel_hash_table (char *name, aChannel *chptr); 50 | EXTERN int add_to_sid_hash_table (char *sid, aClient *cptr); 51 | EXTERN int del_from_client_hash_table (char *name, aClient *cptr); 52 | EXTERN int del_from_uid_hash_table (char *uid, aClient *cptr); 53 | EXTERN int del_from_channel_hash_table (char *name, aChannel *chptr); 54 | EXTERN int del_from_sid_hash_table (aServer *sptr); 55 | EXTERN aClient *hash_find_client (char *name, aClient *cptr); 56 | EXTERN aClient *hash_find_uid (char *uid, aClient *cptr); 57 | EXTERN aClient *hash_find_server (char *server, aClient *cptr); 58 | EXTERN aChannel *hash_find_channel (char *name, aChannel *chptr); 59 | EXTERN aChannel *hash_find_channels (char *name, aChannel *chptr); 60 | EXTERN aClient *hash_find_sid (char *sid, aClient *cptr); 61 | #ifdef USE_HOSTHASH 62 | EXTERN int add_to_hostname_hash_table (char *hostname, anUser *user); 63 | EXTERN int del_from_hostname_hash_table (char *hostname, anUser *user); 64 | EXTERN anUser *hash_find_hostname (char *hostname, anUser *user); 65 | #endif 66 | #ifdef USE_IPHASH 67 | EXTERN int add_to_ip_hash_table (char *ip, anUser *user); 68 | EXTERN int del_from_ip_hash_table (char *ip, anUser *user); 69 | EXTERN anUser *hash_find_ip (char *ip, anUser *user); 70 | #endif 71 | EXTERN int m_hash (aClient *cptr, aClient *sptr, int parc, char *parv[]); 72 | 73 | #undef EXTERN 74 | -------------------------------------------------------------------------------- /ircd/ircd_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, ircd/ircd_ext.h 3 | * Copyright (C) 1997 Alain Nissen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in ircd/ircd.c. 22 | */ 23 | 24 | /* External definitions for global variables. 25 | */ 26 | #ifndef IRCD_C 27 | extern aClient me; 28 | extern aClient *client; 29 | extern istat_t istat; 30 | extern iconf_t iconf; 31 | extern char **myargv; 32 | extern int rehashed; 33 | extern int portnum; 34 | extern int serverbooting; 35 | extern int firstrejoindone; 36 | extern char *configfile; 37 | extern int debuglevel; 38 | extern int bootopt; 39 | extern char *sbrk0; 40 | extern char *tunefile; 41 | #ifdef DELAY_CLOSE 42 | extern time_t nextdelayclose; 43 | #endif 44 | extern time_t nextconnect; 45 | extern time_t nextgarbage; 46 | extern time_t nextping; 47 | extern time_t nextdnscheck; 48 | extern time_t nextexpire; 49 | #ifdef TKLINE 50 | extern time_t nexttkexpire; 51 | #endif 52 | extern aClient *ListenerLL; 53 | #endif /* IRCD_C */ 54 | 55 | /* External definitions for global functions. 56 | */ 57 | #ifndef IRCD_C 58 | #define EXTERN extern 59 | #else /* IRCD_C */ 60 | #define EXTERN 61 | #endif /* IRCD_C */ 62 | EXTERN RETSIGTYPE s_die (int s); 63 | EXTERN void restart (char *mesg); 64 | EXTERN RETSIGTYPE s_restart (int s); 65 | EXTERN void server_reboot(void); 66 | EXTERN void ircd_writetune (char *filename); 67 | EXTERN void ircd_readtune (char *filename); 68 | #undef EXTERN 69 | -------------------------------------------------------------------------------- /ircd/list_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, ircd/list_ext.h 3 | * Copyright (C) 1997 Alain Nissen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in ircd/list.c. 22 | */ 23 | 24 | /* External definitions for global variables. 25 | */ 26 | #ifndef LIST_C 27 | extern anUser *usrtop; 28 | extern aServer *svrtop; 29 | extern int numclients; 30 | extern const char *DefInfo; 31 | #endif /* LIST_C */ 32 | 33 | /* External definitions for global functions. 34 | */ 35 | #ifndef LIST_C 36 | #define EXTERN extern 37 | #else /* LIST_C */ 38 | #define EXTERN 39 | #endif /* LIST_C */ 40 | EXTERN void initlists(void); 41 | EXTERN void outofmemory(void); 42 | #ifdef DEBUGMODE 43 | EXTERN void checklists(void); 44 | EXTERN void send_listinfo (aClient *cptr, char *name); 45 | #endif /* DEBUGMOE */ 46 | EXTERN aClient *make_client (aClient *from); 47 | EXTERN void free_client (aClient *cptr); 48 | EXTERN anUser *make_user (aClient *cptr, int iplen); 49 | EXTERN aServer *make_server (aClient *cptr); 50 | EXTERN void free_user (anUser *user); 51 | EXTERN void free_server (aServer *serv); 52 | EXTERN void remove_client_from_list (Reg aClient *cptr); 53 | EXTERN void reorder_client_in_list (aClient *cptr); 54 | EXTERN void add_client_to_list (aClient *cptr); 55 | EXTERN Link *find_user_link (Reg Link *lp, Reg aClient *ptr); 56 | EXTERN Link *find_channel_link (Reg Link *lp, Reg aChannel *ptr); 57 | EXTERN Link *make_link(void); 58 | EXTERN invLink *make_invlink(void); 59 | EXTERN void free_link (Reg Link *lp); 60 | EXTERN void free_invlink (Reg invLink *lp); 61 | EXTERN aClass *make_class(void); 62 | EXTERN void free_class (Reg aClass *tmp); 63 | EXTERN aConfItem *make_conf(void); 64 | EXTERN void delist_conf (aConfItem *aconf); 65 | EXTERN void free_conf (aConfItem *aconf); 66 | EXTERN void add_fd (int fd, FdAry *ary); 67 | EXTERN int del_fd (int fd, FdAry *ary); 68 | #undef EXTERN 69 | -------------------------------------------------------------------------------- /ircd/res_comp_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, ircd/res_comp_ext.h 3 | * Copyright (C) 1997 Alain Nissen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in ircd/res_comp.c. 22 | */ 23 | 24 | /* External definitions for global functions. 25 | */ 26 | #ifndef RES_COMP_C 27 | #define EXTERN extern 28 | #else /* RES_COMP_C */ 29 | #define EXTERN 30 | #endif /* RES_COMP_C */ 31 | EXTERN int ircd_dn_expand (const u_char *msg, const u_char *eomorig, 32 | const u_char *comp_dn, char *exp_dn, 33 | int length); 34 | EXTERN int ircd_dn_comp (const char *exp_dn, u_char *comp_dn, int length, 35 | u_char **dnptrs, u_char **lastdnptr); 36 | EXTERN int __ircd_dn_skipname (const u_char *comp_dn, const u_char *eom); 37 | EXTERN u_int16_t ircd_getshort (register const u_char *msgp); 38 | EXTERN u_int32_t ircd_getlong (register const u_char *msgp); 39 | EXTERN void ircd__putshort (register u_int16_t s, register u_char *msgp); 40 | EXTERN void ircd__putlong (register u_int32_t l, register u_char *msgp); 41 | #ifdef NEXT 42 | EXTERN u_int16_t res_getshort (register const u_char *msgp); 43 | #endif /* NEXT */ 44 | #undef EXTERN 45 | -------------------------------------------------------------------------------- /ircd/res_def.h: -------------------------------------------------------------------------------- 1 | /* 2 | * $Id: res_def.h,v 1.7 2008/06/24 00:12:56 chopin Exp $ 3 | * 4 | * ircd/res_def.h (C)opyright 1992 Darren Reed. 5 | */ 6 | 7 | #define RES_INITLIST 1 8 | #define RES_CALLINIT 2 9 | #define RES_INITSOCK 4 10 | #define RES_INITDEBG 8 11 | #define RES_INITCACH 16 12 | 13 | #define MAXPACKET 1024 14 | #define MAXALIASES 35 15 | #define MAXADDRS 35 16 | 17 | #define AR_TTL 600 /* TTL in seconds for dns cache entries */ 18 | 19 | #define FLG_A_VALID 1 20 | #define FLG_AAAA_VALID 2 21 | #define FLG_PTR_PEND_FWD 4 22 | #define FLG_PTR_PEND_REV 8 23 | #define FLG_PTR_PEND (FLG_PTR_PEND_FWD|FLG_PTR_PEND_REV) 24 | #define FLG_PTR_VALID 16 25 | 26 | struct hent { 27 | char *h_name; /* official name of host */ 28 | char *h_aliases[MAXALIASES]; /* alias list */ 29 | int h_addrtype; /* host address type */ 30 | int h_length; /* length of address */ 31 | /* list of addresses from name server */ 32 | struct IN_ADDR h_addr_list[MAXADDRS]; 33 | #define h_addr h_addr_list[0] /* address, for backward compatiblity */ 34 | }; 35 | 36 | typedef struct reslist { 37 | int id; 38 | int sent; /* number of requests sent */ 39 | int srch; 40 | time_t ttl; 41 | char type; 42 | char retries; /* retry counter */ 43 | char sends; /* number of sends (>1 means resent) */ 44 | char resend; /* send flag. 0 == dont resend */ 45 | time_t sentat; 46 | time_t timeout; 47 | struct IN_ADDR addr; 48 | char *name; 49 | struct reslist *next; 50 | Link cinfo; 51 | struct hent he; 52 | } ResRQ; 53 | 54 | typedef struct cache { 55 | time_t expireat; 56 | time_t ttl; 57 | int flags; 58 | struct hostent he; 59 | struct cache *hname_next, *hnum_next, *list_next; 60 | } aCache; 61 | 62 | typedef struct cachetable { 63 | aCache *num_list; 64 | aCache *name_list; 65 | } CacheTable; 66 | 67 | /* must be a prime */ 68 | #define ARES_CACSIZE 1009 69 | /* should be around twice smaller */ 70 | #define MAXCACHED 512 71 | -------------------------------------------------------------------------------- /ircd/res_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, ircd/res_ext.h 3 | * Copyright (C) 1997 Alain Nissen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in ircd/res.c. 22 | */ 23 | 24 | /* External definitions for global functions. 25 | */ 26 | #ifndef RES_C 27 | #define EXTERN extern 28 | #else /* RES_C */ 29 | #define EXTERN 30 | #endif /* RES_C */ 31 | extern int init_resolver (int op); 32 | EXTERN time_t timeout_query_list (time_t now); 33 | EXTERN void del_queries (char *cp); 34 | EXTERN struct hostent *gethost_byname (char *name, Link *lp); 35 | EXTERN struct hostent *gethost_byname_type (char *name, Link *lp, 36 | int type); 37 | EXTERN struct hostent *gethost_byaddr (char *addr, Link *lp); 38 | EXTERN struct hostent *get_res (char *lp); 39 | EXTERN time_t expire_cache (time_t now); 40 | EXTERN void flush_cache(void); 41 | EXTERN int m_dns (aClient *cptr, aClient *sptr, int parc, char *parv[]); 42 | EXTERN u_long cres_mem (aClient *sptr, char *nick); 43 | #undef EXTERN 44 | -------------------------------------------------------------------------------- /ircd/res_init_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, ircd/res_init_ext.h 3 | * Copyright (C) 1997 Alain Nissen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in ircd/res_init.c. 22 | */ 23 | 24 | /* External definitions for global variables. 25 | */ 26 | #ifndef RES_INIT_C 27 | extern struct __res_state ircd_res; 28 | #endif /* RES_INIT_C */ 29 | 30 | /* External definitions for global functions. 31 | */ 32 | #ifndef RES_INIT_C 33 | #define EXTERN extern 34 | #else /* RES_INIT_C */ 35 | #define EXTERN 36 | #endif /* RES_INIT_C */ 37 | EXTERN int ircd_res_init(void); 38 | EXTERN u_int ircd_res_randomid(void); 39 | #undef EXTERN 40 | -------------------------------------------------------------------------------- /ircd/res_mkquery_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, ircd/res_mkquery_ext.h 3 | * Copyright (C) 1997 Alain Nissen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in ircd/res_mkquery.c. 22 | */ 23 | 24 | /* External definitions for global functions. 25 | */ 26 | #ifndef RES_MKQUERY_C 27 | #define EXTERN extern 28 | #else /* RES_MKQUERY_C */ 29 | #define EXTERN 30 | #endif /* RES_MKQUERY_C */ 31 | EXTERN int ircd_res_mkquery (int op, const char *dname, int class, 32 | int type, const u_char *data, int datalen, 33 | const u_char *newrr_in, u_char *buf, 34 | int buflen); 35 | #undef EXTERN 36 | -------------------------------------------------------------------------------- /ircd/s_auth_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, ircd/s_auth_ext.h 3 | * Copyright (C) 1997 Alain Nissen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in ircd/s_auth.c. 22 | */ 23 | 24 | /* External definitions for global functions. 25 | */ 26 | #ifndef S_AUTH_C 27 | # if defined(USE_IAUTH) 28 | extern u_char iauth_options; 29 | extern u_int iauth_spawn; 30 | # endif 31 | # 32 | # define EXTERN extern 33 | #else /* S_AUTH_C */ 34 | # define EXTERN 35 | #endif /* S_AUTH_C */ 36 | 37 | #if defined(USE_IAUTH) 38 | EXTERN int vsendto_iauth (char *pattern, va_list va); 39 | EXTERN int sendto_iauth (char *pattern, ...); 40 | EXTERN void read_iauth(void); 41 | EXTERN void report_iauth_conf (aClient *, char *); 42 | EXTERN void report_iauth_stats (aClient *, char *); 43 | #endif 44 | EXTERN void start_auth (Reg aClient *cptr); 45 | EXTERN void send_authports (aClient *cptr); 46 | EXTERN void read_authports (Reg aClient *cptr); 47 | 48 | #undef EXTERN 49 | -------------------------------------------------------------------------------- /ircd/s_bsd_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, ircd/s_bsd_ext.h 3 | * Copyright (C) 1997 Alain Nissen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in ircd/s_bsd.c. 22 | */ 23 | 24 | /* External definitions for global variables. 25 | */ 26 | #ifndef S_BSD_C 27 | extern aClient *local[]; 28 | extern FdAry fdas, fdaa, fdall; 29 | extern int highest_fd, readcalls, udpfd, resfd, adfd; 30 | extern time_t timeofday; 31 | #endif /* S_BSD_C */ 32 | 33 | /* External definitions for global functions. 34 | */ 35 | #ifndef S_BSD_C 36 | #define EXTERN extern 37 | #else /* S_BSD_C */ 38 | #define EXTERN 39 | #endif /* S_BSD_C */ 40 | EXTERN void add_local_domain (char *hname, size_t size); 41 | EXTERN void report_error (char *text, aClient *cptr); 42 | EXTERN int inetport (aClient *cptr, char *ip, char *ipmask, int port, 43 | int dolisten); 44 | EXTERN int add_listener (aConfItem *aconf); 45 | EXTERN void close_listeners(void); 46 | EXTERN void open_listener(aClient *cptr); 47 | EXTERN void reopen_listeners(void); 48 | EXTERN void activate_delayed_listeners(void); 49 | EXTERN void start_iauth (int); 50 | EXTERN void init_sys(void); 51 | EXTERN void daemonize(void); 52 | EXTERN void write_pidfile(void); 53 | EXTERN int check_client (Reg aClient *cptr); 54 | EXTERN int check_server_init (aClient *cptr); 55 | EXTERN int check_server (aClient *cptr, Reg struct hostent *hp, 56 | Reg aConfItem *c_conf, Reg aConfItem *n_conf); 57 | EXTERN void close_connection (aClient *cptr); 58 | EXTERN void close_client_fd(aClient *cptr); 59 | EXTERN int get_sockerr (aClient *cptr); 60 | EXTERN void set_non_blocking (int fd, aClient *cptr); 61 | EXTERN aClient *add_connection (aClient *cptr, int fd); 62 | EXTERN int read_message (time_t delay, FdAry *fdp, int ro); 63 | EXTERN int connect_server (aConfItem *aconf, aClient *by, 64 | struct hostent *hp); 65 | EXTERN void get_my_name (aClient *cptr, char *name, int len); 66 | EXTERN int setup_ping (aConfItem *aconf); 67 | EXTERN void send_ping (aConfItem *aconf); 68 | #if defined(ENABLE_SUMMON) || defined(ENABLE_USERS) 69 | EXTERN int utmp_open(void); 70 | EXTERN int utmp_read (int fd, char *name, char *line, char *host, 71 | int hlen); 72 | EXTERN int utmp_close(int fd); 73 | #ifdef ENABLE_SUMMON 74 | EXTERN void summon (aClient *who, char *namebuf, char *linebuf, 75 | char *chname); 76 | #endif /* ENABLE_SUMMON */ 77 | #endif /* ENABLE_SUMMON || ENABLE_USERS */ 78 | #ifdef UNIXPORT 79 | EXTERN int unixport (aClient *cptr, char *path, int port); 80 | #endif 81 | #ifdef DELAY_CLOSE 82 | EXTERN time_t delay_close (int); 83 | #endif 84 | #undef EXTERN 85 | 86 | #ifdef DELAY_CLOSE 87 | #ifndef SHUT_RD 88 | # error SHUT_RD not defined! Report buggy OS to ircd-bugs@irc.org 89 | /* Check shutdown(3) manpage for proper definition. */ 90 | # define SHUT_RD 0 91 | #endif 92 | #endif 93 | -------------------------------------------------------------------------------- /ircd/s_conf_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, ircd/s_conf_ext.h 3 | * Copyright (C) 1997 Alain Nissen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in ircd/s_conf.c. 22 | */ 23 | 24 | /* External definitions for global variables. 25 | */ 26 | #ifndef S_CONF_C 27 | extern aConfItem *conf, *kconf; 28 | #ifdef TKLINE 29 | extern aConfItem *tkconf; 30 | #endif 31 | extern char *networkname; 32 | #endif /* S_CONF_C */ 33 | 34 | /* External definitions for global functions. 35 | */ 36 | #ifndef S_CONF_C 37 | #define EXTERN extern 38 | #else /* S_CONF_C */ 39 | #define EXTERN 40 | #endif /* S_CONF_C */ 41 | EXTERN void det_confs_butmask (aClient *cptr, int mask); 42 | EXTERN int match_ipmask (char *mask, aClient *cptr, 43 | int maskwithusername); 44 | EXTERN int attach_Iline (aClient *cptr, Reg struct hostent *hp, 45 | char *sockhost); 46 | EXTERN aConfItem *count_cnlines (Reg Link *lp); 47 | EXTERN int detach_conf (aClient *cptr, aConfItem *aconf); 48 | EXTERN int attach_conf (aClient *cptr, aConfItem *aconf); 49 | EXTERN aConfItem *find_admin(void); 50 | EXTERN aConfItem *find_me(void); 51 | EXTERN aConfItem *attach_confs (aClient *cptr, char *name, int statmask); 52 | EXTERN aConfItem *attach_confs_host (aClient *cptr, char *host, 53 | int statmask); 54 | EXTERN aConfItem *find_conf_exact (char *name, char *user, char *host, 55 | int statmask); 56 | EXTERN aConfItem *find_Oline (char *name, aClient *cptr); 57 | EXTERN aConfItem *find_conf_name (char *name, int statmask); 58 | EXTERN aConfItem *find_conf (Link *lp, char *name, int statmask); 59 | EXTERN aConfItem *find_conf_host (Reg Link *lp, char *host, 60 | Reg int statmask); 61 | EXTERN aConfItem *find_conf_host_sid (Reg Link *lp, char *host, char *sid, 62 | Reg int statmask); 63 | EXTERN aConfItem *find_conf_ip (Link *lp, char *ip, char *user, 64 | int statmask); 65 | EXTERN aConfItem *find_conf_entry (aConfItem *aconf, u_int mask); 66 | EXTERN int rehash (aClient *cptr, aClient *sptr, int sig); 67 | EXTERN int openconf(void); 68 | EXTERN int initconf (int opt); 69 | EXTERN int find_kill (aClient *cptr, int timedklines, char **comment); 70 | EXTERN int find_two_masks (char *name, char *host, int stat); 71 | EXTERN int find_conf_flags (char *name, char *key, int stat); 72 | EXTERN int find_restrict (aClient *cptr); 73 | EXTERN void find_bounce (aClient *cptr, int class, int fd); 74 | EXTERN aConfItem *find_denied (char *name, int class); 75 | EXTERN char *iline_flags_to_string(long flags); 76 | EXTERN long iline_flags_parse(char *string); 77 | EXTERN char *pline_flags_to_string(long flags); 78 | EXTERN long pline_flags_parse(char *string); 79 | EXTERN char *ipv6_convert (char *orig); 80 | #ifdef TKLINE 81 | EXTERN int m_tkline(aClient *, aClient *, int, char **); 82 | EXTERN int m_untkline(aClient *, aClient *, int, char **); 83 | EXTERN time_t tkline_expire(int); 84 | #endif 85 | #ifdef KLINE 86 | EXTERN int m_kline(aClient *, aClient *, int, char **); 87 | #endif 88 | #undef EXTERN 89 | -------------------------------------------------------------------------------- /ircd/s_debug_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, ircd/s_debug_ext.h 3 | * Copyright (C) 1997 Alain Nissen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in ircd/s_debug.c. 22 | */ 23 | 24 | /* External definitions for global variables. 25 | */ 26 | #ifndef S_DEBUG_C 27 | extern char serveropts[]; 28 | #endif /* S_DEBUG_C */ 29 | 30 | /* External definitions for global functions. 31 | */ 32 | #ifndef S_DEBUG_C 33 | #define EXTERN extern 34 | #else /* S_DEBUG_C */ 35 | #define EXTERN 36 | #endif /* S_DEBUG_C */ 37 | EXTERN void debug (int level, char *form, ...); 38 | EXTERN void send_usage (aClient *cptr, char *nick); 39 | EXTERN void send_defines (aClient *cptr, char *nick, char *); 40 | EXTERN void count_memory (aClient *cptr, char *nick, int debug); 41 | #undef EXTERN 42 | -------------------------------------------------------------------------------- /ircd/s_defines.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, ircd/s_defines.h 3 | * Copyright (C) 1997 Alain Nissen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file includes all files defining constants, macros and types 21 | definitions used by the IRC server. 22 | */ 23 | 24 | #include "config.h" 25 | #include "patchlevel.h" 26 | 27 | #include "common_def.h" 28 | #include "dbuf_def.h" 29 | #include "class_def.h" 30 | #include "struct_def.h" 31 | #include "numeric_def.h" 32 | #include "support_def.h" 33 | #include "channel_def.h" 34 | #include "hash_def.h" 35 | #include "res_def.h" 36 | #include "whowas_def.h" 37 | #include "service_def.h" 38 | #include "sys_def.h" 39 | #include "resolv_def.h" 40 | #include "nameser_def.h" 41 | -------------------------------------------------------------------------------- /ircd/s_err_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, ircd/s_err_ext.h 3 | * Copyright (C) 1997 Alain Nissen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in ircd/s_err.c. 22 | */ 23 | 24 | /* External definitions for global variables. 25 | */ 26 | #ifndef S_ERR_C 27 | extern char *replies[]; 28 | #endif /* S_ERR_C */ 29 | 30 | -------------------------------------------------------------------------------- /ircd/s_externs.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, ircd/s_externs.h 3 | * Copyright (C) 1997 Alain Nissen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file includes all *_ext.h files containing external declarations 21 | * for the IRC server. 22 | */ 23 | 24 | #include "bsd_ext.h" 25 | #include "channel_ext.h" 26 | #include "class_ext.h" 27 | #include "dbuf_ext.h" 28 | #include "hash_ext.h" 29 | #include "ircd_ext.h" 30 | #include "list_ext.h" 31 | #include "match_ext.h" 32 | #include "packet_ext.h" 33 | #include "parse_ext.h" 34 | #include "res_comp_ext.h" 35 | #include "res_ext.h" 36 | #include "res_init_ext.h" 37 | #include "res_mkquery_ext.h" 38 | #include "s_auth_ext.h" 39 | #include "s_bsd_ext.h" 40 | #include "s_conf_ext.h" 41 | #include "s_debug_ext.h" 42 | #include "s_err_ext.h" 43 | #include "s_misc_ext.h" 44 | #include "s_numeric_ext.h" 45 | #include "s_serv_ext.h" 46 | #include "s_service_ext.h" 47 | #include "s_send_ext.h" 48 | #include "s_user_ext.h" 49 | #include "s_zip_ext.h" 50 | #include "s_id_ext.h" 51 | #include "send_ext.h" 52 | #include "support_ext.h" 53 | #include "version_ext.h" 54 | #include "whowas_ext.h" 55 | #include "patricia_ext.h" 56 | -------------------------------------------------------------------------------- /ircd/s_id_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, ircd/s_id_ext.h 3 | * Copyright (C) 1998 Christophe Kalt 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in ircd/s_id.c. 22 | */ 23 | 24 | /* External definitions for global variables. 25 | */ 26 | #ifndef S_ID_C 27 | /* none */ 28 | #endif /* S_ID_C */ 29 | 30 | /* External definitions for global functions. 31 | */ 32 | #ifndef S_ID_C 33 | #define EXTERN extern 34 | #else /* S_ID_C */ 35 | #define EXTERN 36 | #endif /* S_ID_C */ 37 | EXTERN char *get_chid (void); 38 | EXTERN int close_chid (char *); 39 | EXTERN void cache_chid (aChannel *); 40 | EXTERN int check_chid (char *); 41 | EXTERN void collect_chid (void); 42 | 43 | EXTERN void init_sid (char *); 44 | EXTERN char *next_uid (void); 45 | EXTERN int check_uid (char *, char *); 46 | EXTERN char *ltoid (long l, int n); 47 | EXTERN long idtol (char *id, int n); 48 | EXTERN int sid_valid (char *sid); 49 | EXTERN int cid_ok (char *name, int n); 50 | 51 | #undef EXTERN 52 | -------------------------------------------------------------------------------- /ircd/s_misc_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, ircd/s_misc_ext.h 3 | * Copyright (C) 1997 Alain Nissen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in ircd/s_misc.c. 22 | */ 23 | 24 | /* External definitions for global variables. 25 | */ 26 | #ifndef S_MISC_C 27 | extern struct stats ircst, *ircstp; 28 | extern aMotd *motd; 29 | extern time_t motd_mtime; 30 | #endif /* S_MISC_C */ 31 | 32 | /* External definitions for global functions. 33 | */ 34 | #ifndef S_MISC_C 35 | #define EXTERN extern 36 | #else /* S_MISC_C */ 37 | #define EXTERN 38 | #endif /* S_MISC_C */ 39 | EXTERN char *date (time_t clock); 40 | EXTERN int check_registered_user (aClient *sptr); 41 | EXTERN int check_registered (aClient *sptr); 42 | EXTERN int check_registered_service (aClient *sptr); 43 | EXTERN char *get_client_name (aClient *sptr, int showip); 44 | EXTERN char *get_client_host (aClient *cptr); 45 | EXTERN char *get_client_ip (aClient *cptr); 46 | EXTERN void get_sockhost (Reg aClient *cptr, Reg char *host); 47 | EXTERN char *my_name_for_link (char *name, Reg int count); 48 | EXTERN int mark_blind_servers (aClient *cptr, aClient *server); 49 | EXTERN int exit_client (aClient *cptr, aClient *sptr, aClient *from, 50 | const char *comment); 51 | EXTERN void checklist(void); 52 | EXTERN void initstats(void); 53 | EXTERN void initruntimeconf(void); 54 | EXTERN void tstats (aClient *cptr, char *name); 55 | EXTERN void read_motd (char *filename); 56 | EXTERN void check_split(void); 57 | EXTERN int myrand(void); 58 | EXTERN void mysrand(unsigned int seed); 59 | #undef EXTERN 60 | -------------------------------------------------------------------------------- /ircd/s_numeric.c: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, ircd/s_numeric.c 3 | * Copyright (C) 1990 Jarkko Oikarinen 4 | * 5 | * Numerous fixes by Markku Savela 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 1, or (at your option) 10 | * 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., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | */ 21 | 22 | #ifndef lint 23 | static const volatile char rcsid[] = "@(#)$Id: s_numeric.c,v 1.8 2005/01/30 17:56:31 chopin Exp $"; 24 | #endif 25 | 26 | #include "os.h" 27 | #include "s_defines.h" 28 | #define S_NUMERIC_C 29 | #include "s_externs.h" 30 | #undef S_NUMERIC_C 31 | 32 | static char buffer[1024]; 33 | 34 | /* 35 | ** DoNumeric (replacement for the old do_numeric) 36 | ** 37 | ** parc number of arguments ('sender' counted as one!) 38 | ** parv[0] pointer to 'sender' (may point to empty string) (not used) 39 | ** parv[1]..parv[parc-1] 40 | ** pointers to additional parameters, this is a NULL 41 | ** terminated list (parv[parc] == NULL). 42 | ** 43 | ** *WARNING* 44 | ** Numerics are mostly error reports. If there is something 45 | ** wrong with the message, just *DROP* it! Don't even think of 46 | ** sending back a neat error message -- big danger of creating 47 | ** a ping pong error message... 48 | */ 49 | int do_numeric(int numeric, aClient *cptr, aClient *sptr, int parc, 50 | char *parv[]) 51 | { 52 | aClient *acptr = NULL; 53 | aChannel *chptr; 54 | /* 55 | * 2014-04-19 Kurt Roeckx 56 | * * s_numeric.c/do_numeric(): Initialize p to NULL for call to strtoken() 57 | */ 58 | char *nick, *p = NULL; 59 | int i; 60 | 61 | if (parc < 1 || !IsServer(sptr)) 62 | return 1; 63 | /* Remap low number numerics. */ 64 | if (numeric < 100) 65 | numeric += 100; 66 | /* 67 | ** Prepare the parameter portion of the message into 'buffer'. 68 | ** (Because the buffer is twice as large as the message buffer 69 | ** for the socket, no overflow can occur here... ...on current 70 | ** assumptions--bets are off, if these are changed --msa) 71 | ** Note: if buffer is non-empty, it will begin with SPACE. 72 | */ 73 | buffer[0] = '\0'; 74 | if (parc > 1) 75 | { 76 | for (i = 2; i < (parc - 1); i++) 77 | { 78 | (void)strcat(buffer, " "); 79 | (void)strcat(buffer, parv[i]); 80 | } 81 | (void)strcat(buffer, " :"); 82 | (void)strcat(buffer, parv[parc-1]); 83 | } 84 | for (; (nick = strtoken(&p, parv[1], ",")); parv[1] = NULL) 85 | { 86 | acptr = find_target(nick, cptr); 87 | if (acptr) 88 | { 89 | /* 90 | ** Drop to bit bucket if for me... 91 | ** ...one might consider sendto_ops 92 | ** here... --msa 93 | ** And so it was done. -avalon 94 | ** And regretted. Don't do it that way. Make sure 95 | ** it goes only to non-servers. -avalon 96 | ** Check added to make sure servers don't try to loop 97 | ** with numerics which can happen with nick collisions. 98 | ** - Avalon 99 | */ 100 | if (IsMe(acptr) || acptr->from == cptr) 101 | sendto_flag(SCH_NUM, 102 | "From %s for %s: %s %d %s %s.", 103 | get_client_name(cptr, TRUE), 104 | acptr->name, sptr->name, 105 | numeric, nick, buffer); 106 | else if (IsPerson(acptr) || IsServer(acptr) || 107 | IsService(acptr)) 108 | sendto_prefix_one(acptr, sptr,":%s %d %s%s", 109 | parv[0], numeric, nick, buffer); 110 | } 111 | /* any reason why no cptr == acptr->from checks here? -krys */ 112 | /* because these are not used.. -Vesa 113 | else if ((acptr = find_service(nick, (aClient *)NULL))) 114 | sendto_prefix_one(acptr, sptr,":%s %d %s%s", 115 | parv[0], numeric, nick, buffer); 116 | else if ((acptr = find_server(nick, (aClient *)NULL))) 117 | { 118 | if (!IsMe(acptr) && acptr->from != cptr) 119 | sendto_prefix_one(acptr, sptr,":%s %d %s%s", 120 | parv[0], numeric, nick, buffer); 121 | } 122 | ..nuke them */ 123 | else if ((chptr = find_channel(nick, (aChannel *)NULL))) 124 | sendto_channel_butone(cptr,sptr,chptr,":%s %d %s%s", 125 | parv[0], 126 | numeric, chptr->chname, buffer); 127 | } 128 | return 1; 129 | } 130 | 131 | -------------------------------------------------------------------------------- /ircd/s_numeric_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, ircd/s_numeric_ext.h 3 | * Copyright (C) 1997 Alain Nissen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in ircd/s_numeric.c. 22 | */ 23 | 24 | /* External definitions for global functions. 25 | */ 26 | #ifndef S_NUMERIC_C 27 | #define EXTERN extern 28 | #else /* S_NUMERIC_C */ 29 | #define EXTERN 30 | #endif /* S_NUMERIC_C */ 31 | EXTERN int do_numeric (int numeric, aClient *cptr, aClient *sptr, int parc, 32 | char *parv[]); 33 | #undef EXTERN 34 | -------------------------------------------------------------------------------- /ircd/s_send_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, common/send_ext.h 3 | * Copyright (C) 1999 Christophe Kalt 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in ircd/s_send.c. 22 | */ 23 | 24 | /* External definitions for global functions. 25 | */ 26 | #ifndef S_SEND_C 27 | #define EXTERN extern 28 | #else /* S_SEND_C */ 29 | #define EXTERN 30 | #endif /* S_SEND_C */ 31 | 32 | EXTERN void esendto_one(aClient *orig, aClient *dest, char *imsg, char *fmt, 33 | ...); 34 | EXTERN void esendto_serv_butone(aClient *orig, aClient *dest, char *dname, 35 | char *imsg, aClient *one, char *fmt, ...); 36 | EXTERN void esendto_channel_butone(aClient *orig, char *imsg, aClient *one, 37 | aChannel *chptr, char *fmt, ...); 38 | EXTERN void esendto_match_servs(aClient *orig, char *imsg, aChannel *chptr, 39 | char *fmt, ...); 40 | 41 | #undef EXTERN 42 | -------------------------------------------------------------------------------- /ircd/s_serv_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, ircd/s_serv_ext.h 3 | * Copyright (C) 1997 Alain Nissen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in ircd/s_serv.c. 22 | */ 23 | 24 | /* External definitions for global functions. 25 | */ 26 | #ifndef S_SERV_C 27 | #define EXTERN extern 28 | #else /* S_SERV_C */ 29 | #define EXTERN 30 | #endif /* S_SERV_C */ 31 | EXTERN int m_version (aClient *cptr, aClient *sptr, int parc, 32 | char *parv[]); 33 | EXTERN int m_squit (aClient *cptr, aClient *sptr, int parc, char *parv[]); 34 | EXTERN int check_version (aClient *cptr); 35 | EXTERN int m_smask (aClient *cptr, aClient *sptr, int parc, char *parv[]); 36 | EXTERN int m_server (aClient *cptr, aClient *sptr, int parc, 37 | char *parv[]); 38 | EXTERN int m_server_estab (aClient *cptr, char *sid, char *versionbuf); 39 | EXTERN int m_info (aClient *cptr, aClient *sptr, int parc, char *parv[]); 40 | EXTERN int m_links (aClient *cptr, aClient *sptr, int parc, char *parv[]); 41 | EXTERN int m_summon (aClient *cptr, aClient *sptr, int parc, 42 | char *parv[]); 43 | EXTERN int m_stats (aClient *cptr, aClient *sptr, int parc, char *parv[]); 44 | EXTERN int m_users (aClient *cptr, aClient *sptr, int parc, char *parv[]); 45 | EXTERN int m_error (aClient *cptr, aClient *sptr, int parc, char *parv[]); 46 | EXTERN int m_help (aClient *cptr, aClient *sptr, int parc, char *parv[]); 47 | EXTERN int m_lusers (aClient *cptr, aClient *sptr, int parc, 48 | char *parv[]); 49 | EXTERN int m_connect (aClient *cptr, aClient *sptr, int parc, 50 | char *parv[]); 51 | EXTERN int m_wallops (aClient *cptr, aClient *sptr, int parc, 52 | char *parv[]); 53 | EXTERN int m_time (aClient *cptr, aClient *sptr, int parc, char *parv[]); 54 | EXTERN int m_admin (aClient *cptr, aClient *sptr, int parc, char *parv[]); 55 | EXTERN int m_trace (aClient *cptr, aClient *sptr, int parc, char *parv[]); 56 | EXTERN int m_etrace (aClient *cptr, aClient *sptr, int parc, char *parv[]); 57 | #ifdef ENABLE_SIDTRACE 58 | EXTERN int m_sidtrace (aClient *cptr, aClient *sptr, int parc, char *parv[]); 59 | #endif 60 | EXTERN int m_motd (aClient *cptr, aClient *sptr, int parc, char *parv[]); 61 | EXTERN int m_close (aClient *cptr, aClient *sptr, int parc, char *parv[]); 62 | EXTERN int m_eob (aClient *cptr, aClient *sptr, int parc, char *parv[]); 63 | EXTERN int m_eoback (aClient *, aClient *, int, char **); 64 | EXTERN int m_encap (aClient *, aClient *, int, char **); 65 | EXTERN int m_sdie (aClient *, aClient *, int, char **); 66 | EXTERN int m_map (aClient *cptr, aClient *sptr, int parc, char *parv[]); 67 | EXTERN char *find_server_string (int snum); 68 | EXTERN int find_server_num (char *sname); 69 | EXTERN int m_rehash (aClient *cptr, aClient *sptr, int parc, char *parv[]); 70 | EXTERN int m_restart (aClient *cptr, aClient *sptr, int parc, char *parv[]); 71 | EXTERN int m_die (aClient *cptr, aClient *sptr, int parc, char *parv[]); 72 | EXTERN int m_set(aClient *cptr, aClient *sptr, int parc, char *parv[]); 73 | 74 | void add_server_to_tree(aClient *cptr); 75 | void remove_server_from_tree(aClient *cptr); 76 | int check_servername(char *); 77 | EXTERN const char *check_servername_errors[3][2]; 78 | 79 | EXTERN int register_server(aClient *cptr); 80 | EXTERN int unregister_server(aClient *cptr); 81 | #undef EXTERN 82 | -------------------------------------------------------------------------------- /ircd/s_service_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, ircd/s_service_ext.h 3 | * Copyright (C) 1997 Alain Nissen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in ircd/s_service.c. 22 | */ 23 | 24 | /* External definitions for global variables. 25 | */ 26 | #ifndef S_SERVICE_C 27 | extern aService *svctop; 28 | #endif 29 | 30 | /* External definitions for global functions. 31 | */ 32 | #ifndef S_SERVICE_C 33 | #define EXTERN extern 34 | #else /* S_SERVICE_C */ 35 | #define EXTERN 36 | #endif /* S_SERVICE_C */ 37 | EXTERN aService *make_service (aClient *cptr); 38 | EXTERN void free_service (aClient *cptr); 39 | #ifdef USE_SERVICES 40 | EXTERN void check_services_butone (long action, aServer *servp, 41 | aClient *cptr, char *fmt, ...); 42 | EXTERN void check_services_num (aClient *sptr, char *umode); 43 | EXTERN aConfItem *find_conf_service (aClient *cptr, int type, 44 | aConfItem *aconf); 45 | EXTERN int m_servset (aClient *cptr, aClient *sptr, int parc, 46 | char *parv[]); 47 | #endif /* USE_SERVICES */ 48 | EXTERN int m_service (aClient *cptr, aClient *sptr, int parc, 49 | char *parv[]); 50 | EXTERN int m_servlist (aClient *cptr, aClient *sptr, int parc, 51 | char *parv[]); 52 | EXTERN int m_squery (aClient *cptr, aClient *sptr, int parc, 53 | char *parv[]); 54 | #undef EXTERN 55 | -------------------------------------------------------------------------------- /ircd/s_user_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, ircd/s_user_ext.h 3 | * Copyright (C) 1997 Alain Nissen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in ircd/s_user.c. 22 | */ 23 | 24 | /* External definitions for global functions. 25 | */ 26 | #ifndef S_USER_C 27 | #define EXTERN extern 28 | #else /* S_USER_C */ 29 | #define EXTERN 30 | #endif /* S_USER_C */ 31 | EXTERN aClient *next_client (Reg aClient *next, Reg char *ch); 32 | EXTERN int hunt_server (aClient *cptr, aClient *sptr, char *command, 33 | int server, int parc, char *parv[]); 34 | EXTERN int do_nick_name (char *nick, int server); 35 | EXTERN int register_user (aClient *, aClient *, char *, char *); 36 | EXTERN char *canonize (char *buffer); 37 | EXTERN int m_nick (aClient *cptr, aClient *sptr, int parc, char *parv[]); 38 | EXTERN int m_unick (aClient *cptr, aClient *sptr, int parc, char *parv[]); 39 | EXTERN int m_private (aClient *cptr, aClient *sptr, int parc, 40 | char *parv[]); 41 | EXTERN int m_notice (aClient *cptr, aClient *sptr, int parc, 42 | char *parv[]); 43 | EXTERN int m_who (aClient *cptr, aClient *sptr, int parc, char *parv[]); 44 | EXTERN int m_whois (aClient *cptr, aClient *sptr, int parc, char *parv[]); 45 | EXTERN int m_user (aClient *cptr, aClient *sptr, int parc, char *parv[]); 46 | EXTERN int m_post (aClient *cptr, aClient *sptr, int parc, char *parv[]); 47 | EXTERN int m_quit (aClient *cptr, aClient *sptr, int parc, char *parv[]); 48 | EXTERN int m_kill (aClient *cptr, aClient *sptr, int parc, char *parv[]); 49 | EXTERN int m_away (aClient *cptr, aClient *sptr, int parc, char *parv[]); 50 | EXTERN int m_ping (aClient *cptr, aClient *sptr, int parc, char *parv[]); 51 | EXTERN int m_pong (aClient *cptr, aClient *sptr, int parc, char *parv[]); 52 | EXTERN int m_oper (aClient *cptr, aClient *sptr, int parc, char *parv[]); 53 | EXTERN int m_pass (aClient *cptr, aClient *sptr, int parc, char *parv[]); 54 | EXTERN int m_userhost (aClient *cptr, aClient *sptr, int parc, 55 | char *parv[]); 56 | EXTERN int m_ison (aClient *cptr, aClient *sptr, int parc, char *parv[]); 57 | EXTERN int m_umode (aClient *cptr, aClient *sptr, int parc, char *parv[]); 58 | EXTERN void send_umode (aClient *cptr, aClient *sptr, int old, 59 | int sendmask, char *umode_buf); 60 | EXTERN void send_umode_out (aClient *cptr, aClient *sptr, int old); 61 | EXTERN int m_save (aClient *cptr, aClient *sptr, int parc, char *parv[]); 62 | EXTERN int is_allowed(aClient *, long); 63 | EXTERN char *oline_flags_to_string(long); 64 | EXTERN long oline_flags_parse(char *); 65 | EXTERN void send_away(aClient *, aClient *); 66 | #undef EXTERN 67 | -------------------------------------------------------------------------------- /ircd/s_zip_ext.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, ircd/s_zip_ext.h 3 | * Copyright (C) 1997 Alain Nissen 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* This file contains external definitions for global variables and functions 21 | defined in ircd/s_zip.c. 22 | */ 23 | 24 | /* External definitions for global functions. 25 | */ 26 | #ifndef S_ZIP_C 27 | #define EXTERN extern 28 | #else /* S_ZIP_C */ 29 | #define EXTERN 30 | #endif /* S_ZIP_C */ 31 | #ifdef ZIP_LINKS 32 | EXTERN int zip_init (aClient *cptr); 33 | EXTERN void zip_free (aClient *cptr); 34 | EXTERN char *unzip_packet (aClient *cptr, char *buffer, int *length); 35 | EXTERN char *zip_buffer (aClient *cptr, char *buffer, int *length, 36 | int flush); 37 | #endif /* ZIP_LINKS */ 38 | #undef EXTERN 39 | -------------------------------------------------------------------------------- /ircd/service_def.h: -------------------------------------------------------------------------------- 1 | 2 | /* The different things a service can `sniff' */ 3 | 4 | #define SERVICE_WANT_SERVICE 0x00000001 /* other services signing on/off */ 5 | #define SERVICE_WANT_OPER 0x00000002 /* operators, included in _UMODE */ 6 | #define SERVICE_WANT_UMODE 0x00000004 /* user modes, iow + local modes */ 7 | #define SERVICE_WANT_AWAY 0x00000008 /* away isn't propaged anymore.. */ 8 | #define SERVICE_WANT_KILL 0x00000010 /* KILLs */ 9 | #define SERVICE_WANT_NICK 0x00000020 /* all NICKs (new user, change) */ 10 | #define SERVICE_WANT_USER 0x00000040 /* USER signing on */ 11 | #define SERVICE_WANT_QUIT 0x00000080 /* all QUITs (users signing off) */ 12 | #define SERVICE_WANT_SERVER 0x00000100 /* servers signing on */ 13 | #define SERVICE_WANT_WALLOP 0x00000200 /* wallops */ 14 | #define SERVICE_WANT_SQUIT 0x00000400 /* servers signing off */ 15 | #define SERVICE_WANT_RQUIT 0x00000800 /* regular user QUITs (these which 16 | are also sent between servers) */ 17 | #define SERVICE_WANT_MODE 0x00001000 /* channel modes (not +ov) */ 18 | #define SERVICE_WANT_CHANNEL 0x00002000 /* channel creations/destructions */ 19 | #define SERVICE_WANT_VCHANNEL 0x00004000 /* channel joins/parts */ 20 | #define SERVICE_WANT_TOPIC 0x00008000 /* channel topics */ 21 | 22 | #define SERVICE_WANT_ERRORS 0x01000000 /* &ERRORS */ 23 | #define SERVICE_WANT_NOTICES 0x02000000 /* &NOTICES */ 24 | #define SERVICE_WANT_LOCAL 0x04000000 /* &LOCAL */ 25 | #define SERVICE_WANT_NUMERICS 0x08000000 /* &NUMERICS */ 26 | 27 | #define SERVICE_WANT_USERLOG 0x10000000 /* FNAME_USERLOG */ 28 | #define SERVICE_WANT_CONNLOG 0x20000000 /* FNAME_CONNLOG */ 29 | 30 | #define SERVICE_WANT_CLIENTS 0x40000000 /* &CLIENTS */ 31 | 32 | #define SERVICE_WANT_TKLINE 0x00100000 /* service wants to TKLINE */ 33 | #define SERVICE_WANT_KLINE 0x00200000 /* service wants to KLINE */ 34 | 35 | /* masks */ 36 | #define SERVICE_MASK_GLOBAL 0x00007000 /*for these,service must be global*/ 37 | #define SERVICE_MASK_PREFIX 0x00000FFF /* these actions have a prefix */ 38 | #define SERVICE_MASK_ALL 0x7F30FFFF /* all possible actions */ 39 | #define SERVICE_MASK_NUM (SERVICE_WANT_NICK|SERVICE_WANT_USER|\ 40 | SERVICE_WANT_UMODE) 41 | 42 | /* options */ 43 | #define SERVICE_WANT_PREFIX 0x00010000 /* to receive n!u@h instead of n */ 44 | #define SERVICE_WANT_SID 0x00020000 /* use serv token instead of name */ 45 | #define SERVICE_WANT_EXTNICK 0x00040000 /* user extended NICK syntax */ 46 | #define SERVICE_WANT_UID 0x00080000 /* user extended UID syntax */ 47 | 48 | /* A couple example types of services */ 49 | #define SERVICE_ALL SERVICE_MASK_ALL 50 | #define SERVICE_NICK SERVICE_WANT_NICK | \ 51 | SERVICE_WANT_QUIT | \ 52 | SERVICE_WANT_AWAY 53 | #define SERVICE_USERS SERVICE_WANT_NICK | \ 54 | SERVICE_WANT_USER | \ 55 | SERVICE_WANT_QUIT | \ 56 | SERVICE_WANT_AWAY | \ 57 | SERVICE_WANT_UMODE 58 | #define SERVICE_LINKS SERVICE_WANT_SERVER | \ 59 | SERVICE_WANT_SQUIT | \ 60 | SERVICE_WANT_WALLOP 61 | -------------------------------------------------------------------------------- /ircd/sys_def.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | * IRC - Internet Relay Chat, ircd/sys_def.h 3 | * Copyright (C) 1990 University of Oulu, Computing Center 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 1, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 | */ 19 | 20 | /* $Id: sys_def.h,v 1.3 2001/10/20 17:57:30 q Exp $ */ 21 | 22 | #if defined(DEBUGMODE) && !defined(CLIENT_COMPILE) && \ 23 | !defined(CHKCONF_COMPILE) && defined(DO_DEBUG_MALLOC) 24 | # define free(x) MyFree(x) 25 | #else 26 | # define MyFree(x) do { if ((x) != NULL) free(x); (x) = NULL; } while(0) 27 | #endif 28 | 29 | #define SETSOCKOPT(fd, o1, o2, p1, o3) setsockopt(fd, o1, o2, (char *)p1,\ 30 | (SOCK_LEN_TYPE) sizeof(o3)) 31 | 32 | #define GETSOCKOPT(fd, o1, o2, p1, p2) getsockopt(fd, o1, o2, (char *)p1,\ 33 | (SOCK_LEN_TYPE *)p2) 34 | -------------------------------------------------------------------------------- /ircd/version.c.SH.in: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | echo "Building version.c..." 4 | 5 | if test -r version.c 6 | then 7 | generation=`sed -n 's/^char \*generation = \"\(.*\)\";/\1/p' < version.c` 8 | if test ! "$generation" ; then generation=0; fi 9 | else 10 | generation=0 11 | fi 12 | 13 | generation=`expr $generation + 1` 14 | 15 | sumsserv="`(cd ../ircd; @SUM@ s_serv.c)`" 16 | sumsuser="`(cd ../ircd; @SUM@ s_user.c)`" 17 | sumchan="`(cd ../ircd; @SUM@ channel.c)`" 18 | sumsbsd="`(cd ../ircd; @SUM@ s_bsd.c)`" 19 | sumhash="`(cd ../ircd; @SUM@ hash.c)`" 20 | sumsmisc="`(cd ../ircd; @SUM@ s_misc.c)`" 21 | sumircd="`(cd ../ircd; @SUM@ ircd.c)`" 22 | 23 | LC_ALL=C 24 | #creation=`date | \ 25 | creation=`LC_ALL=C date | \ 26 | awk '{if (NF == 6) \ 27 | { print $1 " " $2 " " $3 " " $6 " at " $4 " " $5 } \ 28 | else \ 29 | { print $1 " " $2 " " $3 " " $7 " at " $4 " " $5 " " $6 }}'` 30 | 31 | cat >version.c <&2 "mkdirhier: usage: mkdirhier directory ..."; exit 1 14 | esac 15 | 16 | status= 17 | 18 | for directory 19 | do 20 | case $directory in 21 | '') 22 | echo >&2 "mkdirhier: empty directory name" 23 | status=1 24 | continue;; 25 | *"$newline"*) 26 | echo >&2 "mkdirhier: directory name contains a newline: \`\`$directory''" 27 | status=1 28 | continue;; 29 | ///*) prefix=/;; # See Posix 2.3 "path". 30 | //*) prefix=//;; 31 | /*) prefix=/;; 32 | -*) prefix=./;; 33 | *) prefix= 34 | esac 35 | 36 | IFS=/ 37 | set x $directory 38 | case $2 in 39 | */*) # IFS parsing is broken 40 | IFS=' ' 41 | set x `echo $directory | tr / ' '` 42 | ;; 43 | esac 44 | IFS=$newline 45 | shift 46 | 47 | for filename 48 | do 49 | path=$prefix$filename 50 | prefix=$path/ 51 | shift 52 | 53 | test -d "$path" || { 54 | paths=$path 55 | for filename 56 | do 57 | if [ "$filename" != "." ]; then 58 | path=$path/$filename 59 | paths=$paths$newline$path 60 | fi 61 | done 62 | 63 | mkdir $paths || status=$? 64 | 65 | break 66 | } 67 | done 68 | done 69 | 70 | exit $status 71 | -------------------------------------------------------------------------------- /support/sums.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # trap "" 1 2 3 13 14 15 21 22 3 | # $Id: sums.in,v 1.1 1998/04/07 20:44:48 kalt Exp $ 4 | trap "" 1 2 3 13 14 15 5 | /bin/cp hash.c hash.c.old 2>/dev/null 6 | /bin/mv -f hash.c hash.c.temp 1>/dev/null 2>&1 7 | csum=`(cd ../ircd; @SUM@ s_bsd.c) 2>/dev/null` 8 | sed -e "s/SUSER/[${csum}]/g" hash.c.temp > hash.c 2>/dev/null 9 | /bin/mv -f hash.c hash.c.temp 1>/dev/null 2>&1 10 | csum=`(cd ../ircd; @SUM@ s_user.c) 2>/dev/null` 11 | sed -e "s/SSERV/[${csum}]/g" hash.c.temp > hash.c 2>/dev/null 12 | /bin/mv -f hash.c hash.c.temp 1>/dev/null 2>&1 13 | csum=`(cd ../ircd; @SUM@ s_serv.c) 2>/dev/null` 14 | sed -e "s/SBSDC/[${csum}]/g" hash.c.temp > hash.c 2>/dev/null 15 | /bin/mv -f hash.c hash.c.temp 1>/dev/null 2>&1 16 | csum=`(cd ../ircd; @SUM@ channel.c) 2>/dev/null` 17 | sed -e "s/CHANC/[$csum]/g" hash.c.temp > hash.c 2>/dev/null 18 | /bin/mv -f hash.c hash.c.temp 1>/dev/null 2>&1 19 | csum=`(cd ../ircd; @SUM@ ircd.c) 2>/dev/null` 20 | sed -e "s/IRCDC/[$csum]/g" hash.c.temp > hash.c 2>/dev/null 21 | /bin/mv -f hash.c hash.c.temp 1>/dev/null 2>&1 22 | csum=`(cd ../ircd; @SUM@ s_misc.c) 2>/dev/null` 23 | sed -e "s/SMISC/[$csum]/g" hash.c.temp > hash.c 2>/dev/null 24 | /bin/mv -f hash.c hash.c.temp 1>/dev/null 2>&1 25 | csum=`@SUM@ hash.c.old 2>/dev/null` 26 | sed -e "s/HASHC/[$csum]/g" hash.c.temp > hash.c 2>/dev/null 27 | /bin/mv -f hash.c hash.c.temp 1>/dev/null 2>&1 28 | csum=`@SUM@ version.c.SH 2>/dev/null` 29 | sed -e "s/VERSH/[$csum]/g" hash.c.temp > hash.c 2>/dev/null 30 | /bin/mv -f hash.c hash.c.temp 1>/dev/null 2>&1 31 | csum=`(cd ../ircd; @SUM@ s_bsd.c) 2>/dev/null` 32 | sed -e "s/MAKEF/[$csum]/g" hash.c.temp > hash.c 2>/dev/null 33 | if [ -f /bin/hostid ] ; then 34 | /bin/mv -f hash.c hash.c.temp 1>/dev/null 2>&1 35 | csum=`hostid 2>/dev/null` 36 | sed -e "s/HOSTID/[$csum]/g" hash.c.temp > hash.c 2>/dev/null 37 | fi 38 | /bin/rm -f hash.c.temp 1>/dev/null 2>&1 39 | 40 | --------------------------------------------------------------------------------