when joining a new vchan, set the user +a instead of +o

This commit is contained in:
fishwaldo 2002-08-20 15:06:30 +00:00
parent e2f0c54348
commit 88ac1e100c
3 changed files with 20 additions and 13 deletions

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: m_kick.c,v 1.3 2002/08/16 12:05:36 fishwaldo Exp $
* $Id: m_kick.c,v 1.4 2002/08/20 15:06:30 fishwaldo Exp $
*/
#include "stdinc.h"
@ -60,7 +60,7 @@ _moddeinit(void)
mod_del_cmd(&kick_msgtab);
}
const char *_version = "$Revision: 1.3 $";
const char *_version = "$Revision: 1.4 $";
#endif
/*
** m_kick
@ -191,13 +191,18 @@ static void m_kick(struct Client *client_p,
if (is_half_op(chptr,source_p))
{
if (((chptr->mode.mode & MODE_PRIVATE) && is_any_op(chptr, who)) ||
is_chan_op(chptr, who))
is_chan_op(chptr, who) || is_chan_admin(chptr, who))
{
sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED),
me.name, parv[0], name);
return;
}
}
/* we must also check if its a op trying to kick a admin */
if (is_chan_op(chptr, source_p) && is_chan_admin(chptr, who))
sendto_one(source_p, form_str(ERR_CHANAPRIVSNEEDED),
me.name, parv[0], name);
/* jdc
* - In the case of a server kicking a user (i.e. CLEARCHAN),
* the kick should show up as coming from the server which did

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: m_cjoin.c,v 1.3 2002/08/16 12:05:36 fishwaldo Exp $
* $Id: m_cjoin.c,v 1.4 2002/08/20 15:06:29 fishwaldo Exp $
*/
#include "stdinc.h"
@ -69,7 +69,7 @@ _moddeinit(void)
#endif
}
const char *_version = "$Revision: 1.3 $";
const char *_version = "$Revision: 1.4 $";
#endif /* STATIC_MODULES */
#ifdef VCHANS
@ -179,7 +179,7 @@ static void m_cjoin(struct Client *client_p,
/*
** Complete user entry to the new channel
*/
add_user_to_channel(chptr, source_p, CHFL_CHANOP);
add_user_to_channel(chptr, source_p, CHFL_ADMIN);
sendto_channel_local(ALL_MEMBERS, chptr,
":%s!%s@%s JOIN :%s",

View file

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: m_invite.c,v 1.3 2002/08/14 16:52:02 fishwaldo Exp $
* $Id: m_invite.c,v 1.4 2002/08/20 15:06:29 fishwaldo Exp $
*/
#include "stdinc.h"
@ -62,7 +62,7 @@ _moddeinit(void)
mod_del_cmd(&invite_msgtab);
}
const char *_version = "$Revision: 1.3 $";
const char *_version = "$Revision: 1.4 $";
#endif
/*
@ -187,7 +187,7 @@ m_invite(struct Client *client_p,
}
}
else
if (!(vchan->mode.mode * MODE_OPERSONLY))
if (!(vchan->mode.mode & MODE_OPERSONLY))
/* Don't save invite even if from an op otherwise... */
chop = 0;
@ -220,6 +220,12 @@ m_invite(struct Client *client_p,
source_p->username, source_p->vhost, target_p->name,
chptr->chname);
}
/* we send a notice to all channel ops/halfops/admins */
sendto_channel_local(ONLY_CHANOPS_HALFOPS, vchan,
":%s NOTICE %s :%s is inviting %s to %s.",
me.name, chptr->chname, source_p->name,
target_p->name, chptr->chname);
/* if the channel is +pi, broadcast everywhere thats CAP_PARA, send to
* target if target isnt CAP_PARA capable, else just send to target
@ -236,10 +242,6 @@ m_invite(struct Client *client_p,
sendto_one(target_p->from, ":%s INVITE %s :%s", parv[0],
target_p->name, vchan->chname);
sendto_channel_local(ONLY_CHANOPS_HALFOPS, vchan,
":%s NOTICE %s :%s is inviting %s to %s.",
me.name, chptr->chname, source_p->name,
target_p->name, chptr->chname);
}
else if(!MyConnect(target_p) && (target_p->from != client_p))
{