diff options
author | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2014-01-19 14:35:59 +0000 |
---|---|---|
committer | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2014-01-19 14:35:59 +0000 |
commit | aeb0b42a4f92ced807c83364ff4f36712b7b3d89 (patch) | |
tree | 9a3a556fca3f0b4fd7c13e901534d24d129e1dbd /include | |
parent | 5d846a93a54cdd300f1ede4c18b4ff3b70e3df6d (diff) |
- Clean up all files in include/ (fixed indentation, removed whitespaces/tabs)
- Fixed copyright years
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@2866 82007160-df01-0410-b94d-b575c5fd34c7
Diffstat (limited to 'include')
38 files changed, 379 insertions, 328 deletions
diff --git a/include/channel.h b/include/channel.h index 6ac0c1a..f86a544 100644 --- a/include/channel.h +++ b/include/channel.h @@ -1,7 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 1997-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/channel_mode.h b/include/channel_mode.h index 76eb123..7e52759 100644 --- a/include/channel_mode.h +++ b/include/channel_mode.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * channel_mode.h: The ircd channel mode header. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 1997-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,10 +17,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ */ +/*! \file channel_mode.h + * \brief Includes channel mode related definitions and structures. + * \version $Id$ + */ #ifndef INCLUDED_channel_mode_h #define INCLUDED_channel_mode_h diff --git a/include/client.h b/include/client.h index 66274c9..9fce88c 100644 --- a/include/client.h +++ b/include/client.h @@ -1,7 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 1997-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -53,9 +53,9 @@ struct MaskItem; #define REG_NEED_CAP 0x4 #define REG_INIT (REG_NEED_USER|REG_NEED_NICK) -#define HasID(x) ((x)->id[0] != '\0') -#define ID(x) (HasID(x) ? (x)->id : (x)->name) -#define ID_or_name(x,client_p) ((IsCapable(client_p->from, CAP_TS6) && HasID(x)) ? (x)->id : (x)->name) +#define HasID(x) ((x)->id[0] != '\0') +#define ID(x) (HasID(x) ? (x)->id : (x)->name) +#define ID_or_name(x,client_p) ((IsCapable(client_p->from, CAP_TS6) && HasID(x)) ? (x)->id : (x)->name) #define IsRegistered(x) ((x)->status > STAT_UNKNOWN) #define IsConnecting(x) ((x)->status == STAT_CONNECTING) @@ -66,23 +66,23 @@ struct MaskItem; #define IsClient(x) ((x)->status == STAT_CLIENT) #define SetConnecting(x) {(x)->status = STAT_CONNECTING; \ - (x)->handler = UNREGISTERED_HANDLER; } + (x)->handler = UNREGISTERED_HANDLER; } #define SetHandshake(x) {(x)->status = STAT_HANDSHAKE; \ - (x)->handler = UNREGISTERED_HANDLER; } + (x)->handler = UNREGISTERED_HANDLER; } #define SetMe(x) {(x)->status = STAT_ME; \ - (x)->handler = UNREGISTERED_HANDLER; } + (x)->handler = UNREGISTERED_HANDLER; } #define SetUnknown(x) {(x)->status = STAT_UNKNOWN; \ - (x)->handler = UNREGISTERED_HANDLER; } + (x)->handler = UNREGISTERED_HANDLER; } #define SetServer(x) {(x)->status = STAT_SERVER; \ - (x)->handler = SERVER_HANDLER; } + (x)->handler = SERVER_HANDLER; } #define SetClient(x) {(x)->status = STAT_CLIENT; \ - (x)->handler = HasUMode(x, UMODE_OPER) ? \ - OPER_HANDLER : CLIENT_HANDLER; } + (x)->handler = HasUMode(x, UMODE_OPER) ? \ + OPER_HANDLER : CLIENT_HANDLER; } #define MyConnect(x) ((x)->localClient != NULL) #define MyClient(x) (MyConnect(x) && IsClient(x)) @@ -219,25 +219,24 @@ struct MaskItem; #define IsAuthFinished(x) ((x)->flags & FLAGS_FINISHED_AUTH) #define IsDead(x) ((x)->flags & FLAGS_DEADSOCKET) #define SetDead(x) ((x)->flags |= FLAGS_DEADSOCKET) -#define IsClosing(x) ((x)->flags & FLAGS_CLOSING) -#define SetClosing(x) ((x)->flags |= FLAGS_CLOSING) -#define SetCanFlood(x) ((x)->flags |= FLAGS_CANFLOOD) -#define IsCanFlood(x) ((x)->flags & FLAGS_CANFLOOD) -#define IsDefunct(x) ((x)->flags & (FLAGS_DEADSOCKET|FLAGS_CLOSING| \ - FLAGS_KILLED)) +#define IsClosing(x) ((x)->flags & FLAGS_CLOSING) +#define SetClosing(x) ((x)->flags |= FLAGS_CLOSING) +#define SetCanFlood(x) ((x)->flags |= FLAGS_CANFLOOD) +#define IsCanFlood(x) ((x)->flags & FLAGS_CANFLOOD) +#define IsDefunct(x) ((x)->flags & (FLAGS_DEADSOCKET|FLAGS_CLOSING|FLAGS_KILLED)) /* oper flags */ #define MyOper(x) (MyConnect(x) && HasUMode(x, UMODE_OPER)) #define SetOper(x) {(x)->umodes |= UMODE_OPER; \ - if (!IsServer((x))) (x)->handler = OPER_HANDLER;} + if (!IsServer((x))) (x)->handler = OPER_HANDLER;} #define ClearOper(x) {(x)->umodes &= ~(UMODE_OPER|UMODE_ADMIN); \ - if (!HasUMode(x, UMODE_OPER) && !IsServer((x))) \ - (x)->handler = CLIENT_HANDLER; } + if (!HasUMode(x, UMODE_OPER) && !IsServer((x))) \ + (x)->handler = CLIENT_HANDLER; } -#define SetSendQExceeded(x) ((x)->flags |= FLAGS_SENDQEX) -#define IsSendQExceeded(x) ((x)->flags & FLAGS_SENDQEX) +#define SetSendQExceeded(x) ((x)->flags |= FLAGS_SENDQEX) +#define IsSendQExceeded(x) ((x)->flags & FLAGS_SENDQEX) #define SetIpHash(x) ((x)->flags |= FLAGS_IPHASH) #define ClearIpHash(x) ((x)->flags &= ~FLAGS_IPHASH) @@ -247,9 +246,9 @@ struct MaskItem; #define ClearUserHost(x) ((x)->flags &= ~FLAGS_USERHOST) #define IsUserHostIp(x) ((x)->flags & FLAGS_USERHOST) -#define SetPingSent(x) ((x)->flags |= FLAGS_PINGSENT) -#define IsPingSent(x) ((x)->flags & FLAGS_PINGSENT) -#define ClearPingSent(x) ((x)->flags &= ~FLAGS_PINGSENT) +#define SetPingSent(x) ((x)->flags |= FLAGS_PINGSENT) +#define IsPingSent(x) ((x)->flags & FLAGS_PINGSENT) +#define ClearPingSent(x) ((x)->flags &= ~FLAGS_PINGSENT) #define SetNeedId(x) ((x)->flags |= FLAGS_NEEDID) #define IsNeedId(x) ((x)->flags & FLAGS_NEEDID) @@ -415,7 +414,7 @@ struct Client char svid[HOSTLEN + 1]; /**< Services ID. XXX: Going with HOSTLEN for now. NICKLEN might be too small if dealing with timestamps */ char id[IDLEN + 1]; /**< client ID, unique ID per client */ - /* + /* * client->username is the username from ident or the USER message, * If the client is idented the USER message is ignored, otherwise * the username part of the USER message is put here prefixed with a diff --git a/include/conf.h b/include/conf.h index 0397532..b28d640 100644 --- a/include/conf.h +++ b/include/conf.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * conf.h: A header for the configuration functions. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2005 by the past and present ircd coders, and others. + * Copyright (c) 1997-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,8 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ + */ + +/*! \file conf.h + * \brief A header for the configuration functions. + * \version $Id$ */ #ifndef INCLUDED_s_conf_h @@ -88,7 +90,7 @@ #define SetConfDatabase(x) ((x)->flags |= CONF_FLAGS_IN_DATABASE) -/* shared/cluster server entry types +/* shared/cluster server entry types * These defines are used for both shared and cluster. */ #define SHARED_KLINE 0x0001 @@ -376,9 +378,9 @@ extern void conf_add_class_to_conf(struct MaskItem *, const char *); extern const char *get_oper_name(const struct Client *); /* XXX should the parse_aline stuff go into another file ?? */ -#define AWILD 0x1 /* check wild cards */ +#define AWILD 0x1 /* check wild cards */ extern int parse_aline(const char *, struct Client *, int, char **, - int, char **, char **, time_t *, char **, char **); + int, char **, char **, time_t *, char **, char **); extern int valid_comment(struct Client *, char *, int); @@ -395,6 +397,5 @@ extern int match_conf_password(const char *, const struct MaskItem *); #define CLEANUP_TKLINES_TIME 60 -extern void cluster_a_line(struct Client *, - const char *, int, int, const char *,...); +extern void cluster_a_line(struct Client *, const char *, int, int, const char *,...); #endif /* INCLUDED_s_conf_h */ diff --git a/include/conf_class.h b/include/conf_class.h index 6682f9d..282e91a 100644 --- a/include/conf_class.h +++ b/include/conf_class.h @@ -1,7 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 1997-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/include/conf_db.h b/include/conf_db.h index de9d00a..14e1697 100644 --- a/include/conf_db.h +++ b/include/conf_db.h @@ -1,8 +1,8 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 1996-2009 by Andrew Church <achurch@achurch.org> - * Copyright (C) 2012 by the Hybrid Development Team. + * Copyright (c) 1996-2009 by Andrew Church <achurch@achurch.org> + * Copyright (c) 2012-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -30,8 +30,8 @@ struct dbFILE { - char mode; /**< 'r' for reading, 'w' for writing */ - FILE *fp; /**< The file pointer itself */ + char mode; /**< 'r' for reading, 'w' for writing */ + FILE *fp; /**< The file pointer itself */ char filename[HYB_PATH_MAX + 1]; /**< Name of the database file */ char tempname[HYB_PATH_MAX + 1]; /**< Name of the temporary file (for writing) */ }; @@ -41,13 +41,13 @@ extern uint32_t get_file_version(struct dbFILE *); extern int write_file_version(struct dbFILE *, uint32_t); extern struct dbFILE *open_db(const char *, const char *, uint32_t); -extern void restore_db(struct dbFILE *); /* Restore to state before open_db() */ +extern void restore_db(struct dbFILE *); /* Restore to state before open_db() */ extern int close_db(struct dbFILE *); -extern void backup_databases(void); +extern void backup_databases(void); -#define read_db(f,buf,len) (fread((buf),1,(len),(f)->fp)) -#define write_db(f,buf,len) (fwrite((buf),1,(len),(f)->fp)) -#define getc_db(f) (fgetc((f)->fp)) +#define read_db(f,buf,len) (fread((buf),1,(len),(f)->fp)) +#define write_db(f,buf,len) (fwrite((buf),1,(len),(f)->fp)) +#define getc_db(f) (fgetc((f)->fp)) extern int read_uint8(uint8_t *, struct dbFILE *); extern int write_uint8(uint8_t, struct dbFILE *); @@ -74,12 +74,12 @@ extern void load_resv_database(void); extern void save_resv_database(void); extern void save_all_databases(void *); -#define read_buffer(buf,f) (read_db((f),(buf),sizeof(buf)) == sizeof(buf)) -#define write_buffer(buf,f) (write_db((f),(buf),sizeof(buf)) == sizeof(buf)) -#define read_buflen(buf,len,f) (read_db((f),(buf),(len)) == (len)) -#define write_buflen(buf,len,f) (write_db((f),(buf),(len)) == (len)) -#define read_variable(var,f) (read_db((f),&(var),sizeof(var)) == sizeof(var)) -#define write_variable(var,f) (write_db((f),&(var),sizeof(var)) == sizeof(var)) +#define read_buffer(buf,f) (read_db((f),(buf),sizeof(buf)) == sizeof(buf)) +#define write_buffer(buf,f) (write_db((f),(buf),sizeof(buf)) == sizeof(buf)) +#define read_buflen(buf,len,f) (read_db((f),(buf),(len)) == (len)) +#define write_buflen(buf,len,f) (write_db((f),(buf),(len)) == (len)) +#define read_variable(var,f) (read_db((f),&(var),sizeof(var)) == sizeof(var)) +#define write_variable(var,f) (write_db((f),&(var),sizeof(var)) == sizeof(var)) #define DATABASE_UPDATE_TIMEOUT 300 #define KLINE_DB_VERSION 1 diff --git a/include/dbuf.h b/include/dbuf.h index 6c580b9..5745d81 100644 --- a/include/dbuf.h +++ b/include/dbuf.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * dbuf.h: A header for the dynamic buffers functions. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 1997-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,8 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ + */ + +/*! \file dbuf.h + * \brief A header for the dynamic buffers functions. + * \version $Id$ */ #ifndef __DBUF_H_INCLUDED diff --git a/include/defaults.h b/include/defaults.h index 3b3ee15..87eb94f 100644 --- a/include/defaults.h +++ b/include/defaults.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * defaults.h: The ircd defaults header for values and paths. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 1997-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,8 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ + */ + +/*! \file defaults.h + * \brief The ircd defaults header for values and paths. + * \version $Id$ */ #ifndef INCLUDED_defaults_h @@ -28,7 +30,7 @@ /* Here are some default paths. Most except DPATH are * configurable at runtime. */ -/* +/* * Directory paths and filenames for UNIX systems. * PREFIX is set using ./configure --prefix, see INSTALL. * The other defaults should be fine. @@ -48,29 +50,29 @@ */ /* dirs */ -#define DPATH PREFIX -#define SBINPATH PREFIX "/sbin/" -#define BINPATH PREFIX "/bin/" -#define MSGPATH DATADIR "/" PACKAGE "/messages" -#define MODPATH LIBDIR "/" PACKAGE "/modules/" -#define HPATH DATADIR "/" PACKAGE "/help" -#define AUTOMODPATH MODPATH "/autoload/" -#define ETCPATH SYSCONFDIR -#define LOGPATH LOCALSTATEDIR "/log" -#define RUNPATH LOCALSTATEDIR "/run" +#define DPATH PREFIX +#define SBINPATH PREFIX "/sbin/" +#define BINPATH PREFIX "/bin/" +#define MSGPATH DATADIR "/" PACKAGE "/messages" +#define MODPATH LIBDIR "/" PACKAGE "/modules/" +#define HPATH DATADIR "/" PACKAGE "/help" +#define AUTOMODPATH MODPATH "/autoload/" +#define ETCPATH SYSCONFDIR +#define LOGPATH LOCALSTATEDIR "/log" +#define RUNPATH LOCALSTATEDIR "/run" /* files */ -#define SPATH SBINPATH "/ircd" /* ircd executable */ -#define CPATH ETCPATH "/ircd.conf" /* ircd.conf file */ -#define KPATH ETCPATH "/kline.db" /* kline file */ -#define RESVPATH ETCPATH "/resv.db" /* resv file */ -#define DLPATH ETCPATH "/dline.db" /* dline file */ -#define XPATH ETCPATH "/xline.db" /* xline file */ -#define GPATH ETCPATH "/gline.db" /* gline file */ -#define MPATH ETCPATH "/ircd.motd" /* MOTD file */ -#define LPATH LOGPATH "/ircd.log" /* ircd logfile */ -#define PPATH RUNPATH "/ircd.pid" /* pid file */ -#define LIPATH ETCPATH "/links.txt" /* cached links file */ +#define SPATH SBINPATH "/ircd" /* ircd executable */ +#define CPATH ETCPATH "/ircd.conf" /* ircd.conf file */ +#define KPATH ETCPATH "/kline.db" /* kline file */ +#define RESVPATH ETCPATH "/resv.db" /* resv file */ +#define DLPATH ETCPATH "/dline.db" /* dline file */ +#define XPATH ETCPATH "/xline.db" /* xline file */ +#define GPATH ETCPATH "/gline.db" /* gline file */ +#define MPATH ETCPATH "/ircd.motd" /* MOTD file */ +#define LPATH LOGPATH "/ircd.log" /* ircd logfile */ +#define PPATH RUNPATH "/ircd.pid" /* pid file */ +#define LIPATH ETCPATH "/links.txt" /* cached links file */ /* * This file is included to supply default values for things which @@ -78,7 +80,7 @@ */ #define HYBRID_SOMAXCONN 25 -#define MAX_TDKLINE_TIME (24*60*360) +#define MAX_TDKLINE_TIME (24*60*360) /* tests show that about 7 fds are not registered by fdlist.c, these * include std* descriptors + some others (by OpenSSL etc.). Note this is @@ -125,10 +127,9 @@ #define MIN_JOIN_LEAVE_TIME 60 #define MAX_JOIN_LEAVE_COUNT 25 -#define OPER_SPAM_COUNTDOWN 5 +#define OPER_SPAM_COUNTDOWN 5 #define JOIN_LEAVE_COUNT_EXPIRE_TIME 120 #define MIN_SPAM_NUM 5 #define MIN_SPAM_TIME 60 - #endif /* INCLUDED_defaults_h */ diff --git a/include/event.h b/include/event.h index a01c1f1..c989907 100644 --- a/include/event.h +++ b/include/event.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * event.h: The ircd event header. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 2000-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,8 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ + */ + +/*! \file event.h + * \brief The ircd event header. + * \version $Id$ */ #ifndef INCLUDED_event_h @@ -28,9 +30,9 @@ /* * How many event entries we need to allocate at a time in the block - * allocator. 16 should be plenty at a time. + * allocator. */ -#define MAX_EVENTS 50 +#define MAX_EVENTS 50 typedef void EVH(void *); @@ -54,5 +56,4 @@ extern void eventInit(void); extern void eventDelete(EVH *, void *); extern void set_back_events(time_t); extern void show_events(struct Client *); - #endif /* INCLUDED_event_h */ diff --git a/include/fdlist.h b/include/fdlist.h index 3348a4b..4487ca0 100644 --- a/include/fdlist.h +++ b/include/fdlist.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * fdlist.h: The file descriptor list header. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 1997-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,8 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ + */ + +/*! \file fdlist.h + * \brief The file descriptor list header. + * \version $Id$ */ #ifndef INCLUDED_fdlist_h @@ -29,14 +31,15 @@ #include "ircd_defs.h" #define FD_DESC_SZ 128 /* hostlen + comment */ -enum { - COMM_OK, - COMM_ERR_BIND, - COMM_ERR_DNS, - COMM_ERR_TIMEOUT, - COMM_ERR_CONNECT, - COMM_ERROR, - COMM_ERR_MAX +enum +{ + COMM_OK, + COMM_ERR_BIND, + COMM_ERR_DNS, + COMM_ERR_TIMEOUT, + COMM_ERR_CONNECT, + COMM_ERROR, + COMM_ERR_MAX }; struct _fde; @@ -49,14 +52,15 @@ typedef void PF(struct _fde *, void *); /* int fd, int status, void * */ typedef void CNCB(struct _fde *, int, void *); -typedef struct _fde { +typedef struct _fde +{ /* New-school stuff, again pretty much ripped from squid */ /* * Yes, this gives us only one pending read and one pending write per * filedescriptor. Think though: when do you think we'll need more? */ - int fd; /* So we can use the fde_t as a callback ptr */ - int comm_index; /* where in the poll list we live */ + int fd; /* So we can use the fde_t as a callback ptr */ + int comm_index; /* where in the poll list we live */ int evcache; /* current fd events as set up by the underlying I/O */ char desc[FD_DESC_SZ]; PF *read_handler; @@ -70,7 +74,8 @@ typedef struct _fde { void *flush_data; time_t flush_timeout; - struct { + struct + { unsigned int open:1; unsigned int is_socket:1; #ifdef HAVE_LIBCRYPTO @@ -78,7 +83,8 @@ typedef struct _fde { #endif } flags; - struct { + struct + { /* We don't need the host here ? */ struct irc_ssaddr S; struct irc_ssaddr hostaddr; diff --git a/include/hash.h b/include/hash.h index 9398bbc..a7e23fb 100644 --- a/include/hash.h +++ b/include/hash.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * hash.h: A header for the ircd hashtable code. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 1997-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,8 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ + */ + +/*! \file hash.h + * \brief A header for the ircd hashtable code. + * \version $Id$ */ #ifndef INCLUDED_hash_h diff --git a/include/hostmask.h b/include/hostmask.h index 2275c27..d1a23be 100644 --- a/include/hostmask.h +++ b/include/hostmask.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * hostmask.h: A header for the hostmask code. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2005 by the past and present ircd coders, and others. + * Copyright (c) 2001-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,12 +17,15 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ + */ + +/*! \file hostmask.h + * \brief A header for the hostmask code. + * \version $Id$ */ #ifndef INCLUDE_hostmask_h -#define INCLUDE_hostmask_h 1 +#define INCLUDE_hostmask_h #define ATABLE_SIZE 0x1000 diff --git a/include/irc_string.h b/include/irc_string.h index c54541e..8f7f00a 100644 --- a/include/irc_string.h +++ b/include/irc_string.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * irc_string.h: A header for the ircd string functions. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 1999-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,8 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ + */ + +/*! \file irc_string.h + * \brief A header for the ircd string functions. + * \version $Id$ */ #ifndef INCLUDED_irc_string_h @@ -32,9 +34,9 @@ extern int has_wildcards(const char *); extern int match(const char *, const char *); /* - * collapse - collapse a string in place, converts multiple adjacent *'s + * collapse - collapse a string in place, converts multiple adjacent *'s * into a single *. - * collapse - modifies the contents of pattern + * collapse - modifies the contents of pattern */ extern char *collapse(char *); @@ -42,7 +44,7 @@ extern char *collapse(char *); * NOTE: The following functions are NOT the same as strcasecmp * and strncasecmp! These functions use the Finnish (RFC1459) * character set. Do not replace! - * + * * irccmp - case insensitive comparison of s1 and s2 */ extern int irccmp(const char *, const char *); @@ -120,8 +122,8 @@ extern const unsigned int CharAttrs[]; #define IsLower(c) (IsAlpha((c)) && ((unsigned char)(c) > 0x5f)) #define IsUpper(c) (IsAlpha((c)) && ((unsigned char)(c) < 0x60)) #define IsDigit(c) (CharAttrs[(unsigned char)(c)] & DIGIT_C) -#define IsXDigit(c) (IsDigit(c) || ('a' <= (c) && (c) <= 'f') || \ - ('A' <= (c) && (c) <= 'F')) +#define IsXDigit(c) (IsDigit(c) || ('a' <= (c) && (c) <= 'f') || \ + ('A' <= (c) && (c) <= 'F')) #define IsAlNum(c) (CharAttrs[(unsigned char)(c)] & (DIGIT_C | ALPHA_C)) #define IsPrint(c) (CharAttrs[(unsigned char)(c)] & PRINT_C) #define IsAscii(c) ((unsigned char)(c) < 0x80) @@ -131,5 +133,4 @@ extern const unsigned int CharAttrs[]; #define IsNonEOS(c) (CharAttrs[(unsigned char)(c)] & NONEOS_C) #define IsEol(c) (CharAttrs[(unsigned char)(c)] & EOL_C) - #endif /* INCLUDED_irc_string_h */ diff --git a/include/ircd.h b/include/ircd.h index 7d8917b..cfcf4e0 100644 --- a/include/ircd.h +++ b/include/ircd.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * ircd.h: A header for the ircd startup routines. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 1997-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,10 +17,14 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ */ +/*! \file ircd.h + * \brief A header for the ircd startup routines. + * \version $Id$ + */ + + #ifndef INCLUDED_ircd_h #define INCLUDED_ircd_h diff --git a/include/ircd_defs.h b/include/ircd_defs.h index 8668d5b..bf68184 100644 --- a/include/ircd_defs.h +++ b/include/ircd_defs.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * ircd_defs.h: A header for ircd global definitions. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 1997-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,22 +17,21 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ */ -/* - * NOTE: NICKLEN and TOPICLEN do not live here anymore. Set it with configure - * Otherwise there are no user servicable part here. - * +/*! \file ircd_defs.h + * \brief A header for ircd global definitions. + * \version $Id$ */ - /* ircd_defs.h - Global size definitions for record entries used + +/* ircd_defs.h - Global size definitions for record entries used * througout ircd. Please think 3 times before adding anything to this * file. */ #ifndef INCLUDED_ircd_defs_h #define INCLUDED_ircd_defs_h #include "stdinc.h" + /* Right out of the RFC */ #define IRCD_BUFSIZE 512 /* WARNING: *DONT* CHANGE THIS!!!! */ #define HOSTLEN 63 /* Length of hostname. Updated to comply @@ -58,10 +56,10 @@ #define USERHOST_REPLYLEN (NICKLEN+HOSTLEN+USERLEN+5) #define MAX_DATE_STRING 32 /* maximum string length for a date string */ -#define IRCD_MAXNS 3 /* Maximum number of nameservers in +#define IRCD_MAXNS 3 /* Maximum number of nameservers in /etc/resolv.conf we care about */ -#define LOWEST_SAFE_FD 4 /* skip stdin, stdout, stderr, and profiler */ +#define LOWEST_SAFE_FD 4 /* skip stdin, stdout, stderr, and profiler */ /* This is to get around the fact that some implementations have ss_len and * others do not diff --git a/include/ircd_getopt.h b/include/ircd_getopt.h index 3a680ba..958dcba 100644 --- a/include/ircd_getopt.h +++ b/include/ircd_getopt.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * ircd_getopt.h: A header for the getopt() command line option calls. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 2001-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,14 +17,18 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ + */ + +/*! \file ircd_getopt.h + * \brief A header for the getopt() command line option calls. + * \version $Id$ */ #ifndef __GETOPT_H_INCLUDED__ #define __GETOPT_H_INCLUDED__ -struct lgetopt { +struct lgetopt +{ const char *opt; /* name of the argument */ void *argloc; /* where we store the argument to it (-option argument) */ enum { INTEGER, YESNO, STRING, USAGE, ENDEBUG } argtype; diff --git a/include/ircd_signal.h b/include/ircd_signal.h index 3871e98..31884bb 100644 --- a/include/ircd_signal.h +++ b/include/ircd_signal.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * ircd_signal.h: A header for ircd signals. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 1997-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,14 +17,15 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ + */ + +/*! \file ircd_signal.h + * \brief A header for ircd signals. + * \version $Id$ */ #ifndef INCLUDED_ircd_signal_h #define INCLUDED_ircd_signal_h extern void setup_signals(void); - #endif /* INCLUDED_ircd_signal_h */ - diff --git a/include/list.h b/include/list.h index 9101f32..f6e605d 100644 --- a/include/list.h +++ b/include/list.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * list.h: A header for the code in list.c. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 2000-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,8 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ + */ + +/*! \file list.h + * \brief A header for the list manipulation routines. + * \version $Id$ */ #ifndef INCLUDED_list_h @@ -68,6 +70,8 @@ struct _dlink_list unsigned int length; }; +extern void init_dlink_nodes(void); +extern void free_dlink_node(dlink_node *); extern void dlinkAdd(void *, dlink_node *, dlink_list *); extern void dlinkAddBefore(dlink_node *, void *, dlink_node *, dlink_list *); extern void dlinkAddTail(void *, dlink_node *, dlink_list *); @@ -76,8 +80,5 @@ extern void dlinkMoveList(dlink_list *, dlink_list *); extern void dlink_move_node(dlink_node *, dlink_list *, dlink_list *); extern dlink_node *dlinkFind(dlink_list *, void *); extern dlink_node *dlinkFindDelete(dlink_list *, void *); - -extern void init_dlink_nodes(void); -extern void free_dlink_node(dlink_node *); extern dlink_node *make_dlink_node(void); #endif diff --git a/include/listener.h b/include/listener.h index dac40bb..7938cef 100644 --- a/include/listener.h +++ b/include/listener.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * listener.h: A header for the listener code. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 1997-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,8 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ + */ + +/*! \file listener.h + * \brief A header for the listener code. + * \version $Id$ */ #ifndef INCLUDED_listener_h @@ -29,14 +31,14 @@ #define LISTENER_HIDDEN 0x2 #define LISTENER_SERVER 0x4 -#include "ircd_defs.h" +#include "ircd_defs.h" #include "fdlist.h" struct Client; struct Listener { - dlink_node node; /* list node pointer */ + dlink_node node; /* list node pointer */ fde_t fd; /* file descriptor */ int port; /* listener IP port */ int ref_count; /* number of connection references */ diff --git a/include/log.h b/include/log.h index 3d29bd8..b0d32ab 100644 --- a/include/log.h +++ b/include/log.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * log.h: A header for the logger functions. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 1997-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,8 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ + */ + +/*! \file log.h + * \brief A header for the logger functions. + * \version $Id$ */ #ifndef INCLUDED_s_log_h @@ -27,7 +29,8 @@ #define LOG_BUFSIZE 1024 -enum log_type { +enum log_type +{ LOG_TYPE_IRCD, LOG_TYPE_KILL, LOG_TYPE_KLINE, @@ -45,5 +48,4 @@ extern void log_set_file(enum log_type, size_t, const char *); extern void log_del_all(void); extern void log_reopen_all(void); extern void ilog(enum log_type, const char *, ...) AFP(2,3); - #endif /* INCLUDED_s_log_h */ diff --git a/include/memory.h b/include/memory.h index 806c928..e8a3190 100644 --- a/include/memory.h +++ b/include/memory.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * memory.h: A header for the memory functions. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 1997-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,8 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ + */ + +/*! \file memory.h + * \brief A header for the memory functions. + * \version $Id$ */ #ifndef _I_MEMORY_H @@ -28,7 +30,6 @@ #include "ircd_defs.h" extern void outofmemory(void); - extern void *MyMalloc(size_t); extern void *MyRealloc(void *, size_t); extern void MyFree(void *); diff --git a/include/mempool.h b/include/mempool.h index 591c066..3e9c210 100644 --- a/include/mempool.h +++ b/include/mempool.h @@ -55,7 +55,8 @@ extern void mp_pool_garbage_collect(void *); #define MEMPOOL_STATS -struct mp_pool_t { +struct mp_pool_t +{ /** Next pool. A pool is usually linked into the mp_allocated_pools list. */ mp_pool_t *next; diff --git a/include/modules.h b/include/modules.h index 3975b84..0f868ae 100644 --- a/include/modules.h +++ b/include/modules.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * modules.h: A header for the modules functions. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 2000-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,8 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ + */ + +/*! \file modules.h + * \brief A header for the modules functions. + * \version $Id$ */ #ifndef INCLUDED_modules_h diff --git a/include/motd.h b/include/motd.h index e113bc4..7e5a63e 100644 --- a/include/motd.h +++ b/include/motd.h @@ -1,8 +1,8 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2000 Kevin L. Mitchell <klmitch@mit.edu> - * Copyright (C) 2013 by the Hybrid Development Team. + * Copyright (c) 2000 Kevin L. Mitchell <klmitch@mit.edu> + * Copyright (c) 2013-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -32,11 +32,11 @@ struct Client; /** Type of MOTD. */ enum MotdType { - MOTD_UNIVERSAL, /**< MOTD for all users */ - MOTD_HOSTMASK, /**< MOTD selected by hostmask */ - MOTD_IPMASKV4, /**< MOTD selected by IP mask */ - MOTD_IPMASKV6, /**< MOTD selected by IP mask */ - MOTD_CLASS /**< MOTD selected by connection class */ + MOTD_UNIVERSAL, /**< MOTD for all users */ + MOTD_HOSTMASK, /**< MOTD selected by hostmask */ + MOTD_IPMASKV4, /**< MOTD selected by IP mask */ + MOTD_IPMASKV6, /**< MOTD selected by IP mask */ + MOTD_CLASS /**< MOTD selected by connection class */ }; /** Entry for a single Message Of The Day (MOTD). */ @@ -95,5 +95,4 @@ extern void motd_clear(void); /* This is called to report T-lines */ extern void motd_report(struct Client *); extern void motd_memory_count(struct Client *); - #endif diff --git a/include/packet.h b/include/packet.h index 3042561..38261d0 100644 --- a/include/packet.h +++ b/include/packet.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * packet.h: A header for the packet functions. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 1997-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,8 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ + */ + +/*! \file packet.h + * \brief A header for the packet functions. + * \version $Id$ */ #ifndef INCLUDED_packet_h @@ -36,7 +38,7 @@ * the network.. * -- adrian */ -/* MAX_FLOOD is the amount of lines in a 'burst' we allow from a client, +/* MAX_FLOOD is the amount of lines in a 'burst' we allow from a client, * anything beyond MAX_FLOOD is limited to about one line per second. * * MAX_FLOOD_CONN is the amount of lines we allow from a client who has @@ -46,8 +48,7 @@ #define MAX_FLOOD 5 #define MAX_FLOOD_BURST MAX_FLOOD * 8 -PF read_packet; -PF flood_recalc; -void flood_endgrace(struct Client *); - +extern PF read_packet; +extern PF flood_recalc; +extern void flood_endgrace(struct Client *); #endif /* INCLUDED_packet_h */ diff --git a/include/parse.h b/include/parse.h index f0cea14..4f00054 100644 --- a/include/parse.h +++ b/include/parse.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * parse.h: A header for the message parser. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 1997-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,8 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ + */ + +/*! \file parse.h + * \brief A header for the message parser. + * \version $Id$ */ #ifndef INCLUDED_parse_h @@ -110,8 +112,8 @@ typedef enum HandlerType { */ typedef int (*MessageHandler)(struct Client *, struct Client *, int, char *[]); -/* - * Message table structure +/* + * Message table structure */ struct Message { @@ -119,8 +121,8 @@ struct Message unsigned int count; /* number of times command used */ unsigned int rcount; /* number of times command used by server */ unsigned int args_min; /* at least this many args must be passed - * or an error will be sent to the user - * before the m_func is even called + * or an error will be sent to the user + * before the m_func is even called */ unsigned int args_max; /* maximum permitted parameters */ unsigned int flags; /* bit 0 set means that this command is allowed @@ -145,7 +147,7 @@ struct Message * Constants */ #define MFLG_SLOW 0x001 /* Command can be executed roughly - * once per 2 seconds. + * once per 2 seconds. */ #define MAXPARA 15 @@ -160,5 +162,4 @@ extern int m_ignore(struct Client *, struct Client *, int, char *[]); extern int m_not_oper(struct Client *, struct Client *, int, char *[]); extern int m_registered(struct Client *, struct Client *, int, char *[]); extern int m_unregistered(struct Client *, struct Client *, int, char *[]); - #endif /* INCLUDED_parse_h */ diff --git a/include/restart.h b/include/restart.h index 9b79800..5d14e61 100644 --- a/include/restart.h +++ b/include/restart.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * restart.h: A header with restart functions. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 1997-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,8 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ + */ + +/*! \file restart.h + * \brief A header for the restart/die functions. + * \version $Id$ */ #ifndef INCLUDED_restart_h @@ -27,5 +29,4 @@ extern void restart(const char *); extern void server_die(const char *, int); - #endif diff --git a/include/resv.h b/include/resv.h index 0d472b1..a8be635 100644 --- a/include/resv.h +++ b/include/resv.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * resv.h: A header for the RESV functions. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 2001-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,8 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ + */ + +/*! \file resv.h + * \brief A header for the RESV functions. + * \version $Id$ */ #ifndef INCLUDED_resv_h diff --git a/include/rsa.h b/include/rsa.h index 06f7f6e..4e35438 100644 --- a/include/rsa.h +++ b/include/rsa.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * rsa.h: A header for the RSA functions. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 2000-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,9 +17,13 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ */ + +/*! \file rsa.h + * \brief A header for the RSA functions. + * \version $Id$ + */ + #ifndef INCLUDED_rsa_h #define INCLUDED_rsa_h diff --git a/include/s_auth.h b/include/s_auth.h index 4eb024d..dcac37b 100644 --- a/include/s_auth.h +++ b/include/s_auth.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * s_auth.h: A header for the ident functions. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 1997-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,8 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ + */ + +/*! \file s_auth.h + * \brief A header for the ident functions. + * \version $Id$ */ #ifndef INCLUDED_s_auth_h @@ -44,11 +46,11 @@ struct Client; struct AuthRequest { - dlink_node node; /* auth_doing_list */ - int flags; - struct Client* client; /* pointer to client struct for request */ - fde_t fd; /* file descriptor for auth queries */ - time_t timeout; /* time when query expires */ + dlink_node node; /* auth_doing_list */ + int flags; + struct Client *client; /* pointer to client struct for request */ + fde_t fd; /* file descriptor for auth queries */ + time_t timeout; /* time when query expires */ }; extern void auth_init(void); @@ -57,5 +59,4 @@ extern void send_auth_query(struct AuthRequest *); extern void remove_auth_request(struct AuthRequest *); extern void delete_auth(struct AuthRequest *); extern void release_auth_client(struct AuthRequest *); - #endif /* INCLUDED_s_auth_h */ diff --git a/include/s_bsd.h b/include/s_bsd.h index e6326a3..38fbe63 100644 --- a/include/s_bsd.h +++ b/include/s_bsd.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * s_bsd.h: A header for the network subsystem. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 1997-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,19 +17,22 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ + */ + +/*! \file s_bsd.h + * \brief A header for the network subsystem. + * \version $Id$ */ #ifndef INCLUDED_s_bsd_h #define INCLUDED_s_bsd_h -#include "config.h" +#include "config.h" #include "fdlist.h" /* Type of IO */ -#define COMM_SELECT_READ 1 -#define COMM_SELECT_WRITE 2 +#define COMM_SELECT_READ 1 +#define COMM_SELECT_WRITE 2 /* How long can comm_select() wait for network events [milliseconds] */ #define SELECT_DELAY 500 @@ -49,11 +51,11 @@ extern int ignoreErrno(int); extern void comm_settimeout(fde_t *, time_t, PF *, void *); extern void comm_setflush(fde_t *, time_t, PF *, void *); extern void comm_checktimeouts(void *); -extern void comm_connect_tcp(fde_t *, const char *, u_short, - struct sockaddr *, int, CNCB *, void *, int, int); -extern const char * comm_errstr(int status); +extern void comm_connect_tcp(fde_t *, const char *, unsigned short, + struct sockaddr *, int, CNCB *, void *, int, int); +extern const char *comm_errstr(int status); extern int comm_open(fde_t *F, int family, int sock_type, int proto, - const char *note); + const char *note); extern int comm_accept(struct Listener *, struct irc_ssaddr *pn); /* These must be defined in the network IO loop code of your choice */ @@ -65,5 +67,4 @@ extern void check_can_use_v6(void); #ifdef IPV6 extern void remove_ipv6_mapping(struct irc_ssaddr *); #endif - #endif /* INCLUDED_s_bsd_h */ diff --git a/include/s_gline.h b/include/s_gline.h index 677d7b2..f145fa9 100644 --- a/include/s_gline.h +++ b/include/s_gline.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * s_gline.h: A header for the gline functions. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 1997-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,8 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ + */ + +/*! \file s_gline.h + * \brief A header for the gline functions. + * \version $Id$ */ #ifndef INCLUDED_s_gline_h @@ -41,7 +43,8 @@ struct gline_pending { dlink_node node; - struct { + struct + { char oper_nick[NICKLEN + 1]; char oper_user[USERLEN + 1]; char oper_host[HOSTLEN + 1]; diff --git a/include/s_misc.h b/include/s_misc.h index c44344f..53b9f1e 100644 --- a/include/s_misc.h +++ b/include/s_misc.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * s_misc.h: A header for the miscellaneous functions. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 1997-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,8 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ + */ + +/*! \file s_misc.h + * \brief A header for the miscellaneous functions. + * \version $Id$ */ #ifndef INCLUDED_s_misc_h @@ -32,7 +34,6 @@ extern const char *ssl_get_cipher(const SSL *); #endif /* Just blindly define our own MIN/MAX macro */ - #define IRCD_MAX(a, b) ((a) > (b) ? (a) : (b)) #define IRCD_MIN(a, b) ((a) < (b) ? (a) : (b)) @@ -43,5 +44,5 @@ extern const char *ssl_get_cipher(const SSL *); (((x) > _1MEG) ? "Megabytes" : "Kilobytes"))) #define _GMKv(x) (((x) > _1TER) ? (float)((x)/_1TER) : (((x) > _1GIG) ? \ (float)((x)/_1GIG) : (((x) > _1MEG) ? (float)((x)/_1MEG) : \ - (float)(x)))) + (float)(x)))) #endif diff --git a/include/s_serv.h b/include/s_serv.h index 4a4f66e..00cd972 100644 --- a/include/s_serv.h +++ b/include/s_serv.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * s_serv.h: A header for the server functions. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 1997-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,8 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ + */ + +/*! \file s_serv.h + * \brief A header for the server functions. + * \version $Id$ */ #ifndef INCLUDED_serv_h @@ -31,7 +33,7 @@ struct MaskItem; /* * number of seconds to wait after server starts up, before * starting try_connections() - * TOO SOON and you can nick collide like crazy. + * TOO SOON and you can nick collide like crazy. */ #define STARTUP_CONNECTIONS_TIME 60 @@ -76,7 +78,7 @@ struct Capability /* - * return values for hunt_server() + * return values for hunt_server() */ #define HUNTED_NOSUCH (-1) /* if the hunted server is not found */ #define HUNTED_ISME 0 /* if this server should execute the command */ diff --git a/include/s_user.h b/include/s_user.h index 77e5949..732da48 100644 --- a/include/s_user.h +++ b/include/s_user.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * s_user.h: A header for the user functions. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 1997-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,8 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ + */ + +/*! \file s_user.h + * \brief A header for the user functions. + * \version $Id$ */ #ifndef INCLUDED_s_user_h @@ -56,5 +58,4 @@ extern void delete_isupport(const char *); extern void init_isupport(void); extern void rebuild_isupport_message_line(void); extern void user_set_hostmask(struct Client *, const char *, const int); - #endif diff --git a/include/send.h b/include/send.h index 3fb88c3..fdb98ad 100644 --- a/include/send.h +++ b/include/send.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * send.h: A header for the message sending functions. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 1997-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,8 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ + */ + +/*! \file send.h + * \brief A header for the message sending functions. + * \version $Id$ */ #ifndef INCLUDED_send_h @@ -75,7 +77,7 @@ extern void sendto_channel_remote(struct Client *, struct Client *, unsigned int extern void sendto_server(struct Client *, const unsigned int, const unsigned int, const char *, ...) AFP(4,5); -extern void sendto_match_butone(struct Client *, struct Client *, +extern void sendto_match_butone(struct Client *, struct Client *, char *, int, const char *, ...) AFP(5,6); extern void sendto_match_servs(struct Client *, const char *, unsigned int, const char *, ...) AFP(4,5); @@ -85,7 +87,7 @@ extern void sendto_wallops_flags(unsigned int, struct Client *, const char *, ...) AFP(3,4); extern void ts_warn(const char *, ...) AFP(1,2); -extern void sendto_anywhere(struct Client *, struct Client *, +extern void sendto_anywhere(struct Client *, struct Client *, const char *, const char *, ...) AFP(4,5); extern void kill_client(struct Client *, struct Client *, diff --git a/include/userhost.h b/include/userhost.h index 40d5607..2e3f155 100644 --- a/include/userhost.h +++ b/include/userhost.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * userhost.h: A header for global user limits. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 2003-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,8 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ + */ + +/*! \file userhost.h + * \brief A header for global user limits. + * \version $Id$ */ #ifndef INCLUDED_userhost_h @@ -27,21 +29,21 @@ struct NameHost { - dlink_node node; /* point to other names on this hostname */ + dlink_node node; /* Point to other names on this hostname */ char name[USERLEN + 1]; - unsigned int icount; /* number of =local= identd on this name*/ - unsigned int gcount; /* global user count on this name */ - unsigned int lcount; /* local user count on this name */ + unsigned int icount; /* Number of =local= identd on this name*/ + unsigned int gcount; /* Global user count on this name */ + unsigned int lcount; /* Local user count on this name */ }; struct UserHost { - dlink_list list; /* list of names on this hostname */ + dlink_list list; /* List of names on this hostname */ struct UserHost *next; char host[HOSTLEN + 1]; }; extern void count_user_host(const char *, const char *, unsigned int *, unsigned int *, unsigned int *); extern void add_user_host(const char *, const char *, int); -extern void delete_user_host(const char *, const char *, int global); +extern void delete_user_host(const char *, const char *, int); #endif /* INCLUDED_userhost_h */ diff --git a/include/whowas.h b/include/whowas.h index af19196..9f20717 100644 --- a/include/whowas.h +++ b/include/whowas.h @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * whowas.h: Header for the whowas functions. + * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) * - * Copyright (C) 2002 by the past and present ircd coders, and others. + * Copyright (c) 1997-2014 ircd-hybrid development team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,8 +17,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * - * $Id$ + */ + +/*! \file whowas.h + * \brief A header for the whowas functions. + * \version $Id$ */ #ifndef INCLUDED_whowas_h |