Author: Alex Badea <vampire@p16.pub.ro>
authorPerry Lorier <isomer@undernet.org>
Tue, 2 Apr 2002 05:04:04 +0000 (05:04 +0000)
committerPerry Lorier <isomer@undernet.org>
Tue, 2 Apr 2002 05:04:04 +0000 (05:04 +0000)
Log message:

""Example"" Patches

git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@699 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

patches/diffs/astralnet.diff [new file with mode: 0644]
patches/diffs/nocfv.diff [new file with mode: 0644]
patches/diffs/topicburst.diff [new file with mode: 0644]

diff --git a/patches/diffs/astralnet.diff b/patches/diffs/astralnet.diff
new file mode 100644 (file)
index 0000000..25e8c3d
--- /dev/null
@@ -0,0 +1,11 @@
+--- ../ircu2.10.11/include/ircd_defs.h Mon Jan 21 19:03:11 2002
++++ include/ircd_defs.h        Wed Feb 27 14:09:51 2002
+@@ -32,7 +32,7 @@
+ /*
+  * NETWORK is the name the server claims the network is
+  */
+-#define NETWORK "UnderNet"
++#define NETWORK "AstralNet"
+ /* 
+  * URL_CLIENTS is a URL to where to find compatible clients
diff --git a/patches/diffs/nocfv.diff b/patches/diffs/nocfv.diff
new file mode 100644 (file)
index 0000000..d2486fd
--- /dev/null
@@ -0,0 +1,149 @@
+diff -ur ../ircu2.10.11/include/ircd_policy.h ./include/ircd_policy.h
+--- ../ircu2.10.11/include/ircd_policy.h       Thu Sep 20 13:55:14 2001
++++ ./include/ircd_policy.h    Wed Feb 27 14:12:12 2002
+@@ -38,8 +38,8 @@
+  *
+  * This is implemented as disallowing users from setting +s
+  */
+-#define HEAD_IN_SAND_SNOTICES
+-#define SERVNOTICE_OPER_ONLY
++#undef HEAD_IN_SAND_SNOTICES
++#undef SERVNOTICE_OPER_ONLY
+ /* CFV-165 - Hiding Nonessential information from non-opers
+  * 
+@@ -48,8 +48,8 @@
+  * This is implemented by making all server wallops DESYNC's, and removing
+  * +g from normal users.
+  */
+-#define HEAD_IN_SAND_DESYNCS
+-#define DEBUG_OPER_ONLY
++#undef HEAD_IN_SAND_DESYNCS
++#undef DEBUG_OPER_ONLY
+ /* CFV-165 - Hiding Nonessential information from non-opers
+  * 
+@@ -57,7 +57,7 @@
+  *
+  * This is implemented as disallowing users from setting +w
+  */
+-#define HEAD_IN_SAND_WALLOPS
++#undef HEAD_IN_SAND_WALLOPS
+ /* #define WALLOPS_OPER_ONLY */
+ /* CFV-165 - Hiding Nonessential information from non-opers
+@@ -65,13 +65,13 @@
+  * 5) Removal of /MAP from users.
+  *
+  */
+-#define HEAD_IN_SAND_MAP
++#undef HEAD_IN_SAND_MAP
+ /* CFV-165 - Hiding Nonessential information from non-opers
+  * 
+  * 6) Removal of links from users
+  */
+-#define HEAD_IN_SAND_LINKS
++#undef HEAD_IN_SAND_LINKS
+ /* CFV-165 - Hiding Nonessential information from non-opers
+  *
+@@ -82,66 +82,66 @@
+  *
+  * 8) Removal of /TRACE from users.
+  */
+-#define HEAD_IN_SAND_TRACE
++#undef HEAD_IN_SAND_TRACE
+ /* CFV-165 - Hiding Nonessential information from non-opers
+  *
+  * 9-13) Removal of various stats from non users
+  */
+-#define HEAD_IN_SAND_STATS_L
+-#define HEAD_IN_SAND_STATS_C
+-#define HEAD_IN_SAND_STATS_G
+-#define HEAD_IN_SAND_STATS_H
+-#define HEAD_IN_SAND_STATS_K
+-#define HEAD_IN_SAND_STATS_F
+-#define HEAD_IN_SAND_STATS_I
+-#define HEAD_IN_SAND_STATS_M
+-#define HEAD_IN_SAND_STATS_m
+-#define HEAD_IN_SAND_STATS_O
+-#define HEAD_IN_SAND_STATS_P
+-#define HEAD_IN_SAND_STATS_R
+-#define HEAD_IN_SAND_STATS_D
+-#define HEAD_IN_SAND_STATS_d
+-#define HEAD_IN_SAND_STATS_E
+-#define HEAD_IN_SAND_STATS_t
+-#define HEAD_IN_SAND_STATS_T
+-#define HEAD_IN_SAND_STATS_U
+-#undef  HEAD_IN_SAND_STATS_u
+-#undef  HEAD_IN_SAND_STATS_W
+-#define HEAD_IN_SAND_STATS_X
+-#define HEAD_IN_SAND_STATS_Y
+-#define HEAD_IN_SAND_STATS_Z
++#undef HEAD_IN_SAND_STATS_L
++#undef HEAD_IN_SAND_STATS_C
++#undef HEAD_IN_SAND_STATS_G
++#undef HEAD_IN_SAND_STATS_H
++#undef HEAD_IN_SAND_STATS_K
++#undef HEAD_IN_SAND_STATS_F
++#undef HEAD_IN_SAND_STATS_I
++#undef HEAD_IN_SAND_STATS_M
++#undef HEAD_IN_SAND_STATS_m
++#undef HEAD_IN_SAND_STATS_O
++#undef HEAD_IN_SAND_STATS_P
++#undef HEAD_IN_SAND_STATS_R
++#undef HEAD_IN_SAND_STATS_D
++#undef HEAD_IN_SAND_STATS_d
++#undef HEAD_IN_SAND_STATS_E
++#undef HEAD_IN_SAND_STATS_t
++#undef HEAD_IN_SAND_STATS_T
++#undef HEAD_IN_SAND_STATS_U
++#undef HEAD_IN_SAND_STATS_u
++#undef HEAD_IN_SAND_STATS_W
++#undef HEAD_IN_SAND_STATS_X
++#undef HEAD_IN_SAND_STATS_Y
++#undef HEAD_IN_SAND_STATS_Z
+ /* CFV-165 - Hiding Nonessential information from non-opers
+  *
+  * 14) Removal of server names in net break sign-offs.
+  */
+-#define HEAD_IN_SAND_NETSPLIT
++#undef HEAD_IN_SAND_NETSPLIT
+ /* CFV-165 - Hiding Nonessential information from non-opers
+  * 
+  * 15) Removal of server names in replies to /WHOIS
+  */
+-#define HEAD_IN_SAND_WHOIS_SERVERNAME
+-#define HEAD_IN_SAND_WHOIS_IDLETIME
+-#define HEAD_IN_SAND_WHO_SERVERNAME
+-#define HEAD_IN_SAND_WHO_HOPCOUNT
++#undef HEAD_IN_SAND_WHOIS_SERVERNAME
++#undef HEAD_IN_SAND_WHOIS_IDLETIME
++#undef HEAD_IN_SAND_WHO_SERVERNAME
++#undef HEAD_IN_SAND_WHO_HOPCOUNT
+ /* CFV-165 - Hiding Nonessential information from non-opers
+  *
+  */
+ /* don't show which server set a ban */
+-#define HEAD_IN_SAND_BANWHO
++#undef HEAD_IN_SAND_BANWHO
+ /* remap remote numerics to come from the local server */
+-#define HEAD_IN_SAND_REWRITE
++#undef HEAD_IN_SAND_REWRITE
+ /* disallow remote queries (*sob!*) */
+ /* (note, set this to 0 to reenable, not undef */
+-#define HEAD_IN_SAND_REMOTE 1
++#define HEAD_IN_SAND_REMOTE 0
+ #define HEAD_IN_SAND_SERVERNAME "*.undernet.org"
+ #define HEAD_IN_SAND_SERVERINFO "The Undernet Underworld"
diff --git a/patches/diffs/topicburst.diff b/patches/diffs/topicburst.diff
new file mode 100644 (file)
index 0000000..0e4a4f3
--- /dev/null
@@ -0,0 +1,181 @@
+Index: doc/example.conf
+===================================================================
+RCS file: /home/coder-com/cvs/ircu2.10/doc/example.conf,v
+retrieving revision 1.15.2.3
+diff -u -r1.15.2.3 example.conf
+--- doc/example.conf   2002/02/04 22:06:11     1.15.2.3
++++ doc/example.conf   2002/02/11 09:17:57
+@@ -455,6 +455,7 @@
+ # F:NICKNAMEHISTORYLENGTH:800
+ # F:HOST_HIDING:FALSE
+ # F:HIDDEN_HOST:users.undernet.org
++# F:TOPIC_BURST:FALSE
+ # F:KILLCHASETIMELIMIT:30
+ # F:MAXCHANNELSPERUSER:10
+ # F:AVBANLEN:40
+Index: doc/readme.features
+===================================================================
+RCS file: /home/coder-com/cvs/ircu2.10/doc/readme.features,v
+retrieving revision 1.2.2.3
+diff -u -r1.2.2.3 readme.features
+--- doc/readme.features        2002/02/04 22:06:11     1.2.2.3
++++ doc/readme.features        2002/02/11 09:18:35
+@@ -235,6 +235,13 @@
+ This selects the suffix for the hidden hostmask (see HOST_HIDING).
++TOPIC_BURST
++ * Type: boolean
++ * Default: FALSE
++
++This selects whether topics are *sent* to other servers durring a burst.
++Note that receiving topics from servers is always enabled.
++
+ KILLCHASETIMELIMIT
+  * Type: integer
+  * Default: 30
+Index: include/ircd_features.h
+===================================================================
+RCS file: /home/coder-com/cvs/ircu2.10/include/ircd_features.h,v
+retrieving revision 1.11.2.3
+diff -u -r1.11.2.3 ircd_features.h
+--- include/ircd_features.h    2002/02/04 22:06:11     1.11.2.3
++++ include/ircd_features.h    2002/02/11 09:18:35
+@@ -44,6 +44,7 @@
+   FEAT_NICKNAMEHISTORYLENGTH,
+   FEAT_HOST_HIDING,
+   FEAT_HIDDEN_HOST,
++  FEAT_TOPIC_BURST,
+   /* features that probably should not be touched */
+   FEAT_KILLCHASETIMELIMIT,
+Index: ircd/channel.c
+===================================================================
+RCS file: /home/coder-com/cvs/ircu2.10/ircd/channel.c,v
+retrieving revision 1.73.2.5
+diff -u -r1.73.2.5 channel.c
+--- ircd/channel.c     2002/02/03 20:31:46     1.73.2.5
++++ ircd/channel.c     2002/02/11 09:23:28
+@@ -844,6 +844,10 @@
+     msgq_clean(mb);
+   }                             /* Continue when there was something
+                                  that didn't fit (full==1) */
++
++  if (feature_bool(FEAT_TOPIC_BURST) && *chptr->topic)
++    sendcmdto_one(&me, CMD_TOPIC, cptr, "%H %Tu :%s", chptr,
++                chptr->topic_time, chptr->topic);
+ }
+ /*
+Index: ircd/ircd_features.c
+===================================================================
+RCS file: /home/coder-com/cvs/ircu2.10/ircd/ircd_features.c,v
+retrieving revision 1.15.2.3
+diff -u -r1.15.2.3 ircd_features.c
+--- ircd/ircd_features.c       2002/02/04 22:06:11     1.15.2.3
++++ ircd/ircd_features.c       2002/02/11 09:23:30
+@@ -251,6 +251,7 @@
+   F_I(NICKNAMEHISTORYLENGTH, 0, 800, whowas_realloc),
+   F_B(HOST_HIDING, 0, 0, 0),
+   F_S(HIDDEN_HOST, FEAT_CASE, "users.undernet.org", 0),
++  F_B(TOPIC_BURST, 0, 0, 0),
+   /* features that probably should not be touched */
+   F_I(KILLCHASETIMELIMIT, 0, 30, 0),
+Index: ircd/m_topic.c
+===================================================================
+RCS file: /home/coder-com/cvs/ircu2.10/ircd/m_topic.c,v
+retrieving revision 1.9.2.1
+diff -u -r1.9.2.1 m_topic.c
+--- ircd/m_topic.c     2002/02/03 20:31:46     1.9.2.1
++++ ircd/m_topic.c     2002/02/11 09:23:30
+@@ -86,6 +86,7 @@
+ #include "hash.h"
+ #include "ircd.h"
+ #include "ircd_reply.h"
++#include "ircd_policy.h"
+ #include "ircd_string.h"
+ #include "msg.h"
+ #include "numeric.h"
+@@ -93,17 +94,24 @@
+ #include "send.h"
+ #include <assert.h>
++#include <stdlib.h>
+ static void do_settopic(struct Client *sptr, struct Client *cptr, 
+-                      struct Channel *chptr,char *topic)
++                      struct Channel *chptr, char *topic, time_t ts)
+ {
+    int newtopic;
++   struct Client *from;
+    /* if +n and not @'d, return an error and ignore the topic */
+-   if ((chptr->mode.mode & MODE_TOPICLIMIT) != 0 && !is_chan_op(sptr, chptr)) 
++   if (!IsServer(sptr) && (chptr->mode.mode & MODE_TOPICLIMIT) != 0 && !is_chan_op(sptr, chptr)) 
+    {
+       send_reply(sptr, ERR_CHANOPRIVSNEEDED, chptr->chname);
+       return;
+    }
++#ifdef HEAD_IN_SAND_BANWHO    /* Server-set topics are similar to bans */
++   from = IsServer(sptr) ? &me : sptr;
++#else
++   from = sptr;
++#endif
+    /* Note if this is just a refresh of an old topic, and don't
+     * send it to all the clients to save bandwidth.  We still send
+     * it to other servers as they may have split and lost the topic.
+@@ -111,14 +119,14 @@
+    newtopic=ircd_strncmp(chptr->topic,topic,TOPICLEN)!=0;
+    /* setting a topic */
+    ircd_strncpy(chptr->topic, topic, TOPICLEN);
+-   ircd_strncpy(chptr->topic_nick, cli_name(sptr), NICKLEN);
+-   chptr->topic_time = CurrentTime;
++   ircd_strncpy(chptr->topic_nick, cli_name(from), NICKLEN);
++   chptr->topic_time = ts ? ts : CurrentTime;
+    /* Fixed in 2.10.11: Don't propergate local topics */
+    if (!IsLocalChannel(chptr->chname))
+-     sendcmdto_serv_butone(sptr, CMD_TOPIC, cptr, "%H :%s", chptr,
+-                         chptr->topic);
++     sendcmdto_serv_butone(sptr, CMD_TOPIC, cptr, "%H %Tu :%s", chptr,
++                         chptr->topic_time, chptr->topic);
+    if (newtopic)
+-      sendcmdto_channel_butserv_butone(sptr, CMD_TOPIC, chptr, NULL,
++      sendcmdto_channel_butserv_butone(from, CMD_TOPIC, chptr, NULL,
+                                              "%H :%s", chptr, chptr->topic);
+       /* if this is the same topic as before we send it to the person that
+        * set it (so they knew it went through ok), but don't bother sending
+@@ -180,7 +188,7 @@
+       }
+     }
+     else 
+-     do_settopic(sptr,cptr,chptr,topic);
++     do_settopic(sptr,cptr,chptr,topic,0);
+   }
+   return 0;
+ }
+@@ -190,12 +198,14 @@
+  *
+  * parv[0]        = sender prefix
+  * parv[1]        = channel
++ * parv[parc - 2] = timestamp (optional)
+  * parv[parc - 1] = topic
+  */
+ int ms_topic(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
+ {
+   struct Channel *chptr;
+   char *topic = 0, *name, *p = 0;
++  time_t ts = 0;
+   if (parc < 3)
+     return need_more_params(sptr, "TOPIC");
+@@ -226,7 +236,9 @@
+       continue;
+     }
+-    do_settopic(sptr,cptr,chptr,topic);
++    if (parc > 3 && (ts = atoi(parv[parc - 2])) && chptr->topic_time > ts)
++      continue;
++    do_settopic(sptr,cptr,chptr,topic,ts);
+   }
+   return 0;
+ }