X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=ircd%2Fm_wallops.c;h=dfa10e48ef071d71b946684d760b9d81d0513dca;hb=refs%2Fheads%2Fupstream;hp=af2015be3ec83a4d83b3b9d81198e533577364e9;hpb=ae91ef6320f611af74e70a0db2620c338fbaa7d5;p=ircu2.10.12-pk.git diff --git a/ircd/m_wallops.c b/ircd/m_wallops.c index af2015b..dfa10e4 100644 --- a/ircd/m_wallops.c +++ b/ircd/m_wallops.c @@ -79,21 +79,17 @@ * note: it is guaranteed that parv[0]..parv[parc-1] are all * non-NULL pointers. */ -#if 0 -/* - * No need to include handlers.h here the signatures must match - * and we don't need to force a rebuild of all the handlers everytime - * we add a new one to the list. --Bleep - */ -#include "handlers.h" -#endif /* 0 */ +#include "config.h" + #include "client.h" +#include "ircd_log.h" #include "ircd_reply.h" #include "ircd_string.h" +#include "msg.h" #include "numeric.h" #include "send.h" -#include +/* #include -- Now using assert in ircd_log.h */ /* @@ -108,7 +104,7 @@ int ms_wallops(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) if (EmptyString(message)) return need_more_params(sptr, "WALLOPS"); - sendto_ops_butone(cptr, sptr, ":%s WALLOPS :%s", parv[0], message); + sendwallto_group_butone(sptr, WALL_WALLOPS, cptr, "%s", message); return 0; } @@ -124,37 +120,6 @@ int mo_wallops(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) if (EmptyString(message)) return need_more_params(sptr, "WALLOPS"); - sendto_ops_butone(0, sptr, ":%s WALLOPS :%s", parv[0], message); - return 0; -} - - -#if 0 -/* - * m_wallops - * - * Writes to all +w users currently online - * - * parv[0] = sender prefix - * parv[1] = message text - */ -int m_wallops(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) -{ - char *message; - - message = parc > 1 ? parv[1] : 0; - - if (BadPtr(message)) - return need_more_params(sptr, "WALLOPS"); - - if (!IsServer(sptr) && MyConnect(sptr) && !IsAnOper(sptr)) - { - sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]); - return 0; - } - sendto_ops_butone(IsServer(cptr) ? cptr : 0, sptr, - ":%s WALLOPS :%s", parv[0], message); + sendwallto_group_butone(sptr, WALL_WALLOPS, 0, "%s", message); return 0; } -#endif /* 0 */ -