topic bursting is added

This commit is contained in:
fishwaldo 2002-09-23 03:14:21 +00:00
parent 989a883957
commit a00cddec58
6 changed files with 13 additions and 36 deletions

2
.gitattributes vendored
View file

@ -48,7 +48,6 @@ contrib/m_flags.c -text
contrib/m_jupe.c -text
contrib/m_ltrace.c -text
contrib/m_mkpasswd.c -text
contrib/m_tburst.c -text
contrib/spy_admin_notice.c -text
contrib/spy_info_notice.c -text
contrib/spy_links_notice.c -text
@ -369,6 +368,7 @@ modules/m_stats.c -text
modules/m_svinfo.c -text
modules/m_svscmds.c -text
modules/m_swhois.c -text
modules/m_tburst.c -text
modules/m_testline.c -text
modules/m_time.c -text
modules/m_topic.c -text

5
TODO
View file

@ -1,4 +1,4 @@
$Id: TODO,v 1.9 2002/09/22 03:36:42 fishwaldo Exp $
$Id: TODO,v 1.10 2002/09/23 03:14:20 fishwaldo Exp $
NeoStats HostServ should accept /privmsg hostserv login <username> <password> for NeoIRCD vhost support!
@ -13,3 +13,6 @@ POST 1.0
*Channel mode +M (un-registered users can't talk)
*channel modes in /list
*add IsMyAdmin to replace IsAdmin (currently server admins have admin axs to all servers)
*/silence
*/watch
*/knock on +klO chans, but not when banned

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: s_serv.h,v 1.4 2002/09/13 09:17:13 fishwaldo Exp $
* $Id: s_serv.h,v 1.5 2002/09/23 03:14:20 fishwaldo Exp $
*/
#ifndef INCLUDED_serv_h
@ -72,7 +72,6 @@ struct Capability
#define CAP_ZIP 0x00008000 /* Can do ZIPlinks */
#define CAP_ENC 0x00010000 /* Can do ENCrypted links */
#define CAP_TBURST 0x00040000 /* supports TBURST */
#define CAP_PARA 0x00080000 /* supports invite broadcasting for +p */
#define CAP_MASK (CAP_QS | CAP_EOB | \

View file

@ -1,7 +1,7 @@
#
# Makefile.in for ircd/modules
#
# $Id: Makefile.in,v 1.10 2002/09/17 11:03:21 fishwaldo Exp $
# $Id: Makefile.in,v 1.11 2002/09/23 03:14:21 fishwaldo Exp $
#
CC = @CC@
AR = @AR@
@ -97,6 +97,7 @@ SRCS = \
m_stats.c \
m_svinfo.c \
m_swhois.c \
m_tburst.c \
m_testline.c \
m_time.c \
m_topic.c \

View file

@ -25,7 +25,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* $Id: m_tburst.c,v 1.2 2002/08/13 14:45:00 fishwaldo Exp $
* $Id: m_tburst.c,v 1.1 2002/09/23 03:14:21 fishwaldo Exp $
*/
#include "stdinc.h"
@ -42,21 +42,10 @@
#include "s_conf.h"
/* TBURST_PROPAGATE
*
* If this is defined, when we receive a TBURST thats successful
* (ie: our topic changes), the TBURST will be propagated to other
* servers that support TBURST
*/
#define TBURST_PROPAGATE
static void ms_tburst(struct Client *, struct Client *, int, char **);
static void set_topic(struct Client *, struct Channel *,
time_t, char *, char *);
static void set_tburst_capab();
static void unset_tburst_capab();
int send_tburst(struct hook_burst_channel *);
struct Message tburst_msgtab = {
@ -70,7 +59,6 @@ _modinit(void)
{
mod_add_cmd(&tburst_msgtab);
hook_add_hook("burst_channel", (hookfn *)send_tburst);
set_tburst_capab();
}
void
@ -78,10 +66,9 @@ _moddeinit(void)
{
mod_del_cmd(&tburst_msgtab);
hook_del_hook("burst_channel", (hookfn *)send_tburst);
unset_tburst_capab();
}
const char *_version = "$Revision: 1.2 $";
const char *_version = "$Revision: 1.1 $";
#endif
/* ms_tburst()
@ -130,29 +117,17 @@ static void set_topic(struct Client *source_p, struct Channel *chptr,
ConfigServerHide.hide_servers ? me.name : source_p->name,
chptr->chname, chptr->topic == NULL ? "" : chptr->topic);
#ifdef TBURST_PROPAGATE
sendto_server(source_p, NULL, chptr, CAP_TBURST, NOCAPS, NOFLAGS,
sendto_server(source_p, NULL, chptr, NOCAPS, NOCAPS, NOFLAGS,
":%s TBURST %ld %s %ld %s :%s",
source_p->name, chptr->channelts, chptr->chname,
chptr->topic_time,
chptr->topic_info == NULL ? "" : chptr->topic_info,
chptr->topic == NULL ? "" : chptr->topic);
#endif
}
static void set_tburst_capab()
{
default_server_capabs |= CAP_TBURST;
}
static void unset_tburst_capab()
{
default_server_capabs &= ~CAP_TBURST;
}
int send_tburst(struct hook_burst_channel *data)
{
if(data->chptr->topic != NULL && IsCapable(data->client, CAP_TBURST))
if(data->chptr->topic != NULL)
sendto_one(data->client, ":%s TBURST %ld %s %ld %s :%s",
me.name, data->chptr->channelts, data->chptr->chname,
data->chptr->topic_time, data->chptr->topic_info,

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: s_serv.c,v 1.11 2002/09/13 16:30:05 fishwaldo Exp $
* $Id: s_serv.c,v 1.12 2002/09/23 03:14:21 fishwaldo Exp $
*/
#include "stdinc.h"
@ -95,7 +95,6 @@ struct Capability captab[] = {
{ "HUB", CAP_HUB },
{ "UID", CAP_UID },
{ "ZIP", CAP_ZIP },
{ "TBURST", CAP_TBURST },
{ "PARA", CAP_PARA },
{ 0, 0 }
};