Automated merge with ssh://shadowircd/uranium/shadowircd/
This commit is contained in:
commit
0b7d7dd960
|
@ -229,6 +229,7 @@ extern struct membership *find_channel_membership(struct Channel *, struct Clien
|
||||||
extern const char *find_channel_status(struct membership *msptr, int combine);
|
extern const char *find_channel_status(struct membership *msptr, int combine);
|
||||||
extern int is_any_op(struct membership *msptr);
|
extern int is_any_op(struct membership *msptr);
|
||||||
extern int is_chanop_voiced(struct membership *msptr);
|
extern int is_chanop_voiced(struct membership *msptr);
|
||||||
|
extern int can_kick_deop(struct membership *source, struct membership *target);
|
||||||
extern void add_user_to_channel(struct Channel *, struct Client *, int flags);
|
extern void add_user_to_channel(struct Channel *, struct Client *, int flags);
|
||||||
extern void remove_user_from_channel(struct membership *);
|
extern void remove_user_from_channel(struct membership *);
|
||||||
extern void remove_user_from_channels(struct Client *);
|
extern void remove_user_from_channels(struct Client *);
|
||||||
|
|
|
@ -97,7 +97,7 @@ m_kick(struct Client *client_p, struct Client *source_p, int parc, const char *p
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!is_chanop(msptr) && !IsOverride(source_p))
|
if(!can_kick_deop(msptr, find_channel_membership(chptr, client_p)) && !IsOverride(source_p))
|
||||||
{
|
{
|
||||||
if(MyConnect(source_p))
|
if(MyConnect(source_p))
|
||||||
{
|
{
|
||||||
|
|
|
@ -226,6 +226,22 @@ is_chanop_voiced(struct membership *msptr)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* can_kick_deop()
|
||||||
|
*
|
||||||
|
* input - two memeberships
|
||||||
|
* output - 1 if the first memebership can kick/deop the second, 0 elsewise
|
||||||
|
* side effects -
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
can_kick_deop(struct membership *source, struct membership *target)
|
||||||
|
{
|
||||||
|
/* This does not do much yet. That will change when +ah is in. */
|
||||||
|
if(!is_any_op(source))
|
||||||
|
return 0;
|
||||||
|
else
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* add_user_to_channel()
|
/* add_user_to_channel()
|
||||||
*
|
*
|
||||||
* input - channel to add client to, client to add, channel flags
|
* input - channel to add client to, client to add, channel flags
|
||||||
|
|
Loading…
Reference in New Issue