NOTE: feature SPLIT is default enabled as that is just easier when working on this patch.
-diff -r 66ed26620ed2 doc/api/log.txt
---- a/doc/api/log.txt Mon Jan 26 12:32:39 2009 +0100
-+++ b/doc/api/log.txt Mon Jan 26 12:35:59 2009 +0100
+diff -r 3ab25cd90c2e doc/api/log.txt
+--- a/doc/api/log.txt Tue Jan 27 20:50:02 2009 +0100
++++ b/doc/api/log.txt Tue Jan 27 21:14:37 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 66ed26620ed2 include/handlers.h
---- a/include/handlers.h Mon Jan 26 12:32:39 2009 +0100
-+++ b/include/handlers.h Mon Jan 26 12:35:59 2009 +0100
+diff -r 3ab25cd90c2e include/handlers.h
+--- a/include/handlers.h Tue Jan 27 20:50:02 2009 +0100
++++ b/include/handlers.h Tue Jan 27 21:14:37 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 m_stats(struct Client*, struct Client*, int, char*[]);
extern int m_time(struct Client*, struct Client*, int, char*[]);
extern int m_topic(struct Client*, struct Client*, int, char*[]);
-@@ -178,6 +179,7 @@
+@@ -179,6 +180,7 @@
extern int mo_rping(struct Client*, struct Client*, int, char*[]);
extern int mo_set(struct Client*, struct Client*, int, char*[]);
extern int mo_settime(struct Client*, struct Client*, int, char*[]);
extern int mo_squit(struct Client*, struct Client*, int, char*[]);
extern int mo_stats(struct Client*, struct Client*, int, char*[]);
extern int mo_trace(struct Client*, struct Client*, int, char*[]);
-@@ -232,6 +234,7 @@
+@@ -234,6 +236,7 @@
extern int ms_sethost(struct Client*, struct Client*, int, char*[]);
extern int ms_settime(struct Client*, struct Client*, int, char*[]);
extern int ms_silence(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 66ed26620ed2 include/ircd_features.h
---- a/include/ircd_features.h Mon Jan 26 12:32:39 2009 +0100
-+++ b/include/ircd_features.h Mon Jan 26 12:35:59 2009 +0100
-@@ -111,6 +111,10 @@
+diff -r 3ab25cd90c2e include/ircd_features.h
+--- a/include/ircd_features.h Tue Jan 27 20:50:02 2009 +0100
++++ b/include/ircd_features.h Tue Jan 27 21:14:37 2009 +0100
+@@ -112,6 +112,10 @@
FEAT_SETHOST_USER,
FEAT_SETHOST_AUTO,
/* HEAD_IN_SAND Features */
FEAT_HIS_SNOTICES,
FEAT_HIS_SNOTICES_OPER_ONLY,
-@@ -138,6 +142,7 @@
+@@ -139,6 +143,7 @@
FEAT_HIS_STATS_q,
FEAT_HIS_STATS_R,
FEAT_HIS_STATS_r,
FEAT_HIS_STATS_s,
FEAT_HIS_STATS_t,
FEAT_HIS_STATS_T,
-diff -r 66ed26620ed2 include/ircd_log.h
---- a/include/ircd_log.h Mon Jan 26 12:32:39 2009 +0100
-+++ b/include/ircd_log.h Mon Jan 26 12:35:59 2009 +0100
+diff -r 3ab25cd90c2e include/ircd_log.h
+--- a/include/ircd_log.h Tue Jan 27 20:50:02 2009 +0100
++++ b/include/ircd_log.h Tue Jan 27 21:14:37 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 66ed26620ed2 include/msg.h
---- a/include/msg.h Mon Jan 26 12:32:39 2009 +0100
-+++ b/include/msg.h Mon Jan 26 12:35:59 2009 +0100
-@@ -332,6 +332,10 @@
+diff -r 3ab25cd90c2e include/msg.h
+--- a/include/msg.h Tue Jan 27 20:50:02 2009 +0100
++++ b/include/msg.h Tue Jan 27 21:14:37 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 66ed26620ed2 include/numeric.h
---- a/include/numeric.h Mon Jan 26 12:32:39 2009 +0100
-+++ b/include/numeric.h Mon Jan 26 12:35:59 2009 +0100
-@@ -117,6 +117,7 @@
- RPL_STATSVLINE 227 unreal */
+diff -r 3ab25cd90c2e include/numeric.h
+--- a/include/numeric.h Tue Jan 27 20:50:02 2009 +0100
++++ b/include/numeric.h Tue Jan 27 21:14:37 2009 +0100
+@@ -118,6 +118,7 @@
#define RPL_STATSALINE 226 /* Hybrid, Undernet */
+ #define RPL_STATSWELCOME 227 /* QuakeNet extension */
#define RPL_STATSQLINE 228 /* Undernet extension */
+#define RPL_STATSSPLIT 229 /* QuakeNet extension */
#define RPL_STATSHEADER 230 /* QuakeNet extension */
/* RPL_SERVICEINFO 231 unused */
-@@ -178,6 +179,8 @@
+@@ -179,6 +180,8 @@
#define RPL_STATSDLINE 275 /* Undernet extension */
#define RPL_STATSRLINE 276 /* Undernet extension */
#define RPL_GLIST 280 /* Undernet extension */
#define RPL_ENDOFGLIST 281 /* Undernet extension */
#define RPL_JUPELIST 282 /* Undernet extension - jupe -Kev */
-@@ -442,6 +445,7 @@
- /* ERR_GHOSTEDCLIENT 503 efnet */
- /* ERR_VWORLDWARN 503 austnet */
+@@ -449,6 +452,7 @@
+
+ #define ERR_NOSUCHWELCOME 509 /* QuakeNet extension */
+#define ERR_NOSUCHSPLIT 510 /* QuakeNet extension */
#define ERR_SILELISTFULL 511 /* Undernet extension */
/* ERR_NOTIFYFULL 512 aircd */
/* ERR_TOOMANYWATCH 512 Numeric List: Dalnet */
-diff -r 66ed26620ed2 include/split.h
+diff -r 3ab25cd90c2e include/split.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ b/include/split.h Mon Jan 26 12:35:59 2009 +0100
++++ b/include/split.h Tue Jan 27 21:14:37 2009 +0100
@@ -0,0 +1,106 @@
+#ifndef INCLUDED_split_h
+#define INCLUDED_split_h
+extern int split_memory_count(size_t *sp_size);
+
+#endif /* INCLUDED_split_h */
-diff -r 66ed26620ed2 ircd/Makefile.in
---- a/ircd/Makefile.in Mon Jan 26 12:32:39 2009 +0100
-+++ b/ircd/Makefile.in Mon Jan 26 12:35:59 2009 +0100
+diff -r 3ab25cd90c2e ircd/Makefile.in
+--- a/ircd/Makefile.in Tue Jan 27 20:50:02 2009 +0100
++++ b/ircd/Makefile.in Tue Jan 27 21:14:37 2009 +0100
@@ -173,6 +173,7 @@
m_sethost.c \
m_settime.c \
m_squit.c \
m_stats.c \
m_time.c \
-@@ -212,6 +213,7 @@
+@@ -213,6 +214,7 @@
s_stats.c \
s_user.c \
send.c \
+ split.c \
uping.c \
userload.c \
- whocmds.c \
-@@ -1052,6 +1054,15 @@
+ welcome.c \
+@@ -1054,6 +1056,15 @@
../include/ircd_chattr.h ../include/list.h ../include/msg.h \
../include/numeric.h ../include/numnicks.h ../include/s_user.h \
../include/send.h ../include/struct.h
m_squit.o: m_squit.c ../config.h ../include/client.h \
../include/ircd_defs.h ../include/dbuf.h ../include/msgq.h \
../include/ircd_events.h ../config.h ../include/ircd_handler.h \
-@@ -1325,6 +1336,7 @@
+@@ -1332,6 +1343,7 @@
../include/msgq.h ../include/numeric.h ../include/numnicks.h \
../include/res.h ../include/s_bsd.h ../include/s_conf.h \
../include/s_user.h ../include/s_stats.h ../include/send.h \
../include/struct.h ../include/sys.h ../include/whowas.h
s_err.o: s_err.c ../config.h ../include/numeric.h ../include/ircd_log.h \
../include/s_debug.h ../config.h ../include/ircd_defs.h
-@@ -1410,6 +1422,16 @@
+@@ -1417,6 +1429,16 @@
../include/msg.h ../include/numnicks.h ../include/parse.h \
../include/s_bsd.h ../include/s_debug.h ../include/s_misc.h \
../include/s_user.h ../include/struct.h ../include/sys.h
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 66ed26620ed2 ircd/ircd.c
---- a/ircd/ircd.c Mon Jan 26 12:32:39 2009 +0100
-+++ b/ircd/ircd.c Mon Jan 26 12:35:59 2009 +0100
+diff -r 3ab25cd90c2e ircd/ircd.c
+--- a/ircd/ircd.c Tue Jan 27 20:50:02 2009 +0100
++++ b/ircd/ircd.c Tue Jan 27 21:14:37 2009 +0100
@@ -55,6 +55,7 @@
#include "s_misc.h"
#include "s_stats.h"
event_loop();
return 0;
-diff -r 66ed26620ed2 ircd/ircd_features.c
---- a/ircd/ircd_features.c Mon Jan 26 12:32:39 2009 +0100
-+++ b/ircd/ircd_features.c Mon Jan 26 12:35:59 2009 +0100
-@@ -365,6 +365,10 @@
+diff -r 3ab25cd90c2e ircd/ircd_features.c
+--- a/ircd/ircd_features.c Tue Jan 27 20:50:02 2009 +0100
++++ b/ircd/ircd_features.c Tue Jan 27 21:14:37 2009 +0100
+@@ -366,6 +366,10 @@
F_B(SETHOST_USER, 0, 0, 0),
F_B(SETHOST_AUTO, 0, 0, 0),
/* HEAD_IN_SAND Features */
F_B(HIS_SNOTICES, 0, 1, 0),
F_B(HIS_SNOTICES_OPER_ONLY, 0, 1, 0),
-@@ -392,6 +396,7 @@
+@@ -393,6 +397,7 @@
F_B(HIS_STATS_q, 0, 1, 0),
F_B(HIS_STATS_R, 0, 1, 0),
F_B(HIS_STATS_r, 0, 1, 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 66ed26620ed2 ircd/ircd_log.c
---- a/ircd/ircd_log.c Mon Jan 26 12:32:39 2009 +0100
-+++ b/ircd/ircd_log.c Mon Jan 26 12:35:59 2009 +0100
+diff -r 3ab25cd90c2e ircd/ircd_log.c
+--- a/ircd/ircd_log.c Tue Jan 27 20:50:02 2009 +0100
++++ b/ircd/ircd_log.c Tue Jan 27 21:14:37 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 66ed26620ed2 ircd/m_endburst.c
---- a/ircd/m_endburst.c Mon Jan 26 12:32:39 2009 +0100
-+++ b/ircd/m_endburst.c Mon Jan 26 12:35:59 2009 +0100
+diff -r 3ab25cd90c2e ircd/m_endburst.c
+--- a/ircd/m_endburst.c Tue Jan 27 20:50:02 2009 +0100
++++ b/ircd/m_endburst.c Tue Jan 27 21:14:37 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 66ed26620ed2 ircd/m_reburst.c
---- a/ircd/m_reburst.c Mon Jan 26 12:32:39 2009 +0100
-+++ b/ircd/m_reburst.c Mon Jan 26 12:35:59 2009 +0100
+diff -r 3ab25cd90c2e ircd/m_reburst.c
+--- a/ircd/m_reburst.c Tue Jan 27 20:50:02 2009 +0100
++++ b/ircd/m_reburst.c Tue Jan 27 21:14:37 2009 +0100
@@ -102,6 +102,7 @@
#include "ircd_snprintf.h"
#include "gline.h"
default:
break;
}
-diff -r 66ed26620ed2 ircd/m_server.c
---- a/ircd/m_server.c Mon Jan 26 12:32:39 2009 +0100
-+++ b/ircd/m_server.c Mon Jan 26 12:35:59 2009 +0100
+diff -r 3ab25cd90c2e ircd/m_server.c
+--- a/ircd/m_server.c Tue Jan 27 20:50:02 2009 +0100
++++ b/ircd/m_server.c Tue Jan 27 21:14:37 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 66ed26620ed2 ircd/m_split.c
+diff -r 3ab25cd90c2e ircd/m_split.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ b/ircd/m_split.c Mon Jan 26 12:35:59 2009 +0100
-@@ -0,0 +1,376 @@
++++ b/ircd/m_split.c Tue Jan 27 21:14:37 2009 +0100
+@@ -0,0 +1,378 @@
+/*
+ * IRC - Internet Relay Chat, ircd/m_split.c
+ * Copyright (C) 1990 Jarkko Oikarinen and
+ unsigned int flags = 0;
+ enum SplitAction action = SPLIT_MODIFY;
+ time_t creation = 0, expire = 0, lastmod = 0, lifetime = 0;
-+ char *server = 0, *tmp = 0;
++ char *server;
+ const char *reason = "No reason";
+
+ /* reason is optional - for lazy services, we always send it */
+ if (parc < 5)
+ return need_more_params(sptr, "SPLIT");
+
++ /* server param */
++ server = parv[1];
++
+ if (*server == '!') {
+ server++;
+ action = SPLIT_REMOVE; /* removing entry */
+ }
+
+ /* Next, try to find the split entry... */
-+ server = parv[1];
+ asplit = split_find(server);
+
+ /* We now have all the pieces to tell us what we've got; let's put
+
+ return split_list(sptr, parv[1]);
+}
-diff -r 66ed26620ed2 ircd/parse.c
---- a/ircd/parse.c Mon Jan 26 12:32:39 2009 +0100
-+++ b/ircd/parse.c Mon Jan 26 12:35:59 2009 +0100
+diff -r 3ab25cd90c2e ircd/parse.c
+--- a/ircd/parse.c Tue Jan 27 20:50:02 2009 +0100
++++ b/ircd/parse.c Tue Jan 27 21:14:37 2009 +0100
@@ -505,6 +505,13 @@
/* UNREG, CLIENT, SERVER, OPER, SERVICE, HELP */
{ m_unregistered, m_not_oper, ms_jupe, mo_jupe, m_ignore, mh_jupe }
{
MSG_OPMODE,
TOK_OPMODE,
-diff -r 66ed26620ed2 ircd/s_conf.c
---- a/ircd/s_conf.c Mon Jan 26 12:32:39 2009 +0100
-+++ b/ircd/s_conf.c Mon Jan 26 12:35:59 2009 +0100
+diff -r 3ab25cd90c2e ircd/s_conf.c
+--- a/ircd/s_conf.c Tue Jan 27 20:50:02 2009 +0100
++++ b/ircd/s_conf.c Tue Jan 27 21:14:37 2009 +0100
@@ -53,6 +53,7 @@
#include "s_debug.h"
#include "s_misc.h"
return ret;
}
-diff -r 66ed26620ed2 ircd/s_debug.c
---- a/ircd/s_debug.c Mon Jan 26 12:32:39 2009 +0100
-+++ b/ircd/s_debug.c Mon Jan 26 12:35:59 2009 +0100
+diff -r 3ab25cd90c2e ircd/s_debug.c
+--- a/ircd/s_debug.c Tue Jan 27 20:50:02 2009 +0100
++++ b/ircd/s_debug.c Tue Jan 27 21:14:37 2009 +0100
@@ -48,6 +48,7 @@
#include "s_user.h"
#include "s_stats.h"
+#include "split.h"
#include "struct.h"
#include "sys.h"
- #include "whowas.h"
-@@ -231,7 +232,8 @@
- aw = 0, /* aways set */
+ #include "welcome.h"
+@@ -233,6 +234,7 @@
wwa = 0, /* whowas aways */
gl = 0, /* glines */
-- ju = 0; /* jupes */
-+ ju = 0, /* jupes */
-+ sp = 0; /* split entries */
+ ju = 0, /* jupes */
++ sp = 0, /* split entries */
+ we = 0; /* welcome messages */
size_t chm = 0, /* memory used by channels */
- chbm = 0, /* memory used by channel bans */
-@@ -244,6 +246,7 @@
+@@ -246,6 +248,7 @@
wwm = 0, /* whowas array memory used */
glm = 0, /* memory used by glines */
jum = 0, /* memory used by jupes */
+ spm = 0, /* memory used by split entries */
+ wem = 0, /* memory used by welcome messages */
com = 0, /* memory used by conf lines */
dbufs_allocated = 0, /* memory used by dbufs */
- dbufs_used = 0, /* memory used by dbufs */
-@@ -348,8 +351,9 @@
+@@ -351,10 +354,11 @@
gl = gline_memory_count(&glm);
ju = jupe_memory_count(&jum);
+ sp = split_memory_count(&spm);
+ we = welcome_memory_count(&wem);
send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
-- ":Glines %d(%zu) Jupes %d(%zu)", gl, glm, ju, jum);
-+ ":Glines %d(%zu) Jupes %d(%zu) Splits %d(%zu)", gl, glm, ju, jum, sp, spm);
+- ":Glines %d(%zu) Jupes %d(%zu) WelcomeMessages %d(%zu)",
+- gl, glm, ju, jum, we, wem);
++ ":Glines %d(%zu) Jupes %d(%zu) Splits %d(%zu) WelcomeMessages %d(%zu)",
++ gl, glm, ju, jum, sp, spm, we, wem);
send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
":Hash: client %d(%zu), chan is the same", HASHSIZE,
-diff -r 66ed26620ed2 ircd/s_err.c
---- a/ircd/s_err.c Mon Jan 26 12:32:39 2009 +0100
-+++ b/ircd/s_err.c Mon Jan 26 12:35:59 2009 +0100
+diff -r 3ab25cd90c2e ircd/s_err.c
+--- a/ircd/s_err.c Tue Jan 27 20:50:02 2009 +0100
++++ b/ircd/s_err.c Tue Jan 27 21:14:37 2009 +0100
@@ -490,7 +490,7 @@
/* 228 */
{ RPL_STATSQLINE, "Q %s :%s", "228" },
/* 281 */
@@ -1052,7 +1052,7 @@
/* 509 */
- { 0 },
+ { ERR_NOSUCHWELCOME, "%s :No such welcome", "509" },
/* 510 */
- { 0 },
+ { ERR_NOSUCHSPLIT, "%s :No such split", "510" },
/* 511 */
{ ERR_SILELISTFULL, "%s :Your silence list is full", "511" },
/* 512 */
-diff -r 66ed26620ed2 ircd/s_misc.c
---- a/ircd/s_misc.c Mon Jan 26 12:32:39 2009 +0100
-+++ b/ircd/s_misc.c Mon Jan 26 12:35:59 2009 +0100
+diff -r 3ab25cd90c2e ircd/s_misc.c
+--- a/ircd/s_misc.c Tue Jan 27 20:50:02 2009 +0100
++++ b/ircd/s_misc.c Tue Jan 27 21:14:37 2009 +0100
@@ -53,6 +53,7 @@
#include "s_stats.h"
#include "s_user.h"
}
/*
-diff -r 66ed26620ed2 ircd/s_serv.c
---- a/ircd/s_serv.c Mon Jan 26 12:32:39 2009 +0100
-+++ b/ircd/s_serv.c Mon Jan 26 12:35:59 2009 +0100
+diff -r 3ab25cd90c2e ircd/s_serv.c
+--- a/ircd/s_serv.c Tue Jan 27 20:50:02 2009 +0100
++++ b/ircd/s_serv.c Tue Jan 27 21:14:37 2009 +0100
@@ -54,6 +54,7 @@
#include "s_misc.h"
#include "s_user.h"
#include "struct.h"
#include "sys.h"
#include "userload.h"
-@@ -196,6 +197,7 @@
+@@ -197,6 +198,7 @@
*/
gline_burst(cptr);
jupe_burst(cptr);
+ split_burst(cptr);
+ welcome_burst(cptr);
/*
- * Pass on my client information to the new server
-diff -r 66ed26620ed2 ircd/s_stats.c
---- a/ircd/s_stats.c Mon Jan 26 12:32:39 2009 +0100
-+++ b/ircd/s_stats.c Mon Jan 26 12:35:59 2009 +0100
+diff -r 3ab25cd90c2e ircd/s_stats.c
+--- a/ircd/s_stats.c Tue Jan 27 20:50:02 2009 +0100
++++ b/ircd/s_stats.c Tue Jan 27 21:14:37 2009 +0100
@@ -52,6 +52,7 @@
#include "s_stats.h"
#include "s_user.h"
+#include "split.h"
#include "struct.h"
#include "userload.h"
-
-@@ -668,7 +669,10 @@
+ #include "welcome.h"
+@@ -669,7 +670,10 @@
send_usage, 0,
"System resource usage (Debug only)." },
#endif
stats_sline, 0,
"Spoofed hosts information." },
{ 'T', "motds", (STAT_FLAG_OPERFEAT | STAT_FLAG_CASESENS), FEAT_HIS_STATS_T,
-diff -r 66ed26620ed2 ircd/split.c
+diff -r 3ab25cd90c2e ircd/split.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ b/ircd/split.c Mon Jan 26 12:35:59 2009 +0100
++++ b/ircd/split.c Tue Jan 27 21:14:37 2009 +0100
@@ -0,0 +1,786 @@
+/*
+ * IRC - Internet Relay Chat, ircd/split.c