mirror of
https://github.com/matrix-construct/construct
synced 2024-10-31 02:48:58 +01:00
61b517ca3c
* To benefit from the precompiled-header (PCH) it MUST provide "the first C token." Advantages: Never worry about the include stack again. Remember, this means one less thing for random module developers, community people learning C++, and new developers to deal with. It should reduce the learning curve and barrier for participation. Disadvantages: Makes overall compilation a bit slower, especially without any additional work to improve it again. There are several opportunities, places where the PCH is probably being ignored, etc that can be addressed.
115 lines
3.1 KiB
C++
115 lines
3.1 KiB
C++
/*
|
|
* ircd-ratbox: A slightly useful ircd.
|
|
* ircd.h: A header for the ircd startup routines.
|
|
*
|
|
* Copyright (C) 1990 Jarkko Oikarinen and University of Oulu, Co Center
|
|
* Copyright (C) 1996-2002 Hybrid Development Team
|
|
* Copyright (C) 2002-2004 ircd-ratbox 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
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
* USA
|
|
*/
|
|
|
|
#pragma once
|
|
#define HAVE_IRCD_H
|
|
|
|
#if defined(PIC) && defined(PCH)
|
|
#include "stdinc.pic.h"
|
|
#else
|
|
#include "stdinc.h"
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
namespace ircd {
|
|
|
|
struct Client;
|
|
|
|
struct SetOptions
|
|
{
|
|
int maxclients; /* max clients allowed */
|
|
int autoconn; /* autoconn enabled for all servers? */
|
|
|
|
int floodcount; /* Number of messages in 1 second */
|
|
int ident_timeout; /* timeout for identd lookups */
|
|
|
|
int spam_num;
|
|
int spam_time;
|
|
|
|
char operstring[REALLEN];
|
|
char adminstring[REALLEN];
|
|
};
|
|
|
|
struct Counter
|
|
{
|
|
int oper; /* Opers */
|
|
int total; /* total clients */
|
|
int invisi; /* invisible clients */
|
|
int max_loc; /* MAX local clients */
|
|
int max_tot; /* MAX global clients */
|
|
unsigned long totalrestartcount; /* Total client count ever */
|
|
};
|
|
|
|
extern struct SetOptions GlobalSetOptions; /* defined in ircd.c */
|
|
|
|
extern const char *creation;
|
|
extern const char *generation;
|
|
extern const char *infotext[];
|
|
extern const char *serno;
|
|
extern const time_t datecode;
|
|
extern const char *ircd_version;
|
|
extern const char *logFileName;
|
|
extern const char *pidFileName;
|
|
extern volatile sig_atomic_t dorehash;
|
|
extern volatile sig_atomic_t dorehashbans;
|
|
extern volatile sig_atomic_t doremotd;
|
|
extern bool kline_queued;
|
|
extern bool server_state_foreground;
|
|
extern bool opers_see_all_users; /* sno_farconnect.so loaded, operspy without
|
|
accountability, etc */
|
|
|
|
extern struct Client me;
|
|
extern rb_dlink_list global_client_list;
|
|
extern struct Client *local[];
|
|
extern struct Counter Count;
|
|
extern int default_server_capabs;
|
|
|
|
extern time_t startup_time;
|
|
|
|
extern int splitmode;
|
|
extern int splitchecking;
|
|
extern int split_users;
|
|
extern int split_servers;
|
|
extern int eob_count;
|
|
|
|
extern rb_dlink_list unknown_list;
|
|
extern rb_dlink_list lclient_list;
|
|
extern rb_dlink_list serv_list;
|
|
extern rb_dlink_list global_serv_list;
|
|
extern rb_dlink_list local_oper_list;
|
|
extern rb_dlink_list oper_list;
|
|
extern rb_dlink_list dead_list;
|
|
|
|
extern int testing_conf;
|
|
|
|
extern struct ev_entry *check_splitmode_ev;
|
|
|
|
extern bool ircd_ssl_ok;
|
|
extern bool ircd_zlib_ok;
|
|
extern int maxconnections;
|
|
|
|
void ircd_shutdown(const char *reason) __attribute__((noreturn));
|
|
|
|
} // namespace ircd
|
|
#endif // __cplusplus
|