0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2025-01-13 16:33:53 +01:00

ircd: Insert into ircd:: namespace.

This commit is contained in:
Jason Volk 2016-08-12 20:05:54 -07:00
parent fa31c9c4cc
commit a71a4551ae
267 changed files with 1029 additions and 277 deletions

View file

@ -25,6 +25,8 @@
#define MAXPARA 10 #define MAXPARA 10
using namespace ircd::defaults;
static void error_cb(rb_helper *helper) __attribute__((noreturn)); static void error_cb(rb_helper *helper) __attribute__((noreturn));
static void handle_reload(int parc, char *parv[]); static void handle_reload(int parc, char *parv[]);
static void handle_stat(int parc, char *parv[]); static void handle_stat(int parc, char *parv[]);

View file

@ -23,6 +23,8 @@
#include "notice.h" #include "notice.h"
#include "res.h" #include "res.h"
using namespace ircd::defaults;
static void handle_lookup_ip_reply(void *data, struct DNSReply *reply); static void handle_lookup_ip_reply(void *data, struct DNSReply *reply);
static void handle_lookup_hostname_reply(void *data, struct DNSReply *reply); static void handle_lookup_hostname_reply(void *data, struct DNSReply *reply);

View file

@ -21,6 +21,9 @@
#include "authd.h" #include "authd.h"
#include "notice.h" #include "notice.h"
using namespace ircd::defaults;
/* Send a notice to a client */ /* Send a notice to a client */
void void
notice_client(uint32_t cid, const char *fmt, ...) notice_client(uint32_t cid, const char *fmt, ...)

View file

@ -46,11 +46,12 @@
* --Elizafox, 9 March 2016 * --Elizafox, 9 March 2016
*/ */
#include <ircd/stdinc.h>
#include "authd.h" #include "authd.h"
#include "provider.h" #include "provider.h"
#include "notice.h" #include "notice.h"
using namespace ircd::defaults;
static EVH provider_timeout_event; static EVH provider_timeout_event;
rb_dictionary *auth_clients; rb_dictionary *auth_clients;

View file

@ -21,7 +21,6 @@
#ifndef __CHARYBDIS_AUTHD_PROVIDER_H__ #ifndef __CHARYBDIS_AUTHD_PROVIDER_H__
#define __CHARYBDIS_AUTHD_PROVIDER_H__ #define __CHARYBDIS_AUTHD_PROVIDER_H__
#include <ircd/stdinc.h>
#include "authd.h" #include "authd.h"
#define MAX_PROVIDERS 32 /* This should be enough */ #define MAX_PROVIDERS 32 /* This should be enough */
@ -53,8 +52,8 @@ struct auth_client
uint16_t c_port; /* Client port */ uint16_t c_port; /* Client port */
struct rb_sockaddr_storage c_addr; /* Client address/port */ struct rb_sockaddr_storage c_addr; /* Client address/port */
char hostname[HOSTLEN + 1]; /* Used for DNS lookup */ char hostname[ircd::HOSTLEN + 1]; /* Used for DNS lookup */
char username[USERLEN + 1]; /* Used for ident lookup */ char username[ircd::USERLEN + 1]; /* Used for ident lookup */
bool providers_starting; /* Providers are still warming up */ bool providers_starting; /* Providers are still warming up */
bool providers_cancelled; /* Providers are being cancelled */ bool providers_cancelled; /* Providers are being cancelled */

View file

@ -42,6 +42,8 @@
#include "notice.h" #include "notice.h"
#include "dns.h" #include "dns.h"
using namespace ircd::defaults;
#define SELF_PID (blacklist_provider.id) #define SELF_PID (blacklist_provider.id)
typedef enum filter_t typedef enum filter_t

View file

@ -24,13 +24,13 @@
* --Elizafox 13 March 2016 * --Elizafox 13 March 2016
*/ */
#include <ircd/stdinc.h>
#include <ircd/match.h>
#include "authd.h" #include "authd.h"
#include "notice.h" #include "notice.h"
#include "provider.h" #include "provider.h"
#include "res.h" #include "res.h"
using namespace ircd::defaults;
#define SELF_PID (ident_provider.id) #define SELF_PID (ident_provider.id)
#define IDENT_BUFSIZE 128 #define IDENT_BUFSIZE 128

View file

@ -18,11 +18,12 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <ircd/stdinc.h>
#include "authd.h" #include "authd.h"
#include "notice.h" #include "notice.h"
#include "provider.h" #include "provider.h"
using namespace ircd::defaults;
#define SELF_PID (opm_provider.id) #define SELF_PID (opm_provider.id)
#define OPM_READSIZE 128 #define OPM_READSIZE 128

View file

@ -18,13 +18,14 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <ircd/stdinc.h>
#include "authd.h" #include "authd.h"
#include "provider.h" #include "provider.h"
#include "notice.h" #include "notice.h"
#include "res.h" #include "res.h"
#include "dns.h" #include "dns.h"
using namespace ircd::defaults;
#define SELF_PID (rdns_provider.id) #define SELF_PID (rdns_provider.id)
struct user_query struct user_query

View file

@ -27,11 +27,11 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <rb/rb.h>
#include <ircd/stdinc.h>
#include "rsdb.h" #include "rsdb.h"
#include <ircd/defaults.h> using namespace ircd::defaults;
using namespace ircd;
#define MAXPARA 10 #define MAXPARA 10

View file

@ -35,13 +35,11 @@
* *
*/ */
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <ircd/stdinc.h> #include <ircd/stdinc.h>
#include "rsdb.h" #include "rsdb.h"
using namespace ircd::defaults;
#define EmptyString(x) ((x == NULL) || (*(x) == '\0')) #define EmptyString(x) ((x == NULL) || (*(x) == '\0'))
#define BT_VERSION "0.4.1" #define BT_VERSION "0.4.1"

View file

@ -1,5 +1,5 @@
#ifndef INCLUDED_rsdb_h #pragma once
#define INCLUDED_rsdb_h #define HAVE_BANDB_RSDB_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -44,5 +44,3 @@ int rs_snprintf(char *dest, const size_t bytes, const char *format, ...);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif

View file

@ -28,10 +28,11 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <sqlite3.h>
#include <ircd/stdinc.h> #include <ircd/stdinc.h>
#include "rsdb.h" #include "rsdb.h"
#include <sqlite3.h> using namespace ircd::defaults;
struct sqlite3 *rb_bandb; struct sqlite3 *rb_bandb;

View file

@ -22,10 +22,12 @@
#include <rb/rb.h> #include <rb/rb.h>
#include <ircd/ircd.h> #include <ircd/ircd.h>
namespace ircd
extern int charybdis_main(int argc, char *const argv[]); {
extern int charybdis_main(int argc, char *const argv[]);
}
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
return charybdis_main(argc, argv); return ircd::charybdis_main(argc, argv);
} }

View file

@ -10,6 +10,8 @@
#include <ircd/numeric.h> #include <ircd/numeric.h>
#include <ircd/chmode.h> #include <ircd/chmode.h>
using namespace ircd;
static const char chm_adminonly_desc[] = static const char chm_adminonly_desc[] =
"Enables channel mode +A that blocks non-admins from joining a channel"; "Enables channel mode +A that blocks non-admins from joining a channel";

View file

@ -10,6 +10,8 @@
#include <ircd/numeric.h> #include <ircd/numeric.h>
#include <ircd/chmode.h> #include <ircd/chmode.h>
using namespace ircd;
static const char chm_insecure_desc[] = static const char chm_insecure_desc[] =
"Adds channel mode +U that allows non-SSL users to join a channel, " "Adds channel mode +U that allows non-SSL users to join a channel, "
"disallowing them by default"; "disallowing them by default";

View file

@ -35,6 +35,8 @@
#include <ircd/messages.h> #include <ircd/messages.h>
#include <ircd/inline/stringops.h> #include <ircd/inline/stringops.h>
using namespace ircd;
static const char chm_nonotice_desc[] = static const char chm_nonotice_desc[] =
"Adds channel mode +T which blocks notices to the channel."; "Adds channel mode +T which blocks notices to the channel.";

View file

@ -10,6 +10,8 @@
#include <ircd/numeric.h> #include <ircd/numeric.h>
#include <ircd/chmode.h> #include <ircd/chmode.h>
using namespace ircd;
static const char chm_operonly_desc[] = static const char chm_operonly_desc[] =
"Adds channel mode +O which makes a channel operator-only"; "Adds channel mode +O which makes a channel operator-only";

View file

@ -9,6 +9,8 @@
#include <ircd/ircd.h> #include <ircd/ircd.h>
#include <ircd/chmode.h> #include <ircd/chmode.h>
using namespace ircd;
static const char chm_operonly_compat[] = static const char chm_operonly_compat[] =
"Adds an emulated channel mode +O which is converted into mode +i and +I $o"; "Adds an emulated channel mode +O which is converted into mode +i and +I $o";

View file

@ -18,6 +18,8 @@
#include <ircd/s_newconf.h> #include <ircd/s_newconf.h>
#include <ircd/chmode.h> #include <ircd/chmode.h>
using namespace ircd;
static const char chm_operpeace_desc[] = static const char chm_operpeace_desc[] =
"Adds channel mode +M which prohibits operators from being kicked"; "Adds channel mode +M which prohibits operators from being kicked";

View file

@ -10,6 +10,8 @@
#include <ircd/ircd.h> #include <ircd/ircd.h>
#include <ircd/chmode.h> #include <ircd/chmode.h>
using namespace ircd;
static const char chm_quietunreg_compat_desc[] = static const char chm_quietunreg_compat_desc[] =
"Adds an emulated channel mode +R which is converted into mode +q $~a"; "Adds an emulated channel mode +R which is converted into mode +q $~a";

View file

@ -39,6 +39,7 @@
#include <ircd/substitution.h> #include <ircd/substitution.h>
#include "spamfilter.h" #include "spamfilter.h"
using namespace ircd;
int chm_spamfilter; int chm_spamfilter;
int h_spamfilter_query; int h_spamfilter_query;

View file

@ -10,6 +10,8 @@
#include <ircd/numeric.h> #include <ircd/numeric.h>
#include <ircd/chmode.h> #include <ircd/chmode.h>
using namespace ircd;
static const char chm_sslonly_desc[] = static const char chm_sslonly_desc[] =
"Adds channel mode +S that bans non-SSL users from joing a channel"; "Adds channel mode +S that bans non-SSL users from joing a channel";

View file

@ -9,6 +9,8 @@
#include <ircd/ircd.h> #include <ircd/ircd.h>
#include <ircd/chmode.h> #include <ircd/chmode.h>
using namespace ircd;
static const char chm_sslonly_compat_desc[] = static const char chm_sslonly_compat_desc[] =
"Adds an emulated channel mode +S which is converted into mode +b $~z"; "Adds an emulated channel mode +S which is converted into mode +b $~z";

View file

@ -16,6 +16,8 @@
#include <ircd/snomask.h> #include <ircd/snomask.h>
#include <ircd/numeric.h> #include <ircd/numeric.h>
using namespace ircd;
static const char restrict_desc[] = "Restricts channel creation to authenticated users and IRC operators only"; static const char restrict_desc[] = "Restricts channel creation to authenticated users and IRC operators only";
static void h_can_create_channel_authenticated(hook_data_client_approval *); static void h_can_create_channel_authenticated(hook_data_client_approval *);

View file

@ -16,6 +16,8 @@
#include <ircd/snomask.h> #include <ircd/snomask.h>
#include <ircd/numeric.h> #include <ircd/numeric.h>
using namespace ircd;
static const char restrict_desc[] = "Restricts channel creation to IRC operators"; static const char restrict_desc[] = "Restricts channel creation to IRC operators";
static void h_can_create_channel_authenticated(hook_data_client_approval *); static void h_can_create_channel_authenticated(hook_data_client_approval *);

View file

@ -25,6 +25,8 @@
#include <ircd/ircd.h> #include <ircd/ircd.h>
#include <ircd/send.h> #include <ircd/send.h>
using namespace ircd;
/* This string describes the module. Always declare it a static const char[]. /* This string describes the module. Always declare it a static const char[].
* It is preferred for stylistic reasons to put it first. * It is preferred for stylistic reasons to put it first.
* *

View file

@ -8,6 +8,8 @@
#include <ircd/client.h> #include <ircd/client.h>
#include <ircd/ircd.h> #include <ircd/ircd.h>
using namespace ircd;
static const char extb_desc[] = "Account ($a) extban type"; static const char extb_desc[] = "Account ($a) extban type";
static int _modinit(void); static int _modinit(void);

View file

@ -11,6 +11,8 @@
#include <ircd/hash.h> #include <ircd/hash.h>
#include <ircd/ircd.h> #include <ircd/ircd.h>
using namespace ircd;
static const char extb_desc[] = "Can join ($j) extban type - matches users who are or are not banned from a specified channel"; static const char extb_desc[] = "Can join ($j) extban type - matches users who are or are not banned from a specified channel";
static int _modinit(void); static int _modinit(void);

View file

@ -10,6 +10,8 @@
#include <ircd/hash.h> #include <ircd/hash.h>
#include <ircd/ircd.h> #include <ircd/ircd.h>
using namespace ircd;
static const char extb_desc[] = "Channel ($c) extban type"; static const char extb_desc[] = "Channel ($c) extban type";
static int _modinit(void); static int _modinit(void);

View file

@ -42,6 +42,8 @@
#include <ircd/client.h> #include <ircd/client.h>
#include <ircd/ircd.h> #include <ircd/ircd.h>
using namespace ircd;
static const char extb_desc[] = "Combination ($&, $|) extban types"; static const char extb_desc[] = "Combination ($&, $|) extban types";
// #define MOD_DEBUG(s) sendto_realops_snomask(SNO_DEBUG, L_NETWIDE, (s)) // #define MOD_DEBUG(s) sendto_realops_snomask(SNO_DEBUG, L_NETWIDE, (s))

View file

@ -9,6 +9,8 @@
#include <ircd/client.h> #include <ircd/client.h>
#include <ircd/ircd.h> #include <ircd/ircd.h>
using namespace ircd;
static const char extb_desc[] = "Extended mask ($x) extban type"; static const char extb_desc[] = "Extended mask ($x) extban type";
static int _modinit(void); static int _modinit(void);

View file

@ -8,6 +8,8 @@
#include <ircd/client.h> #include <ircd/client.h>
#include <ircd/ircd.h> #include <ircd/ircd.h>
using namespace ircd;
static const char extb_desc[] = "Hostmask ($m) extban type"; static const char extb_desc[] = "Hostmask ($m) extban type";
static int _modinit(void); static int _modinit(void);

View file

@ -10,6 +10,8 @@
#include <ircd/s_newconf.h> #include <ircd/s_newconf.h>
#include <ircd/ircd.h> #include <ircd/ircd.h>
using namespace ircd;
static const char extb_desc[] = "Oper ($o) extban type"; static const char extb_desc[] = "Oper ($o) extban type";
static int _modinit(void); static int _modinit(void);

View file

@ -8,6 +8,8 @@
#include <ircd/client.h> #include <ircd/client.h>
#include <ircd/ircd.h> #include <ircd/ircd.h>
using namespace ircd;
static const char extb_desc[] = "Realname/GECOS ($r) extban type"; static const char extb_desc[] = "Realname/GECOS ($r) extban type";
static int _modinit(void); static int _modinit(void);

View file

@ -8,6 +8,8 @@
#include <ircd/client.h> #include <ircd/client.h>
#include <ircd/ircd.h> #include <ircd/ircd.h>
using namespace ircd;
static const char extb_desc[] = "Server ($s) extban type"; static const char extb_desc[] = "Server ($s) extban type";
static int _modinit(void); static int _modinit(void);

View file

@ -5,6 +5,8 @@
#include <ircd/client.h> #include <ircd/client.h>
#include <ircd/ircd.h> #include <ircd/ircd.h>
using namespace ircd;
static const char extb_desc[] = "SSL/TLS ($z) extban type"; static const char extb_desc[] = "SSL/TLS ($z) extban type";
static int _modinit(void); static int _modinit(void);

View file

@ -15,6 +15,8 @@
#include <ircd/s_serv.h> #include <ircd/s_serv.h>
#include <ircd/numeric.h> #include <ircd/numeric.h>
using namespace ircd;
static const char extb_desc[] = "Usermode ($m) extban type"; static const char extb_desc[] = "Usermode ($m) extban type";
static int _modinit(void); static int _modinit(void);

View file

@ -15,6 +15,8 @@
#include <ircd/s_conf.h> #include <ircd/s_conf.h>
#include <ircd/s_newconf.h> #include <ircd/s_newconf.h>
using namespace ircd;
static const char noi_desc[] = static const char noi_desc[] =
"Do not allow users to remove user mode +i unless they are operators"; "Do not allow users to remove user mode +i unless they are operators";

View file

@ -14,6 +14,8 @@
#include <ircd/s_newconf.h> #include <ircd/s_newconf.h>
#include <ircd/numeric.h> #include <ircd/numeric.h>
using namespace ircd;
static const char helpops_desc[] = "The helpops system as used by freenode"; static const char helpops_desc[] = "The helpops system as used by freenode";
static rb_dlink_list helper_list = { NULL, NULL, 0 }; static rb_dlink_list helper_list = { NULL, NULL, 0 };

View file

@ -12,6 +12,8 @@
#include <ircd/s_conf.h> #include <ircd/s_conf.h>
#include <ircd/s_newconf.h> #include <ircd/s_newconf.h>
using namespace ircd;
static const char hide_desc[] = "Hides channel memberships not shared"; static const char hide_desc[] = "Hides channel memberships not shared";
static void h_huc_doing_whois_channel_visibility(hook_data_client *); static void h_huc_doing_whois_channel_visibility(hook_data_client *);

View file

@ -18,6 +18,8 @@
#include <ircd/messages.h> #include <ircd/messages.h>
#include <ircd/s_assert.h> #include <ircd/s_assert.h>
using namespace ircd;
/* {{{ Structures */ /* {{{ Structures */
#define HURT_CUTOFF (10) /* protocol messages. */ #define HURT_CUTOFF (10) /* protocol messages. */
#define HURT_DEFAULT_EXPIRE (7 * 24 * 60) /* minutes. */ #define HURT_DEFAULT_EXPIRE (7 * 24 * 60) /* minutes. */

View file

@ -17,6 +17,8 @@
#include <ircd/s_serv.h> #include <ircd/s_serv.h>
#include <ircd/numeric.h> #include <ircd/numeric.h>
using namespace ircd;
static const char ip_cloaking_desc[] = "IP cloaking module that uses user mode +h"; static const char ip_cloaking_desc[] = "IP cloaking module that uses user mode +h";
static int static int

View file

@ -10,6 +10,8 @@
#include <ircd/s_serv.h> #include <ircd/s_serv.h>
#include <ircd/numeric.h> #include <ircd/numeric.h>
using namespace ircd;
static const char ip_cloaking_desc[] = "The old IP cloaking mechanism version 3.0"; static const char ip_cloaking_desc[] = "The old IP cloaking mechanism version 3.0";
/* if you're modifying this module, you'll probably want to change this */ /* if you're modifying this module, you'll probably want to change this */

View file

@ -17,6 +17,8 @@
#include <ircd/s_serv.h> #include <ircd/s_serv.h>
#include <ircd/numeric.h> #include <ircd/numeric.h>
using namespace ircd;
static const char ip_cloaking_desc[] = "New IP cloaking module that uses user mode +x instead of +h"; static const char ip_cloaking_desc[] = "New IP cloaking module that uses user mode +x instead of +h";
static int static int

View file

@ -10,6 +10,8 @@
#include <ircd/s_serv.h> #include <ircd/s_serv.h>
#include <ircd/numeric.h> #include <ircd/numeric.h>
using namespace ircd;
static const char ip_cloaking_desc[] = "Very old IP cloaking mechanism"; static const char ip_cloaking_desc[] = "Very old IP cloaking mechanism";
/* if you're modifying this module, you'll probably want to change this */ /* if you're modifying this module, you'll probably want to change this */

View file

@ -37,6 +37,8 @@
#include <ircd/s_serv.h> #include <ircd/s_serv.h>
#include <ircd/messages.h> #include <ircd/messages.h>
using namespace ircd;
static const char adminwall_desc[] = static const char adminwall_desc[] =
"Provides the ADMINWALL command to send a message to all administrators"; "Provides the ADMINWALL command to send a message to all administrators";

View file

@ -4,6 +4,8 @@
#include <ircd/ircd.h> #include <ircd/ircd.h>
#include <ircd/send.h> #include <ircd/send.h>
using namespace ircd;
static void m_echotags(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]); static void m_echotags(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
struct Message echotags_msgtab = { struct Message echotags_msgtab = {

View file

@ -31,6 +31,8 @@
#include <ircd/send.h> #include <ircd/send.h>
#include <ircd/numeric.h> #include <ircd/numeric.h>
using namespace ircd;
static const char extendchans_desc[] = static const char extendchans_desc[] =
"Allow an oper or service to let a given user join more channels"; "Allow an oper or service to let a given user join more channels";

View file

@ -34,6 +34,8 @@
#include <ircd/packet.h> #include <ircd/packet.h>
#include <ircd/messages.h> #include <ircd/messages.h>
using namespace ircd;
static const char findfowards_desc[] = "Allows operators to find forwards to a given channel"; static const char findfowards_desc[] = "Allows operators to find forwards to a given channel";
static void m_findforwards(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, static void m_findforwards(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p,

View file

@ -46,6 +46,8 @@
#define SVS_chanserv_NICK "ChanServ" #define SVS_chanserv_NICK "ChanServ"
#define SVS_nickserv_NICK "NickServ" #define SVS_nickserv_NICK "NickServ"
using namespace ircd;
static const char identify_desc[] = "Adds the IDENTIFY alias that forwards to NickServ or ChanServ"; static const char identify_desc[] = "Adds the IDENTIFY alias that forwards to NickServ or ChanServ";
static void m_identify(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]); static void m_identify(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);

View file

@ -37,6 +37,8 @@
#include <ircd/modules.h> #include <ircd/modules.h>
#include <ircd/s_serv.h> #include <ircd/s_serv.h>
using namespace ircd;
static const char locops_desc[] = static const char locops_desc[] =
"Provides the LOCOPS command to send a message to all local operators"; "Provides the LOCOPS command to send a message to all local operators";

View file

@ -15,6 +15,8 @@
#include <string.h> #include <string.h>
using namespace ircd;
const char mkpasswd_desc[] = "Hash a password for use in ircd.conf"; const char mkpasswd_desc[] = "Hash a password for use in ircd.conf";
static void m_mkpasswd(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, static void m_mkpasswd(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p,

View file

@ -35,6 +35,8 @@
#include <ircd/modules.h> #include <ircd/modules.h>
#include <ircd/messages.h> #include <ircd/messages.h>
using namespace ircd;
static const char ojoin_desc[] = "Allow admins to forcibly join channels with the OJOIN command"; static const char ojoin_desc[] = "Allow admins to forcibly join channels with the OJOIN command";
static void mo_ojoin(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]); static void mo_ojoin(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);

View file

@ -38,6 +38,8 @@
#include <ircd/messages.h> #include <ircd/messages.h>
#include <ircd/logger.h> #include <ircd/logger.h>
using namespace ircd;
static const char okick_desc[] = "Allow admins to forcibly kick users from channels with the OKICK command"; static const char okick_desc[] = "Allow admins to forcibly kick users from channels with the OKICK command";
static void mo_okick(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]); static void mo_okick(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);

View file

@ -42,6 +42,8 @@
#include <ircd/messages.h> #include <ircd/messages.h>
#include <ircd/logger.h> #include <ircd/logger.h>
using namespace ircd;
static const char omode_desc[] = "Allow admins to forcibly change modes on channels with the OMODE command"; static const char omode_desc[] = "Allow admins to forcibly change modes on channels with the OMODE command";
static void mo_omode(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static void mo_omode(struct MsgBuf *, struct Client *, struct Client *, int, const char **);

View file

@ -34,6 +34,8 @@
#include <ircd/s_newconf.h> #include <ircd/s_newconf.h>
#include <ircd/messages.h> #include <ircd/messages.h>
using namespace ircd;
static const char opme_desc[] = "Allow admins to op themselves on opless channels"; static const char opme_desc[] = "Allow admins to op themselves on opless channels";
static void mo_opme(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]); static void mo_opme(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);

View file

@ -39,6 +39,8 @@
#include <ircd/hook.h> #include <ircd/hook.h>
#include <ircd/messages.h> #include <ircd/messages.h>
using namespace ircd;
static const char description[] = "Provides the REMOVE command, an alternative to KICK"; static const char description[] = "Provides the REMOVE command, an alternative to KICK";
static void m_remove(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static void m_remove(struct MsgBuf *, struct Client *, struct Client *, int, const char **);

View file

@ -29,6 +29,8 @@
#include <ircd/packet.h> #include <ircd/packet.h>
#include <ircd/messages.h> #include <ircd/messages.h>
using namespace ircd;
static const char roleplay_desc[] = static const char roleplay_desc[] =
"Adds a roleplaying system that allows faked nicknames to talk in a channel set +N"; "Adds a roleplaying system that allows faked nicknames to talk in a channel set +N";

View file

@ -43,6 +43,8 @@
#include <ircd/modules.h> #include <ircd/modules.h>
#include <ircd/messages.h> #include <ircd/messages.h>
using namespace ircd;
static const char sendbands_desc[] = static const char sendbands_desc[] =
"Adds the ability to send all permanent RESVs and XLINEs to given server"; "Adds the ability to send all permanent RESVs and XLINEs to given server";

View file

@ -53,6 +53,8 @@
#include <ircd/s_conf.h> #include <ircd/s_conf.h>
#include <ircd/reject.h> #include <ircd/reject.h>
using namespace ircd;
static const char webirc_desc[] = "Adds support for the WebIRC system"; static const char webirc_desc[] = "Adds support for the WebIRC system";
static void mr_webirc(struct MsgBuf *msgbuf_p, struct Client *, struct Client *, int, const char **); static void mr_webirc(struct MsgBuf *msgbuf_p, struct Client *, struct Client *, int, const char **);

View file

@ -20,6 +20,8 @@
#include <ircd/privilege.h> #include <ircd/privilege.h>
#include <ircd/s_newconf.h> #include <ircd/s_newconf.h>
using namespace ircd;
static const char nokill_desc[] = "Prevents operators from killing services"; static const char nokill_desc[] = "Prevents operators from killing services";
static void block_services_kill(void *data); static void block_services_kill(void *data);

View file

@ -12,6 +12,8 @@
#include <ircd/s_conf.h> #include <ircd/s_conf.h>
#include <ircd/s_newconf.h> #include <ircd/s_newconf.h>
using namespace ircd;
static const char no_locops_desc[] = "Disables local operators"; static const char no_locops_desc[] = "Disables local operators";
static void h_nl_umode_changed(hook_data_umode_changed *); static void h_nl_umode_changed(hook_data_umode_changed *);

View file

@ -13,6 +13,8 @@
#include <ircd/s_conf.h> #include <ircd/s_conf.h>
#include <ircd/s_newconf.h> #include <ircd/s_newconf.h>
using namespace ircd;
static const char noi_desc[] = static const char noi_desc[] =
"Disallow operators from setting user mode +i on themselves"; "Disallow operators from setting user mode +i on themselves";

View file

@ -22,6 +22,8 @@
#include <ircd/privilege.h> #include <ircd/privilege.h>
#include <ircd/s_newconf.h> #include <ircd/s_newconf.h>
using namespace ircd;
static const char override_desc[] = static const char override_desc[] =
"Adds user mode +p, an operator-only user mode that grants temporary privileges to override anything"; "Adds user mode +p, an operator-only user mode that grants temporary privileges to override anything";

View file

@ -16,6 +16,8 @@
#include <ircd/privilege.h> #include <ircd/privilege.h>
#include <ircd/s_newconf.h> #include <ircd/s_newconf.h>
using namespace ircd;
static const char restrict_desc[] = static const char restrict_desc[] =
"Restrict unautenticated users from doing anything as channel ops"; "Restrict unautenticated users from doing anything as channel ops";

View file

@ -11,6 +11,8 @@
#include <ircd/s_conf.h> #include <ircd/s_conf.h>
#include <ircd/snomask.h> #include <ircd/snomask.h>
using namespace ircd;
static const char sno_desc[] = static const char sno_desc[] =
"Adds server notice mask +l that allows operators to receive channel creation notices"; "Adds server notice mask +l that allows operators to receive channel creation notices";

View file

@ -15,6 +15,8 @@
#include <ircd/s_conf.h> #include <ircd/s_conf.h>
#include <ircd/snomask.h> #include <ircd/snomask.h>
using namespace ircd;
static const char sno_desc[] = static const char sno_desc[] =
"Adds server notice mask +F that allows operators to receive notices for connections on other servers"; "Adds server notice mask +F that allows operators to receive notices for connections on other servers";

View file

@ -15,6 +15,8 @@
#include <ircd/send.h> #include <ircd/send.h>
#include <ircd/s_conf.h> #include <ircd/s_conf.h>
using namespace ircd;
static const char sno_desc[] = static const char sno_desc[] =
"Adds server notices for global XLINEs, KLINEs, and DLINEs"; "Adds server notices for global XLINEs, KLINEs, and DLINEs";

View file

@ -11,6 +11,8 @@
#include <ircd/s_conf.h> #include <ircd/s_conf.h>
#include <ircd/snomask.h> #include <ircd/snomask.h>
using namespace ircd;
static const char sno_desc[] = static const char sno_desc[] =
"Adds server notices for remote nick changes"; "Adds server notices for remote nick changes";

View file

@ -11,6 +11,8 @@
#include <ircd/s_conf.h> #include <ircd/s_conf.h>
#include <ircd/snomask.h> #include <ircd/snomask.h>
using namespace ircd;
static const char sno_desc[] = static const char sno_desc[] =
"Adds server notices for remote oper up"; "Adds server notices for remote oper up";

View file

@ -16,6 +16,8 @@
/* undefine this to allow anyone to receive whois notifications */ /* undefine this to allow anyone to receive whois notifications */
#define OPERONLY #define OPERONLY
using namespace ircd;
static const char sno_desc[] = static const char sno_desc[] =
"Adds server notice mask +W that allows " "Adds server notice mask +W that allows "
#ifdef OPERONLY #ifdef OPERONLY

View file

@ -65,6 +65,8 @@
#define EXPR_ERROR_EXISTS -255 #define EXPR_ERROR_EXISTS -255
#define EXPR_ERROR_DICTFAIL -254 #define EXPR_ERROR_DICTFAIL -254
using namespace ircd;
struct Expr struct Expr
{ {

View file

@ -38,6 +38,8 @@
#include <ircd/newconf.h> #include <ircd/newconf.h>
#include "spamfilter.h" #include "spamfilter.h"
using namespace ircd;
/* Conf items & defaults */ /* Conf items & defaults */
size_t conf_limit = 5; size_t conf_limit = 5;

View file

@ -26,6 +26,8 @@
#include <ircd/ircd.h> #include <ircd/ircd.h>
#include <ircd/send.h> #include <ircd/send.h>
using namespace ircd;
static const char spy_desc[] = "Sends a notice when someone uses ADMIN"; static const char spy_desc[] = "Sends a notice when someone uses ADMIN";
void show_admin(hook_data *); void show_admin(hook_data *);

View file

@ -26,6 +26,8 @@
#include <ircd/ircd.h> #include <ircd/ircd.h>
#include <ircd/send.h> #include <ircd/send.h>
using namespace ircd;
static const char spy_desc[] = "Sends a notice when someone uses INFO"; static const char spy_desc[] = "Sends a notice when someone uses INFO";
void show_info(hook_data *); void show_info(hook_data *);

View file

@ -26,6 +26,8 @@
#include <ircd/ircd.h> #include <ircd/ircd.h>
#include <ircd/send.h> #include <ircd/send.h>
using namespace ircd;
static const char spy_desc[] = "Sends a notice when someone uses LINKS"; static const char spy_desc[] = "Sends a notice when someone uses LINKS";
void show_links(hook_data *); void show_links(hook_data *);

View file

@ -26,6 +26,8 @@
#include <ircd/ircd.h> #include <ircd/ircd.h>
#include <ircd/send.h> #include <ircd/send.h>
using namespace ircd;
static const char spy_desc[] = "Sends a notice when someone looks at the MOTD"; static const char spy_desc[] = "Sends a notice when someone looks at the MOTD";
void show_motd(hook_data *); void show_motd(hook_data *);

View file

@ -26,6 +26,8 @@
#include <ircd/ircd.h> #include <ircd/ircd.h>
#include <ircd/send.h> #include <ircd/send.h>
using namespace ircd;
static const char spy_desc[] = "Sends a notice when someone uses STATS"; static const char spy_desc[] = "Sends a notice when someone uses STATS";
void show_stats(hook_data_int *); void show_stats(hook_data_int *);

View file

@ -26,6 +26,8 @@
#include <ircd/ircd.h> #include <ircd/ircd.h>
#include <ircd/send.h> #include <ircd/send.h>
using namespace ircd;
static const char spy_desc[] = "Sends a notice when someone looks at the operator list"; static const char spy_desc[] = "Sends a notice when someone looks at the operator list";
void show_stats_p(hook_data *); void show_stats_p(hook_data *);

View file

@ -26,6 +26,8 @@
#include <ircd/ircd.h> #include <ircd/ircd.h>
#include <ircd/send.h> #include <ircd/send.h>
using namespace ircd;
static const char spy_desc[] = "Sends a notice when someone uses TRACE or LTRACE"; static const char spy_desc[] = "Sends a notice when someone uses TRACE or LTRACE";
void show_trace(hook_data_client *); void show_trace(hook_data_client *);

View file

@ -30,6 +30,8 @@
#include <ircd/numeric.h> #include <ircd/numeric.h>
#include <ircd/inline/stringops.h> #include <ircd/inline/stringops.h>
using namespace ircd;
static const char umode_noctcp_desc[] = static const char umode_noctcp_desc[] =
"Adds user mode +C which blocks CTCPs to the user."; "Adds user mode +C which blocks CTCPs to the user.";

View file

@ -23,12 +23,15 @@
* USA * USA
*/ */
#ifndef CHARYBDIS_AUTHD_H #pragma once
#define CHARYBDIS_AUTHD_H #define HAVE_CHARYBDIS_AUTHD_H
#include "stdinc.h" #include "stdinc.h"
#include "client.h" #include "client.h"
#ifdef __cplusplus
namespace ircd {
struct BlacklistStats struct BlacklistStats
{ {
char *host; char *host;
@ -91,4 +94,5 @@ void delete_opm_proxy_scanner_all(void);
void delete_opm_listener_all(void); void delete_opm_listener_all(void);
void opm_check_enable(bool enabled); void opm_check_enable(bool enabled);
#endif } // namespace ircd
#endif // __cplusplus

View file

@ -1,5 +1,28 @@
#ifndef INCLUDED_bandbi_h /**
#define INCLUDED_bandbi_h * Copyright (C) 2016 Charybdis Development Team
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice is present in all copies.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#pragma once
#define HAVE_BANDBI_H
#ifdef __cplusplus
namespace ircd {
void init_bandb(void); void init_bandb(void);
@ -17,4 +40,5 @@ void bandb_add(bandb_type, struct Client *source_p, const char *mask1,
void bandb_del(bandb_type, const char *mask1, const char *mask2); void bandb_del(bandb_type, const char *mask1, const char *mask2);
void bandb_rehash_bans(void); void bandb_rehash_bans(void);
#endif } // namespace ircd
#endif // __cplusplus

View file

@ -1,15 +1,36 @@
/**
* Copyright (C) 2016 Charybdis development team
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice is present in all copies.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#pragma once #pragma once
#define HAVE_IRCD_CACHE_H #define HAVE_IRCD_CACHE_H
#define HELP_MAX 100 #define HELP_MAX 100
#define CACHEFILELEN 30 #define CACHEFILELEN 30
/* two servernames, a gecos, three spaces, ":1", '\0' */ /* two servernames, a gecos, three spaces, ":1", '\0' */
#define LINKSLINELEN (HOSTLEN + HOSTLEN + REALLEN + 6) #define LINKSLINELEN (HOSTLEN + HOSTLEN + REALLEN + 6)
#define HELP_USER 0x001 #define HELP_USER 0x001
#define HELP_OPER 0x002 #define HELP_OPER 0x002
#ifdef __cplusplus
namespace ircd {
struct cachefile struct cachefile
{ {
cachefile(const char *filename, const char *shortname, int flags) { cachefile(const char *filename, const char *shortname, int flags) {
@ -41,3 +62,6 @@ extern char user_motd_changed[MAX_DATE_STRING];
extern std::map<std::string, std::shared_ptr<cachefile>, case_insensitive_less> help_dict_oper; extern std::map<std::string, std::shared_ptr<cachefile>, case_insensitive_less> help_dict_oper;
extern std::map<std::string, std::shared_ptr<cachefile>, case_insensitive_less> help_dict_user; extern std::map<std::string, std::shared_ptr<cachefile>, case_insensitive_less> help_dict_user;
} // namespace ircd
#endif // __cplusplus

View file

@ -20,8 +20,11 @@
* USA * USA
*/ */
#ifndef INCLUDED_certfp_h #pragma once
#define INCLUDED_certfp_h #define HAVE_IRCD_CERTFP_H
#ifdef __cplusplus
namespace ircd {
#define CERTFP_NAME_CERT_SHA1 "sha1" #define CERTFP_NAME_CERT_SHA1 "sha1"
#define CERTFP_PREFIX_CERT_SHA1 "" #define CERTFP_PREFIX_CERT_SHA1 ""
@ -35,4 +38,5 @@
#define CERTFP_NAME_SPKI_SHA512 "spki_sha512" #define CERTFP_NAME_SPKI_SHA512 "spki_sha512"
#define CERTFP_PREFIX_SPKI_SHA512 "SPKI:SHA2-512:" #define CERTFP_PREFIX_SPKI_SHA512 "SPKI:SHA2-512:"
#endif /* INCLUDED_certfp_h */ } // namespace ircd
#endif // __cplusplus

View file

@ -22,12 +22,15 @@
* USA * USA
*/ */
#ifndef INCLUDED_channel_h #pragma once
#define INCLUDED_channel_h #define HAVE_IRCD_CHANNEL_H
#include "stdinc.h" #include "stdinc.h"
#include "chmode.h" #include "chmode.h"
#ifdef __cplusplus
namespace ircd {
/* channel status flags */ /* channel status flags */
#define CHFL_PEON 0x0000 /* normal member of channel */ #define CHFL_PEON 0x0000 /* normal member of channel */
#define CHFL_VOICE 0x0001 /* the power to speak */ #define CHFL_VOICE 0x0001 /* the power to speak */
@ -235,4 +238,5 @@ extern int get_channel_access(struct Client *source_p, struct Channel *chptr, st
extern void send_channel_join(struct Channel *chptr, struct Client *client_p); extern void send_channel_join(struct Channel *chptr, struct Client *client_p);
#endif /* INCLUDED_channel_h */ } // namespace ircd
#endif // __cplusplus

View file

@ -23,8 +23,8 @@
* USA * USA
*/ */
#ifndef INCLUDED_chmode_h #pragma once
#define INCLUDED_chmode_h #define HAVE_IRCD_CHMOD_H
/* something not included in messages.tab /* something not included in messages.tab
* to change some hooks behaviour when needed * to change some hooks behaviour when needed
@ -37,6 +37,9 @@
#define MAXMODEPARAMSSERV 10 #define MAXMODEPARAMSSERV 10
#define MODEBUFLEN 200 #define MODEBUFLEN 200
#ifdef __cplusplus
namespace ircd {
/* Channel mode classification */ /* Channel mode classification */
typedef enum typedef enum
{ {
@ -120,4 +123,5 @@ void cflag_orphan(const unsigned char c);
void chmode_init(void); void chmode_init(void);
#endif } // namespace ircd
#endif // __cplusplus

View file

@ -22,8 +22,11 @@
* USA * USA
*/ */
#ifndef INCLUDED_class_h #pragma once
#define INCLUDED_class_h #define HAVE_IRCD_CLASS_H
#ifdef __cplusplus
namespace ircd {
struct ConfItem; struct ConfItem;
struct Client; struct Client;
@ -95,4 +98,5 @@ extern void free_class(struct Class *);
extern void fix_class(struct ConfItem *, struct ConfItem *); extern void fix_class(struct ConfItem *, struct ConfItem *);
extern void report_classes(struct Client *); extern void report_classes(struct Client *);
#endif /* INCLUDED_class_h */ } // namespace ircd
#endif // __cplusplus

View file

@ -23,8 +23,8 @@
* USA * USA
*/ */
#ifndef INCLUDED_client_h #pragma once
#define INCLUDED_client_h #define HAVE_IRCD_CLIENT_H
#include "stdinc.h" #include "stdinc.h"
#include "defaults.h" #include "defaults.h"
@ -35,6 +35,9 @@
#include "ircd.h" #include "ircd.h"
#include "privilege.h" #include "privilege.h"
#ifdef __cplusplus
namespace ircd {
/* other structs */ /* other structs */
struct Blacklist; struct Blacklist;
@ -622,4 +625,5 @@ uint32_t connid_get(struct Client *client_p);
void connid_put(uint32_t id); void connid_put(uint32_t id);
void client_release_connids(struct Client *client_p); void client_release_connids(struct Client *client_p);
#endif /* INCLUDED_client_h */ } // namespace ircd
#endif // __cplusplus

View file

@ -81,15 +81,8 @@ constexpr auto AWAYLEN = TOPICLEN;
constexpr auto KILLLEN = 200; // with Killed (nick ()) added this should fit in quit constexpr auto KILLLEN = 200; // with Killed (nick ()) added this should fit in quit
constexpr auto MAX_DATE_STRING = 32; // maximum string length for a date string constexpr auto MAX_DATE_STRING = 32; // maximum string length for a date string
constexpr auto HELPLEN = 400; constexpr auto HELPLEN = 400;
constexpr auto OPERNICKLEN // Length of OPERNICKs. constexpr auto OPERNICKLEN = int(NICKLEN) * 2; // Length of OPERNICKs.
{ constexpr auto USERHOST_REPLYLEN = int(NICKLEN) + HOSTLEN + USERLEN + 5;
NICKLEN * 2
};
constexpr auto USERHOST_REPLYLEN
{
NICKLEN + HOSTLEN + USERLEN + 5
};
constexpr auto BUFSIZE = 512; // WARNING: *DONT* CHANGE THIS!!!! constexpr auto BUFSIZE = 512; // WARNING: *DONT* CHANGE THIS!!!!
constexpr auto MAXCONNECTIONS = 65536; // default max connections if getrlimit doesn't work constexpr auto MAXCONNECTIONS = 65536; // default max connections if getrlimit doesn't work

View file

@ -23,12 +23,15 @@
* USA * USA
*/ */
#ifndef CHARYBDIS_DNS_H #pragma once
#define CHARYBDIS_DNS_H #define HAVE_IRCD_DNS_H
#include "stdinc.h" #include "stdinc.h"
#include "authproc.h" #include "authproc.h"
#ifdef __cplusplus
namespace ircd {
extern rb_dlink_list nameservers; extern rb_dlink_list nameservers;
typedef void (*DNSCB)(const char *res, int status, int aftype, void *data); typedef void (*DNSCB)(const char *res, int status, int aftype, void *data);
@ -45,4 +48,5 @@ void dns_stats_results_callback(const char *callid, const char *status, int resc
void init_dns(void); void init_dns(void);
void reload_nameservers(void); void reload_nameservers(void);
#endif } // namespace ircd
#endif // __cplusplus

View file

@ -30,7 +30,7 @@
#include "util.h" #include "util.h"
#ifdef __cplusplus #ifdef __cplusplus
inline namespace ircd { namespace ircd {
IRCD_OVERLOAD(pass_name) IRCD_OVERLOAD(pass_name)

View file

@ -40,8 +40,8 @@
*/ */
#ifdef __cplusplus #ifdef __cplusplus
inline namespace ircd { namespace ircd {
inline namespace fs { inline namespace fs {
#define DPATH IRCD_PREFIX #define DPATH IRCD_PREFIX
#define BINPATH IRCD_PREFIX "/bin" #define BINPATH IRCD_PREFIX "/bin"

View file

@ -22,12 +22,15 @@
* USA * USA
*/ */
#ifndef INCLUDED_hash_h #pragma once
#define INCLUDED_hash_h #define HAVE_IRCD_HASH_H
#include <rb/dictionary.h> #include <rb/dictionary.h>
#include <rb/radixtree.h> #include <rb/radixtree.h>
#ifdef __cplusplus
namespace ircd {
extern rb_dictionary *nd_dict; extern rb_dictionary *nd_dict;
extern rb_radixtree *resv_tree; extern rb_radixtree *resv_tree;
extern rb_radixtree *channel_tree; extern rb_radixtree *channel_tree;
@ -98,4 +101,5 @@ void add_to_cli_connid_hash(struct Client *client_p, uint32_t id);
void del_from_cli_connid_hash(uint32_t id); void del_from_cli_connid_hash(uint32_t id);
struct Client *find_cli_connid_hash(uint32_t connid); struct Client *find_cli_connid_hash(uint32_t connid);
#endif /* INCLUDED_hash_h */ } // namespace ircd
#endif // __cplusplus

View file

@ -2,8 +2,12 @@
* Copyright (C) 2004-2005 Lee Hardy <lee -at- leeh.co.uk> * Copyright (C) 2004-2005 Lee Hardy <lee -at- leeh.co.uk>
* Copyright (C) 2004-2005 ircd-ratbox development team * Copyright (C) 2004-2005 ircd-ratbox development team
*/ */
#ifndef INCLUDED_HOOK_H
#define INCLUDED_HOOK_H #pragma once
#define HAVE_IRCD_HOOK_H
#ifdef __cplusplus
namespace ircd {
typedef struct typedef struct
{ {
@ -149,4 +153,5 @@ typedef struct
bool signal; bool signal;
} hook_data_rehash; } hook_data_rehash;
#endif } // namespace ircd
#endif // __cplusplus

View file

@ -23,8 +23,11 @@
* USA * USA
*/ */
#ifndef INCLUDE_hostmask_h #pragma once
#define INCLUDE_hostmask_h 1 #define HAVE_IRCD_HOSTMASK_H
#ifdef __cplusplus
namespace ircd {
enum enum
{ {
@ -105,4 +108,5 @@ struct AddressRec
struct AddressRec *next; struct AddressRec *next;
}; };
#endif /* INCLUDE_hostmask_h */ } // namespace ircd
#endif // __cplusplus

View file

@ -20,8 +20,11 @@
* USA * USA
*/ */
#ifndef __INLINE_STRINGOPS_H #pragma once
#define __INLINE_STRINGOPS_H #define HAVE_IRCD_STRINGOPS_H
#ifdef __cplusplus
namespace ircd {
/* /*
* strip_colour - remove colour codes from a string * strip_colour - remove colour codes from a string
@ -124,4 +127,5 @@ strip_unprintable(char *string)
return string; return string;
} }
#endif } // namespace ircd
#endif // __cplusplus

View file

@ -30,6 +30,7 @@
#include "exception.h" #include "exception.h"
#ifdef __cplusplus #ifdef __cplusplus
namespace ircd {
struct Client; struct Client;
@ -108,4 +109,5 @@ extern int maxconnections;
void ircd_shutdown(const char *reason) __attribute__((noreturn)); void ircd_shutdown(const char *reason) __attribute__((noreturn));
} // namespace ircd
#endif // __cplusplus #endif // __cplusplus

View file

@ -22,8 +22,11 @@
* USA * USA
*/ */
#ifndef __GETOPT_H_INCLUDED__ #pragma once
#define __GETOPT_H_INCLUDED__ #define HAVE_IRCD_GETOPT_H
#ifdef __cplusplus
namespace ircd {
struct lgetopt struct lgetopt
{ {
@ -40,4 +43,5 @@ extern struct lgetopt myopts[];
void usage(const char *) __attribute__((noreturn)); void usage(const char *) __attribute__((noreturn));
void parseargs(int *, char * const **, struct lgetopt *); void parseargs(int *, char * const **, struct lgetopt *);
#endif /* __GETOPT_H_INCLUDED__ */ } // namespace ircd
#endif // __cplusplus

Some files were not shown because too many files have changed in this diff Show more