X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=ircd%2Fm_wallchops.c;h=c57535114656b2d0a85673166cfc83d809a7d536;hb=refs%2Fheads%2Fupstream;hp=f05769bdb8a99e06fc474ec8b72821dc75604ff1;hpb=5ba09703da9f8f21f3278dc0222cd6fe077cfe31;p=ircu2.10.12-pk.git diff --git a/ircd/m_wallchops.c b/ircd/m_wallchops.c index f05769b..c575351 100644 --- a/ircd/m_wallchops.c +++ b/ircd/m_wallchops.c @@ -85,6 +85,7 @@ #include "client.h" #include "hash.h" #include "ircd.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" #include "msg.h" @@ -93,7 +94,7 @@ #include "s_user.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* * m_wallchops - local generic message handler @@ -114,10 +115,11 @@ int m_wallchops(struct Client* cptr, struct Client* sptr, int parc, char* parv[] return send_reply(sptr, ERR_NOTEXTTOSEND); if (IsChannelName(parv[1]) && (chptr = FindChannel(parv[1]))) { - if (client_can_send_to_channel(sptr, chptr)) { + if (client_can_send_to_channel(sptr, chptr, 0)) { if ((chptr->mode.mode & MODE_NOPRIVMSGS) && check_target_limit(sptr, chptr, chptr->chname, 0)) return 0; + RevealDelayedJoinIfNeeded(sptr, chptr); sendcmdto_channel_butone(sptr, CMD_WALLCHOPS, chptr, cptr, SKIP_DEAF | SKIP_BURST | SKIP_NONOPS, "%H :@ %s", chptr, parv[parc - 1]); @@ -143,8 +145,8 @@ int ms_wallchops(struct Client* cptr, struct Client* sptr, int parc, char* parv[ if (parc < 3 || !IsUser(sptr)) return 0; - if ((chptr = FindChannel(parv[1]))) { - if (client_can_send_to_channel(sptr, chptr)) { + if (!IsLocalChannel(parv[1]) && (chptr = FindChannel(parv[1]))) { + if (client_can_send_to_channel(sptr, chptr, 1)) { sendcmdto_channel_butone(sptr, CMD_WALLCHOPS, chptr, cptr, SKIP_DEAF | SKIP_BURST | SKIP_NONOPS, "%H :%s", chptr, parv[parc - 1]);