From 03eb4fcaf75895859acfd1384d036f28b4f01c80 Mon Sep 17 00:00:00 2001 From: michael Date: Sun, 5 May 2013 18:08:01 +0000 Subject: - Backport -r1895 [m_mode(): these buffers don't need to be static] git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@1952 82007160-df01-0410-b94d-b575c5fd34c7 --- modules/core/m_mode.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'modules/core') diff --git a/modules/core/m_mode.c b/modules/core/m_mode.c index 897ce59..dbc777f 100644 --- a/modules/core/m_mode.c +++ b/modules/core/m_mode.c @@ -50,9 +50,9 @@ m_mode(struct Client *client_p, struct Client *source_p, int parc, char *parv[]) { struct Channel *chptr = NULL; - struct Membership *member; - static char modebuf[MODEBUFLEN]; - static char parabuf[MODEBUFLEN]; + struct Membership *member = NULL; + char modebuf[MODEBUFLEN]; + char parabuf[MODEBUFLEN]; if (EmptyString(parv[1])) { @@ -86,18 +86,17 @@ m_mode(struct Client *client_p, struct Client *source_p, me.name, source_p->name, chptr->chname, modebuf, parabuf); sendto_one(source_p, form_str(RPL_CREATIONTIME), me.name, source_p->name, chptr->chname, chptr->channelts); + return; } - /* bounce all modes from people we deop on sjoin + + /* + * bounce all modes from people we deop on sjoin * servers have always gotten away with murder, * including telnet servers *g* - Dianora - * - * XXX Is it worth the bother to make an ms_mode() ? - Dianora */ - else if (IsServer(source_p)) - { + if (IsServer(source_p)) set_channel_mode(client_p, source_p, chptr, NULL, parc - 2, parv + 2, chptr->chname); - } else { member = find_channel_link(source_p, chptr); @@ -106,10 +105,8 @@ m_mode(struct Client *client_p, struct Client *source_p, { /* Finish the flood grace period... */ if (MyClient(source_p) && !IsFloodDone(source_p)) - { if (!((parc == 3) && (parv[2][0] == 'b') && (parv[2][1] == '\0'))) flood_endgrace(source_p); - } set_channel_mode(client_p, source_p, chptr, member, parc - 2, parv + 2, chptr->chname); -- cgit