NOTE: feature SPLIT is default enabled as that is just easier when working on this patch.
-diff -r f544944f62bd doc/api/log.txt
---- a/doc/api/log.txt Fri Jan 30 19:15:18 2009 +0100
-+++ b/doc/api/log.txt Sat Jan 31 13:55:37 2009 +0100
+diff -r 5ad24aad236d doc/api/log.txt
+--- a/doc/api/log.txt Sat Jan 31 14:38:44 2009 +0100
++++ b/doc/api/log.txt Sat Jan 31 15:25:32 2009 +0100
@@ -41,7 +41,7 @@
<enum>
LS_OPERKILL, LS_SERVKILL, LS_USER, LS_OPER, LS_RESOLVER, LS_SOCKET,
LS_DEBUG, LS_OLDLOG,
LS_LAST_SYSTEM
-diff -r f544944f62bd include/handlers.h
---- a/include/handlers.h Fri Jan 30 19:15:18 2009 +0100
-+++ b/include/handlers.h Sat Jan 31 13:55:37 2009 +0100
+diff -r 5ad24aad236d include/handlers.h
+--- a/include/handlers.h Sat Jan 31 14:38:44 2009 +0100
++++ b/include/handlers.h Sat Jan 31 15:25:32 2009 +0100
@@ -139,6 +139,7 @@
extern int m_registered(struct Client*, struct Client*, int, char*[]);
extern int m_sethost(struct Client*, struct Client*, int, char*[]);
extern int ms_squit(struct Client*, struct Client*, int, char*[]);
extern int ms_stats(struct Client*, struct Client*, int, char*[]);
extern int ms_topic(struct Client*, struct Client*, int, char*[]);
-diff -r f544944f62bd include/ircd_features.h
---- a/include/ircd_features.h Fri Jan 30 19:15:18 2009 +0100
-+++ b/include/ircd_features.h Sat Jan 31 13:55:37 2009 +0100
+diff -r 5ad24aad236d include/ircd_features.h
+--- a/include/ircd_features.h Sat Jan 31 14:38:44 2009 +0100
++++ b/include/ircd_features.h Sat Jan 31 15:25:32 2009 +0100
@@ -112,6 +112,10 @@
FEAT_SETHOST_USER,
FEAT_SETHOST_AUTO,
FEAT_HIS_STATS_s,
FEAT_HIS_STATS_t,
FEAT_HIS_STATS_T,
-diff -r f544944f62bd include/ircd_log.h
---- a/include/ircd_log.h Fri Jan 30 19:15:18 2009 +0100
-+++ b/include/ircd_log.h Sat Jan 31 13:55:37 2009 +0100
+diff -r 5ad24aad236d include/ircd_log.h
+--- a/include/ircd_log.h Sat Jan 31 14:38:44 2009 +0100
++++ b/include/ircd_log.h Sat Jan 31 15:25:32 2009 +0100
@@ -55,6 +55,7 @@
LS_OPERMODE, /**< Uses of OPMODE, CLEARMODE< etc. */
LS_GLINE, /**< Adding, (de-)activating or removing GLINEs. */
LS_WHO, /**< Use of extended WHO privileges. */
LS_NETWORK, /**< New server connections. */
LS_OPERKILL, /**< Kills by IRC operators. */
-diff -r f544944f62bd include/msg.h
---- a/include/msg.h Fri Jan 30 19:15:18 2009 +0100
-+++ b/include/msg.h Sat Jan 31 13:55:37 2009 +0100
+diff -r 5ad24aad236d include/msg.h
+--- a/include/msg.h Sat Jan 31 14:38:44 2009 +0100
++++ b/include/msg.h Sat Jan 31 15:25:32 2009 +0100
@@ -336,6 +336,10 @@
#define TOK_JUPE "JU"
#define CMD_JUPE MSG_JUPE, TOK_JUPE
#define MSG_OPMODE "OPMODE" /* OPMO */
#define TOK_OPMODE "OM"
#define CMD_OPMODE MSG_OPMODE, TOK_OPMODE
-diff -r f544944f62bd include/numeric.h
---- a/include/numeric.h Fri Jan 30 19:15:18 2009 +0100
-+++ b/include/numeric.h Sat Jan 31 13:55:37 2009 +0100
+diff -r 5ad24aad236d include/numeric.h
+--- a/include/numeric.h Sat Jan 31 14:38:44 2009 +0100
++++ b/include/numeric.h Sat Jan 31 15:25:32 2009 +0100
@@ -118,6 +118,7 @@
#define RPL_STATSALINE 226 /* Hybrid, Undernet */
#define RPL_STATSWELCOME 227 /* QuakeNet extension */
#define ERR_SILELISTFULL 511 /* Undernet extension */
/* ERR_NOTIFYFULL 512 aircd */
/* ERR_TOOMANYWATCH 512 Numeric List: Dalnet */
-diff -r f544944f62bd include/split.h
+diff -r 5ad24aad236d include/split.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ b/include/split.h Sat Jan 31 13:55:37 2009 +0100
-@@ -0,0 +1,110 @@
++++ b/include/split.h Sat Jan 31 15:25:32 2009 +0100
+@@ -0,0 +1,109 @@
+#ifndef INCLUDED_split_h
+#define INCLUDED_split_h
+/*
+#define SPLIT_EXPIRE 0x01 /**< Expiration time update. */
+#define SPLIT_LIFETIME 0x02 /**< Record lifetime update. */
+#define SPLIT_REASON 0x04 /**< Reason update. */
-+#define SPLIT_MODIFY 0x08 /**< No state change. */
+
+/* mask for Split update flags. */
+#define SPLIT_UPDATE (SPLIT_EXPIRE | SPLIT_LIFETIME | SPLIT_REASON)
+extern int split_memory_count(size_t *sp_size);
+
+#endif /* INCLUDED_split_h */
-diff -r f544944f62bd ircd/Makefile.in
---- a/ircd/Makefile.in Fri Jan 30 19:15:18 2009 +0100
-+++ b/ircd/Makefile.in Sat Jan 31 13:55:37 2009 +0100
+diff -r 5ad24aad236d ircd/Makefile.in
+--- a/ircd/Makefile.in Sat Jan 31 14:38:44 2009 +0100
++++ b/ircd/Makefile.in Sat Jan 31 15:25:32 2009 +0100
@@ -173,6 +173,7 @@
m_sethost.c \
m_settime.c \
uping.o: uping.c ../config.h ../include/uping.h ../include/ircd_defs.h \
../include/ircd_events.h ../config.h ../include/res.h \
../include/client.h ../include/dbuf.h ../include/msgq.h \
-diff -r f544944f62bd ircd/ircd.c
---- a/ircd/ircd.c Fri Jan 30 19:15:18 2009 +0100
-+++ b/ircd/ircd.c Sat Jan 31 13:55:37 2009 +0100
+diff -r 5ad24aad236d ircd/ircd.c
+--- a/ircd/ircd.c Sat Jan 31 14:38:44 2009 +0100
++++ b/ircd/ircd.c Sat Jan 31 15:25:32 2009 +0100
@@ -55,6 +55,7 @@
#include "s_misc.h"
#include "s_stats.h"
event_loop();
return 0;
-diff -r f544944f62bd ircd/ircd_features.c
---- a/ircd/ircd_features.c Fri Jan 30 19:15:18 2009 +0100
-+++ b/ircd/ircd_features.c Sat Jan 31 13:55:37 2009 +0100
+diff -r 5ad24aad236d ircd/ircd_features.c
+--- a/ircd/ircd_features.c Sat Jan 31 14:38:44 2009 +0100
++++ b/ircd/ircd_features.c Sat Jan 31 15:25:32 2009 +0100
@@ -366,6 +366,10 @@
F_B(SETHOST_USER, 0, 0, 0),
F_B(SETHOST_AUTO, 0, 0, 0),
F_B(HIS_STATS_s, 0, 1, 0),
F_B(HIS_STATS_t, 0, 1, 0),
F_B(HIS_STATS_T, 0, 1, 0),
-diff -r f544944f62bd ircd/ircd_log.c
---- a/ircd/ircd_log.c Fri Jan 30 19:15:18 2009 +0100
-+++ b/ircd/ircd_log.c Sat Jan 31 13:55:37 2009 +0100
+diff -r 5ad24aad236d ircd/ircd_log.c
+--- a/ircd/ircd_log.c Sat Jan 31 14:38:44 2009 +0100
++++ b/ircd/ircd_log.c Sat Jan 31 15:25:32 2009 +0100
@@ -154,6 +154,7 @@
S(OPERMODE, -1, SNO_HACK4),
S(GLINE, -1, SNO_GLINE),
S(WHO, -1, 0),
S(NETWORK, -1, SNO_NETWORK),
S(OPERKILL, -1, 0),
-diff -r f544944f62bd ircd/m_endburst.c
---- a/ircd/m_endburst.c Fri Jan 30 19:15:18 2009 +0100
-+++ b/ircd/m_endburst.c Sat Jan 31 13:55:37 2009 +0100
+diff -r 5ad24aad236d ircd/m_endburst.c
+--- a/ircd/m_endburst.c Sat Jan 31 14:38:44 2009 +0100
++++ b/ircd/m_endburst.c Sat Jan 31 15:25:32 2009 +0100
@@ -85,6 +85,7 @@
#include "client.h"
#include "hash.h"
if (MyConnect(sptr))
sendcmdto_one(&me, CMD_END_OF_BURST_ACK, sptr, "");
-diff -r f544944f62bd ircd/m_reburst.c
---- a/ircd/m_reburst.c Fri Jan 30 19:15:18 2009 +0100
-+++ b/ircd/m_reburst.c Sat Jan 31 13:55:37 2009 +0100
+diff -r 5ad24aad236d ircd/m_reburst.c
+--- a/ircd/m_reburst.c Sat Jan 31 14:38:44 2009 +0100
++++ b/ircd/m_reburst.c Sat Jan 31 15:25:32 2009 +0100
@@ -102,6 +102,7 @@
#include "ircd_snprintf.h"
#include "gline.h"
default:
break;
}
-diff -r f544944f62bd ircd/m_server.c
---- a/ircd/m_server.c Fri Jan 30 19:15:18 2009 +0100
-+++ b/ircd/m_server.c Sat Jan 31 13:55:37 2009 +0100
+diff -r 5ad24aad236d ircd/m_server.c
+--- a/ircd/m_server.c Sat Jan 31 14:38:44 2009 +0100
++++ b/ircd/m_server.c Sat Jan 31 15:25:32 2009 +0100
@@ -47,6 +47,7 @@
#include "s_misc.h"
#include "s_serv.h"
/*
* Old sendto_serv_but_one() call removed because we now need to send
* different names to different servers (domain name matching).
-diff -r f544944f62bd ircd/m_split.c
+diff -r 5ad24aad236d ircd/m_split.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ b/ircd/m_split.c Sat Jan 31 13:55:37 2009 +0100
-@@ -0,0 +1,402 @@
++++ b/ircd/m_split.c Sat Jan 31 15:25:32 2009 +0100
+@@ -0,0 +1,400 @@
+/*
+ * IRC - Internet Relay Chat, ircd/m_split.c
+ * Copyright (C) 1990 Jarkko Oikarinen and
+ */
+int ms_split(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
+{
-+ struct Client *acptr = 0;
+ struct Split *asplit = 0;
+ unsigned int flags = 0;
+ enum SplitAction action = SPLIT_MODIFY;
+ */
+int mo_split(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
+{
-+ struct Client *acptr = 0;
+ struct Split *asplit = 0;
+ unsigned int flags = 0;
+ enum SplitAction action = SPLIT_MODIFY;
+ /* looking for a match */
+ return split_list(sptr, parv[1]);
+}
-diff -r f544944f62bd ircd/parse.c
---- a/ircd/parse.c Fri Jan 30 19:15:18 2009 +0100
-+++ b/ircd/parse.c Sat Jan 31 13:55:37 2009 +0100
+diff -r 5ad24aad236d ircd/parse.c
+--- a/ircd/parse.c Sat Jan 31 14:38:44 2009 +0100
++++ b/ircd/parse.c Sat Jan 31 15:25:32 2009 +0100
@@ -506,6 +506,13 @@
{ m_unregistered, m_not_oper, ms_jupe, mo_jupe, m_ignore, mh_jupe }
},
MSG_OPMODE,
TOK_OPMODE,
0, MAXPARA, MFLG_SLOW, 0, NULL,
-diff -r f544944f62bd ircd/s_conf.c
---- a/ircd/s_conf.c Fri Jan 30 19:15:18 2009 +0100
-+++ b/ircd/s_conf.c Sat Jan 31 13:55:37 2009 +0100
+diff -r 5ad24aad236d ircd/s_conf.c
+--- a/ircd/s_conf.c Sat Jan 31 14:38:44 2009 +0100
++++ b/ircd/s_conf.c Sat Jan 31 15:25:32 2009 +0100
@@ -53,6 +53,7 @@
#include "s_debug.h"
#include "s_misc.h"
return ret;
}
-diff -r f544944f62bd ircd/s_debug.c
---- a/ircd/s_debug.c Fri Jan 30 19:15:18 2009 +0100
-+++ b/ircd/s_debug.c Sat Jan 31 13:55:37 2009 +0100
+diff -r 5ad24aad236d ircd/s_debug.c
+--- a/ircd/s_debug.c Sat Jan 31 14:38:44 2009 +0100
++++ b/ircd/s_debug.c Sat Jan 31 15:25:32 2009 +0100
@@ -48,6 +48,7 @@
#include "s_user.h"
#include "s_stats.h"
send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
":Hash: client %d(%zu), chan is the same", HASHSIZE,
-diff -r f544944f62bd ircd/s_err.c
---- a/ircd/s_err.c Fri Jan 30 19:15:18 2009 +0100
-+++ b/ircd/s_err.c Sat Jan 31 13:55:37 2009 +0100
+diff -r 5ad24aad236d ircd/s_err.c
+--- a/ircd/s_err.c Sat Jan 31 14:38:44 2009 +0100
++++ b/ircd/s_err.c Sat Jan 31 15:25:32 2009 +0100
@@ -490,7 +490,7 @@
/* 228 */
{ RPL_STATSQLINE, "Q %s :%s", "228" },
/* 511 */
{ ERR_SILELISTFULL, "%s :Your silence list is full", "511" },
/* 512 */
-diff -r f544944f62bd ircd/s_misc.c
---- a/ircd/s_misc.c Fri Jan 30 19:15:18 2009 +0100
-+++ b/ircd/s_misc.c Sat Jan 31 13:55:37 2009 +0100
+diff -r 5ad24aad236d ircd/s_misc.c
+--- a/ircd/s_misc.c Sat Jan 31 14:38:44 2009 +0100
++++ b/ircd/s_misc.c Sat Jan 31 15:25:32 2009 +0100
@@ -53,6 +53,7 @@
#include "s_stats.h"
#include "s_user.h"
}
/*
-diff -r f544944f62bd ircd/s_serv.c
---- a/ircd/s_serv.c Fri Jan 30 19:15:18 2009 +0100
-+++ b/ircd/s_serv.c Sat Jan 31 13:55:37 2009 +0100
+diff -r 5ad24aad236d ircd/s_serv.c
+--- a/ircd/s_serv.c Sat Jan 31 14:38:44 2009 +0100
++++ b/ircd/s_serv.c Sat Jan 31 15:25:32 2009 +0100
@@ -54,6 +54,7 @@
#include "s_misc.h"
#include "s_user.h"
welcome_burst(cptr);
/*
-diff -r f544944f62bd ircd/s_stats.c
---- a/ircd/s_stats.c Fri Jan 30 19:15:18 2009 +0100
-+++ b/ircd/s_stats.c Sat Jan 31 13:55:37 2009 +0100
+diff -r 5ad24aad236d ircd/s_stats.c
+--- a/ircd/s_stats.c Sat Jan 31 14:38:44 2009 +0100
++++ b/ircd/s_stats.c Sat Jan 31 15:25:32 2009 +0100
@@ -52,6 +52,7 @@
#include "s_stats.h"
#include "s_user.h"
stats_sline, 0,
"Spoofed hosts information." },
{ 'T', "motds", (STAT_FLAG_OPERFEAT | STAT_FLAG_CASESENS), FEAT_HIS_STATS_T,
-diff -r f544944f62bd ircd/split.c
+diff -r 5ad24aad236d ircd/split.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ b/ircd/split.c Sat Jan 31 13:55:37 2009 +0100
-@@ -0,0 +1,881 @@
++++ b/ircd/split.c Sat Jan 31 15:25:32 2009 +0100
+@@ -0,0 +1,873 @@
+/*
+ * IRC - Internet Relay Chat, ircd/split.c
+ * Copyright (C) 1990 Jarkko Oikarinen and
+#include "ircd_features.h"
+#include "ircd_log.h"
+#include "ircd_reply.h"
++#include "ircd_snprintf.h"
+#include "ircd_string.h"
+#include "list.h"
+#include "match.h"
+ /* update lastmod */
+ split->sp_lastmod = lastmod;
+
-+ /* update status */
-+ switch (action) {
+
+ /* activating split entry */
-+ case SPLIT_ACTIVATE:
++ if (action == SPLIT_ACTIVATE) {
+ split->sp_flags |= SPLIT_ACTIVE;
+ pos += ircd_snprintf(0, buf, sizeof(buf), " activating SPLIT");
-+ break;
++ }
+
+ /* deactivating split entry */
-+ case SPLIT_DEACTIVATE:
++ if (action == SPLIT_DEACTIVATE) {
+ split->sp_flags &= ~SPLIT_ACTIVE;
+ pos += ircd_snprintf(0, buf, sizeof(buf), " deactivating SPLIT");
-+ break;
-+
-+ /* no change to activity status */
-+ case SPLIT_MODIFY:
-+ break;
+ }
+
+
+int
+split_remove(struct Client *cptr, struct Client *sptr, struct Split *split, const char *reason)
+{
-+ unsigned int saveflags = 0;
-+
+ assert(NULL != cptr);
+ assert(NULL != sptr);
+ assert(NULL != split);