X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/16d8d9fc6d5131eebc8fd10b4a025c0f8eda06f7..82f8e812f5f3df9a23b58dff2024f83237280b9d:/modules/core/m_kick.c diff --git a/modules/core/m_kick.c b/modules/core/m_kick.c index 88befac..368c715 100644 --- a/modules/core/m_kick.c +++ b/modules/core/m_kick.c @@ -97,7 +97,7 @@ m_kick(struct Client *client_p, struct Client *source_p, int parc, const char *p return 0; } - if(!is_chanop(msptr)) + if(!can_kick_deop(msptr, find_channel_membership(chptr, client_p)) && !IsOverride(source_p)) { if(MyConnect(source_p)) { @@ -158,6 +158,14 @@ m_kick(struct Client *client_p, struct Client *source_p, int parc, const char *p return 0; } + if(MyClient(source_p) && chptr->mode.mode & MODE_NOKICK) + { + sendto_one_numeric(source_p, ERR_NOKICK, + form_str(ERR_NOKICK), + chptr->chname); + return 0; + } + if(MyClient(source_p)) { hook_data_channel_approval hookdata;