2007-01-25 07:40:21 +01:00
|
|
|
/*
|
|
|
|
* ircd-ratbox: A slightly useful ircd.
|
|
|
|
* stdinc.h: Pull in all of the necessary system headers
|
|
|
|
*
|
|
|
|
* Copyright (C) 2002 Aaron Sethman <androsyn@ratbox.org>
|
|
|
|
*
|
|
|
|
* 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
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2016-08-13 04:41:59 +02:00
|
|
|
#if defined(PIC) && defined(PCH)
|
|
|
|
#include <rb/rb.pic.h>
|
|
|
|
#else
|
2016-07-01 05:04:00 +02:00
|
|
|
#include <rb/rb.h>
|
2016-08-13 04:41:59 +02:00
|
|
|
#endif
|
|
|
|
|
2016-09-10 21:57:33 +02:00
|
|
|
// TODO: move
|
|
|
|
// Allow a reference to an ios to be passed to ircd
|
|
|
|
#ifdef __cplusplus
|
|
|
|
namespace boost {
|
|
|
|
namespace asio {
|
|
|
|
|
|
|
|
struct io_service;
|
|
|
|
|
|
|
|
} // namespace asio
|
|
|
|
} // namespace boost
|
|
|
|
#endif // __cplusplus
|
|
|
|
|
2016-08-16 01:18:14 +02:00
|
|
|
namespace ircd
|
|
|
|
{
|
2016-10-23 03:18:02 +02:00
|
|
|
using std::nullptr_t;
|
2016-08-16 01:18:14 +02:00
|
|
|
using std::begin;
|
|
|
|
using std::end;
|
|
|
|
using std::get;
|
2016-09-19 07:22:22 +02:00
|
|
|
using std::chrono::seconds;
|
|
|
|
using std::chrono::milliseconds;
|
|
|
|
using std::chrono::microseconds;
|
2016-09-26 00:46:54 +02:00
|
|
|
using std::chrono::duration_cast;
|
MAPI IV. This iteration leverages the C++11 standardized RTTI.
* Simplifies the export declarations for module developers. While
MAPI III utilized a flexible key-value vector to eliminate positional
arguments in a header initializer, now the developer simply makes
a list of pointers to what they want to export for injection into
IRCd. Example:
mapi::header IRCD_MODULE
{
"mymod",
"My module adds a command, a hook, and a CLICAP",
&my_cmdtab,
&some_hook,
&clicaptab
};
* Distributes the handlers for items passed to the above vector.
Anyone can add a type-handler to the module system from anywhere in IRCd
(and other modules?) When your type is encountered a handler is called
providing the symbol name to read out of the module. Example in parser.cc:
mods::add_loader<Message>([]
(mod &loading, const std::string &symbol)
{
auto &msg(get<Message>(loading, symbol));
add_command(msg.name, msg);
});
2016-08-29 21:09:59 +02:00
|
|
|
using ostream = std::ostream;
|
2016-09-05 17:53:36 +02:00
|
|
|
namespace ph = std::placeholders;
|
MAPI IV. This iteration leverages the C++11 standardized RTTI.
* Simplifies the export declarations for module developers. While
MAPI III utilized a flexible key-value vector to eliminate positional
arguments in a header initializer, now the developer simply makes
a list of pointers to what they want to export for injection into
IRCd. Example:
mapi::header IRCD_MODULE
{
"mymod",
"My module adds a command, a hook, and a CLICAP",
&my_cmdtab,
&some_hook,
&clicaptab
};
* Distributes the handlers for items passed to the above vector.
Anyone can add a type-handler to the module system from anywhere in IRCd
(and other modules?) When your type is encountered a handler is called
providing the symbol name to read out of the module. Example in parser.cc:
mods::add_loader<Message>([]
(mod &loading, const std::string &symbol)
{
auto &msg(get<Message>(loading, symbol));
add_command(msg.name, msg);
});
2016-08-29 21:09:59 +02:00
|
|
|
using namespace std::string_literals;
|
2016-09-07 23:39:41 +02:00
|
|
|
using namespace std::literals::chrono_literals;
|
2016-08-16 01:18:14 +02:00
|
|
|
}
|
|
|
|
|
2016-08-23 04:33:36 +02:00
|
|
|
// Temp fwd decl scaffold
|
|
|
|
namespace ircd
|
|
|
|
{
|
2016-09-10 21:57:33 +02:00
|
|
|
extern boost::asio::io_service *ios;
|
|
|
|
|
2016-09-11 08:05:38 +02:00
|
|
|
struct client;
|
2016-08-23 04:33:36 +02:00
|
|
|
|
|
|
|
namespace chan
|
|
|
|
{
|
|
|
|
struct chan;
|
|
|
|
struct membership;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct ConfItem;
|
|
|
|
struct Blacklist;
|
|
|
|
struct server_conf;
|
|
|
|
}
|
|
|
|
|
2016-08-13 00:21:10 +02:00
|
|
|
#include "util.h"
|
2016-09-11 02:20:11 +02:00
|
|
|
#include "util_timer.h"
|
2016-09-13 21:39:13 +02:00
|
|
|
#include "life_guard.h"
|
2016-07-24 22:21:34 +02:00
|
|
|
#include "defaults.h"
|
2016-08-15 04:44:16 +02:00
|
|
|
#include "exception.h"
|
2016-08-20 09:06:12 +02:00
|
|
|
#include "numeric.h"
|
2016-09-08 19:49:45 +02:00
|
|
|
#include "color.h"
|
2016-08-20 09:06:12 +02:00
|
|
|
#include "messages.h"
|
2016-09-28 23:15:44 +02:00
|
|
|
#include "protocol.h"
|
2016-08-16 11:12:01 +02:00
|
|
|
#include "rfc1459.h"
|
2016-09-17 04:48:25 +02:00
|
|
|
#include "fmt.h"
|
2016-08-20 09:06:12 +02:00
|
|
|
#include "err.h"
|
2016-09-28 02:24:31 +02:00
|
|
|
#include "path.h"
|
2016-08-15 04:44:16 +02:00
|
|
|
#include "s_assert.h"
|
2016-08-19 07:58:17 +02:00
|
|
|
#include "match.h"
|
2016-08-26 09:23:03 +02:00
|
|
|
#include "mode_table.h"
|
2016-08-27 05:20:53 +02:00
|
|
|
#include "mode_lease.h"
|
2016-08-26 13:50:12 +02:00
|
|
|
#include "snomask.h"
|
2016-09-05 17:53:36 +02:00
|
|
|
#include "ctx.h"
|
2016-09-23 01:59:22 +02:00
|
|
|
#include "hook.h"
|
2016-09-08 23:24:33 +02:00
|
|
|
#include "line.h"
|
2016-09-09 20:07:17 +02:00
|
|
|
#include "tape.h"
|
2016-09-10 22:50:52 +02:00
|
|
|
#include "cmds.h"
|
2016-09-13 03:21:24 +02:00
|
|
|
#include "vm.h"
|
2016-09-25 03:25:57 +02:00
|
|
|
#include "logger.h"
|
|
|
|
#include "db.h"
|
2016-10-11 06:28:16 +02:00
|
|
|
#include "js.h"
|
2016-08-22 03:57:43 +02:00
|
|
|
|
2016-09-11 08:05:38 +02:00
|
|
|
#include "u_id.h"
|
|
|
|
|
|
|
|
#include "client.h"
|
2016-08-17 05:01:20 +02:00
|
|
|
|
2016-09-01 17:50:48 +02:00
|
|
|
#include "newconf.h"
|
|
|
|
#include "conf.h"
|
|
|
|
|
2016-09-11 08:05:38 +02:00
|
|
|
#include "modules.h"
|
|
|
|
|
|
|
|
#include "info.h"
|
|
|
|
#include "stringops.h"
|
|
|
|
|
|
|
|
/*
|
|
|
|
#include "cache.h"
|
|
|
|
#include "whowas.h"
|
|
|
|
#include "tgchange.h"
|
|
|
|
|
|
|
|
#include "mask.h"
|
|
|
|
#include "chmode.h"
|
|
|
|
#include "channel.h"
|
|
|
|
|
2016-08-15 04:44:16 +02:00
|
|
|
#include "capability.h"
|
|
|
|
#include "certfp.h"
|
|
|
|
#include "class.h"
|
|
|
|
#include "hash.h"
|
|
|
|
#include "hook.h"
|
|
|
|
#include "monitor.h"
|
|
|
|
#include "ratelimit.h"
|
|
|
|
#include "reject.h"
|
|
|
|
#include "send.h"
|
|
|
|
#include "s_newconf.h"
|
|
|
|
#include "s_serv.h"
|
|
|
|
#include "s_stats.h"
|
|
|
|
#include "substitution.h"
|
|
|
|
#include "supported.h"
|
|
|
|
#include "s_user.h"
|
2016-09-11 08:05:38 +02:00
|
|
|
*/
|