1 Index: doc/example.conf
2 ===================================================================
3 RCS file: /home/coder-com/cvs/ircu2.10/doc/example.conf,v
4 retrieving revision 1.15.2.3
5 diff -u -r1.15.2.3 example.conf
6 --- doc/example.conf 2002/02/04 22:06:11 1.15.2.3
7 +++ doc/example.conf 2002/02/11 09:17:57
9 # F:NICKNAMEHISTORYLENGTH:800
11 # F:HIDDEN_HOST:users.undernet.org
12 +# F:TOPIC_BURST:FALSE
13 # F:KILLCHASETIMELIMIT:30
14 # F:MAXCHANNELSPERUSER:10
16 Index: doc/readme.features
17 ===================================================================
18 RCS file: /home/coder-com/cvs/ircu2.10/doc/readme.features,v
19 retrieving revision 1.2.2.3
20 diff -u -r1.2.2.3 readme.features
21 --- doc/readme.features 2002/02/04 22:06:11 1.2.2.3
22 +++ doc/readme.features 2002/02/11 09:18:35
25 This selects the suffix for the hidden hostmask (see HOST_HIDING).
31 +This selects whether topics are *sent* to other servers durring a burst.
32 +Note that receiving topics from servers is always enabled.
37 Index: include/ircd_features.h
38 ===================================================================
39 RCS file: /home/coder-com/cvs/ircu2.10/include/ircd_features.h,v
40 retrieving revision 1.11.2.3
41 diff -u -r1.11.2.3 ircd_features.h
42 --- include/ircd_features.h 2002/02/04 22:06:11 1.11.2.3
43 +++ include/ircd_features.h 2002/02/11 09:18:35
45 FEAT_NICKNAMEHISTORYLENGTH,
50 /* features that probably should not be touched */
51 FEAT_KILLCHASETIMELIMIT,
53 ===================================================================
54 RCS file: /home/coder-com/cvs/ircu2.10/ircd/channel.c,v
55 retrieving revision 1.73.2.5
56 diff -u -r1.73.2.5 channel.c
57 --- ircd/channel.c 2002/02/03 20:31:46 1.73.2.5
58 +++ ircd/channel.c 2002/02/11 09:23:28
61 } /* Continue when there was something
62 that didn't fit (full==1) */
64 + if (feature_bool(FEAT_TOPIC_BURST) && *chptr->topic)
65 + sendcmdto_one(&me, CMD_TOPIC, cptr, "%H %Tu :%s", chptr,
66 + chptr->topic_time, chptr->topic);
70 Index: ircd/ircd_features.c
71 ===================================================================
72 RCS file: /home/coder-com/cvs/ircu2.10/ircd/ircd_features.c,v
73 retrieving revision 1.15.2.3
74 diff -u -r1.15.2.3 ircd_features.c
75 --- ircd/ircd_features.c 2002/02/04 22:06:11 1.15.2.3
76 +++ ircd/ircd_features.c 2002/02/11 09:23:30
78 F_I(NICKNAMEHISTORYLENGTH, 0, 800, whowas_realloc),
79 F_B(HOST_HIDING, 0, 0, 0),
80 F_S(HIDDEN_HOST, FEAT_CASE, "users.undernet.org", 0),
81 + F_B(TOPIC_BURST, 0, 0, 0),
83 /* features that probably should not be touched */
84 F_I(KILLCHASETIMELIMIT, 0, 30, 0),
86 ===================================================================
87 RCS file: /home/coder-com/cvs/ircu2.10/ircd/m_topic.c,v
88 retrieving revision 1.9.2.1
89 diff -u -r1.9.2.1 m_topic.c
90 --- ircd/m_topic.c 2002/02/03 20:31:46 1.9.2.1
91 +++ ircd/m_topic.c 2002/02/11 09:23:30
95 #include "ircd_reply.h"
96 +#include "ircd_policy.h"
97 #include "ircd_string.h"
106 static void do_settopic(struct Client *sptr, struct Client *cptr,
107 - struct Channel *chptr,char *topic)
108 + struct Channel *chptr, char *topic, time_t ts)
111 + struct Client *from;
112 /* if +n and not @'d, return an error and ignore the topic */
113 - if ((chptr->mode.mode & MODE_TOPICLIMIT) != 0 && !is_chan_op(sptr, chptr))
114 + if (!IsServer(sptr) && (chptr->mode.mode & MODE_TOPICLIMIT) != 0 && !is_chan_op(sptr, chptr))
116 send_reply(sptr, ERR_CHANOPRIVSNEEDED, chptr->chname);
119 +#ifdef HEAD_IN_SAND_BANWHO /* Server-set topics are similar to bans */
120 + from = IsServer(sptr) ? &me : sptr;
124 /* Note if this is just a refresh of an old topic, and don't
125 * send it to all the clients to save bandwidth. We still send
126 * it to other servers as they may have split and lost the topic.
127 @@ -111,14 +119,14 @@
128 newtopic=ircd_strncmp(chptr->topic,topic,TOPICLEN)!=0;
129 /* setting a topic */
130 ircd_strncpy(chptr->topic, topic, TOPICLEN);
131 - ircd_strncpy(chptr->topic_nick, cli_name(sptr), NICKLEN);
132 - chptr->topic_time = CurrentTime;
133 + ircd_strncpy(chptr->topic_nick, cli_name(from), NICKLEN);
134 + chptr->topic_time = ts ? ts : CurrentTime;
135 /* Fixed in 2.10.11: Don't propergate local topics */
136 if (!IsLocalChannel(chptr->chname))
137 - sendcmdto_serv_butone(sptr, CMD_TOPIC, cptr, "%H :%s", chptr,
139 + sendcmdto_serv_butone(sptr, CMD_TOPIC, cptr, "%H %Tu :%s", chptr,
140 + chptr->topic_time, chptr->topic);
142 - sendcmdto_channel_butserv_butone(sptr, CMD_TOPIC, chptr, NULL,
143 + sendcmdto_channel_butserv_butone(from, CMD_TOPIC, chptr, NULL,
144 "%H :%s", chptr, chptr->topic);
145 /* if this is the same topic as before we send it to the person that
146 * set it (so they knew it went through ok), but don't bother sending
151 - do_settopic(sptr,cptr,chptr,topic);
152 + do_settopic(sptr,cptr,chptr,topic,0);
156 @@ -190,12 +198,14 @@
158 * parv[0] = sender prefix
160 + * parv[parc - 2] = timestamp (optional)
161 * parv[parc - 1] = topic
163 int ms_topic(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
165 struct Channel *chptr;
166 char *topic = 0, *name, *p = 0;
170 return need_more_params(sptr, "TOPIC");
175 - do_settopic(sptr,cptr,chptr,topic);
176 + if (parc > 3 && (ts = atoi(parv[parc - 2])) && chptr->topic_time > ts)
178 + do_settopic(sptr,cptr,chptr,topic,ts);