X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=ircd%2Fm_wallchops.c;h=c57535114656b2d0a85673166cfc83d809a7d536;hb=refs%2Fheads%2Fupstream;hp=9ff5a093b833421ddff266fe20b7f0270d9d4828;hpb=56f512008e81aeae915b2b7f6bcdd54b549188d3;p=ircu2.10.12-pk.git diff --git a/ircd/m_wallchops.c b/ircd/m_wallchops.c index 9ff5a09..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 @@ -105,7 +106,7 @@ int m_wallchops(struct Client* cptr, struct Client* sptr, int parc, char* parv[] assert(0 != cptr); assert(cptr == sptr); - cli_flags(sptr) &= ~FLAGS_TS8; + ClrFlag(sptr, FLAG_TS8); if (parc < 2 || EmptyString(parv[1])) return send_reply(sptr, ERR_NORECIPIENT, "WALLCHOPS"); @@ -114,13 +115,14 @@ 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]); + "%H :@ %s", chptr, parv[parc - 1]); } else send_reply(sptr, ERR_CANNOTSENDTOCHAN, parv[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]);