From: wiebe Date: Sat, 31 Jan 2009 14:47:57 +0000 (+0100) Subject: split.patch - removed unused variable acptr from mo_split ms_split - removed unused... X-Git-Url: https://jfr.im/git/irc/quakenet/snircd-patchqueue.git/commitdiff_plain/db56c824b2da486a487ba5864c88b450384b0518 split.patch - removed unused variable acptr from mo_split ms_split - removed unused #define SPLIT_MODIFY - removed unused variable saveflags from split_remove - changed switch action to if conditions in split.c:378 --- diff --git a/split.patch b/split.patch index 2ac5fa3..e5b994c 100644 --- a/split.patch +++ b/split.patch @@ -7,9 +7,9 @@ Add split.c split.h m_split.c 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 @@ @@ -19,9 +19,9 @@ diff -r f544944f62bd doc/api/log.txt 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*[]); @@ -46,9 +46,9 @@ diff -r f544944f62bd include/handlers.h 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, @@ -76,9 +76,9 @@ diff -r f544944f62bd include/ircd_features.h 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. */ @@ -87,9 +87,9 @@ diff -r f544944f62bd include/ircd_log.h 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 @@ -101,9 +101,9 @@ diff -r f544944f62bd include/msg.h #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 */ @@ -129,10 +129,10 @@ diff -r f544944f62bd include/numeric.h #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 +/* @@ -206,7 +206,6 @@ diff -r f544944f62bd include/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) @@ -243,9 +242,9 @@ diff -r f544944f62bd include/split.h +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 \ @@ -303,9 +302,9 @@ diff -r f544944f62bd ircd/Makefile.in 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" @@ -324,9 +323,9 @@ diff -r f544944f62bd ircd/ircd.c 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), @@ -354,9 +353,9 @@ diff -r f544944f62bd ircd/ircd_features.c 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), @@ -365,9 +364,9 @@ diff -r f544944f62bd ircd/ircd_log.c 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" @@ -403,9 +402,9 @@ diff -r f544944f62bd ircd/m_endburst.c 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" @@ -425,9 +424,9 @@ diff -r f544944f62bd ircd/m_reburst.c 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" @@ -446,10 +445,10 @@ diff -r f544944f62bd ircd/m_server.c /* * 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 @@ -568,7 +567,6 @@ diff -r f544944f62bd ircd/m_split.c + */ +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; @@ -687,7 +685,6 @@ diff -r f544944f62bd ircd/m_split.c + */ +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; @@ -852,9 +849,9 @@ diff -r f544944f62bd ircd/m_split.c + /* 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 } }, @@ -869,9 +866,9 @@ diff -r f544944f62bd ircd/parse.c 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" @@ -888,9 +885,9 @@ diff -r f544944f62bd ircd/s_conf.c 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" @@ -928,9 +925,9 @@ diff -r f544944f62bd ircd/s_debug.c 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" }, @@ -961,9 +958,9 @@ diff -r f544944f62bd ircd/s_err.c /* 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" @@ -996,9 +993,9 @@ diff -r f544944f62bd ircd/s_misc.c } /* -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" @@ -1015,9 +1012,9 @@ diff -r f544944f62bd ircd/s_serv.c 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" @@ -1038,10 +1035,10 @@ diff -r f544944f62bd ircd/s_stats.c 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 @@ -1075,6 +1072,7 @@ diff -r f544944f62bd ircd/split.c +#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" @@ -1417,24 +1415,17 @@ diff -r f544944f62bd ircd/split.c + /* 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; + } + + @@ -1498,8 +1489,6 @@ diff -r f544944f62bd ircd/split.c +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);