X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Fngircd.h;h=2efb8a943fb921e52f6574ff8851b424e43bdbdc;hp=81ef8f469edfc6c79332f94d332b7245823b8dfc;hb=c5da48368569383d064a2325ab3b99d10287a085;hpb=efe152336c7eca274b4f6d3e59963d6fce73577d diff --git a/src/ngircd/ngircd.h b/src/ngircd/ngircd.h index 81ef8f46..2efb8a94 100644 --- a/src/ngircd/ngircd.h +++ b/src/ngircd/ngircd.h @@ -1,77 +1,75 @@ /* * ngIRCd -- The Next Generation IRC Daemon - * Copyright (c)2001,2002 by Alexander Barton (alex@barton.de) + * Copyright (c)2001-2010 Alexander Barton (alex@barton.de). * - * Dieses Programm ist freie Software. Sie koennen es unter den Bedingungen - * der GNU General Public License (GPL), wie von der Free Software Foundation - * herausgegeben, weitergeben und/oder modifizieren, entweder unter Version 2 - * der Lizenz oder (wenn Sie es wuenschen) jeder spaeteren Version. - * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste - * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS. - * - * $Id: ngircd.h,v 1.9 2002/02/17 23:40:32 alex Exp $ - * - * ngircd.h: Prototypen aus dem "Haupt-Modul" - * - * $Log: ngircd.h,v $ - * Revision 1.9 2002/02/17 23:40:32 alex - * - Neue Funktion NGIRCd_VersionAddition(). - * - * Revision 1.8 2002/01/18 11:12:11 alex - * - der Sniffer wird nun nur noch aktiviert, wenn auf Kommandozeile angegeben. - * - * Revision 1.7 2002/01/11 14:45:18 alex - * - Kommandozeilen-Parser implementiert: Debug- und No-Daemon-Modus, Hilfe. - * - * Revision 1.6 2002/01/02 02:44:37 alex - * - neue Defines fuer max. Anzahl Server und Operatoren. - * - * Revision 1.5 2001/12/31 03:06:03 alex - * - das #include fuer time.h hat noch gefehlt. - * - * Revision 1.4 2001/12/31 02:18:51 alex - * - viele neue Befehle (WHOIS, ISON, OPER, DIE, RESTART), - * - neuen Header "defines.h" mit (fast) allen Konstanten. - * - Code Cleanups und viele "kleine" Aenderungen & Bugfixes. - * - * Revision 1.3 2001/12/30 11:42:00 alex - * - der Server meldet nun eine ordentliche "Start-Zeit". - * - * Revision 1.2 2001/12/12 23:30:01 alex - * - NGIRCd_Quit ist nun das globale Flag zum Beenden des ngircd. - * - * Revision 1.1.1.1 2001/12/11 21:53:04 alex - * - Imported sources to CVS. + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * Please read the file COPYING, README and AUTHORS for more information. */ - #ifndef __ngircd_h__ #define __ngircd_h__ +/** + * @file + * Global variables of ngIRCd. + */ + #include +#include "defines.h" + +#define C_ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0])) + +/** UNIX timestamp of ngIRCd start */ +GLOBAL time_t NGIRCd_Start; + +/** ngIRCd start time as string, used for RPL_CREATED_MSG (003) */ +GLOBAL char NGIRCd_StartStr[64]; + +/** ngIRCd version number containing release number and compile-time options */ +GLOBAL char NGIRCd_Version[126]; -GLOBAL time_t NGIRCd_Start; /* Startzeitpunkt des Daemon */ -GLOBAL CHAR NGIRCd_StartStr[64]; +/** String specifying the compile-time options and target platform */ +GLOBAL char NGIRCd_VersionAddition[126]; #ifdef DEBUG -GLOBAL BOOLEAN NGIRCd_Debug; /* Debug-Modus aktivieren */ +/** Flag indicating if debug mode is active (true) or not (false) */ +GLOBAL bool NGIRCd_Debug; #endif #ifdef SNIFFER -GLOBAL BOOLEAN NGIRCd_Sniffer; /* Sniffer aktivieren */ +/** Flag indication if sniffer is active (true) or not (false) */ +GLOBAL bool NGIRCd_Sniffer; #endif -GLOBAL BOOLEAN NGIRCd_NoDaemon; /* nicht im Hintergrund laufen */ +/** + * Flag indicating if NO outgoing connections should be established (true) + * or not (false, the default) + */ +GLOBAL bool NGIRCd_Passive; -GLOBAL BOOLEAN NGIRCd_Quit; /* TRUE: ngIRCd beenden */ -GLOBAL BOOLEAN NGIRCd_Restart; /* TRUE: neu starten */ +/** Flag indicating that ngIRCd has been requested to quit (true) */ +GLOBAL bool NGIRCd_SignalQuit; -GLOBAL CHAR *NGIRCd_Version( VOID ); -GLOBAL CHAR *NGIRCd_VersionAddition( VOID ); +/** Flag indicating that ngIRCd has been requested to restart (true) */ +GLOBAL bool NGIRCd_SignalRestart; +/** + * Debug level for "VERSION" command, see description of numeric RPL_VERSION + * (351) in RFC 2812. ngIRCd sets debuglevel to 1 when the debug mode is + * active, and to 2 if the sniffer is running. + */ +GLOBAL char NGIRCd_DebugLevel[2]; -#endif +/** Full path and file name of current configuration file */ +GLOBAL char NGIRCd_ConfFile[FNAME_LEN]; +/** Protocol and server identification string; see doc/Protocol.txt */ +GLOBAL char NGIRCd_ProtoID[COMMAND_LEN]; + +#endif /* -eof- */