From 7bb66521b1c3b08eb495f7c4cbd28e3acb132f15 Mon Sep 17 00:00:00 2001 From: "Kevin L. Mitchell" Date: Mon, 24 Apr 2000 16:34:02 +0000 Subject: [PATCH] Author: Kev Log message: Slowly starting to switch over to new sendcmdto_* functions and of course send_reply; so far, the changes have all been (cursorially) tested git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@200 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- ChangeLog | 12 +++++++++++- ircd/IPcheck.c | 7 ++++--- ircd/class.c | 6 +++--- ircd/hash.c | 11 ++++++----- 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index fd7aa27..bea7b76 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2000-04-24 Kevin L. Mitchell + + * ircd/class.c (report_classes): use send_reply instead of + sendto_one + + * ircd/hash.c (m_hash): replace sendto_one with sendcmdto_one + + * ircd/IPcheck.c (ip_registry_connect_succeeded): replace + sendto_one with sendcmdto_one + 2000-04-21 Kevin L. Mitchell * ircd/send.c: clean up logic in sendcmdto_channel_butone; use @@ -664,7 +674,7 @@ # # ChangeLog for ircu2.10.11 # -# $Id: ChangeLog,v 1.98 2000-04-21 15:15:17 kev Exp $ +# $Id: ChangeLog,v 1.99 2000-04-24 16:34:02 kev Exp $ # # Insert new changes at beginning of the change list. # diff --git a/ircd/IPcheck.c b/ircd/IPcheck.c index fb98238..5c209be 100644 --- a/ircd/IPcheck.c +++ b/ircd/IPcheck.c @@ -24,6 +24,7 @@ #include "ircd.h" #include "numnicks.h" /* NumNick, NumServ (GODMODE) */ #include "ircd_alloc.h" +#include "msg.h" #include "s_bsd.h" /* SetIPChecked */ #include "s_debug.h" /* Debug */ #include "s_user.h" /* TARGET_DELAY */ @@ -346,9 +347,9 @@ void ip_registry_connect_succeeded(struct Client *cptr) free_targets = entry->target->count; tr = " tr"; } - sendto_one(cptr, ":%s NOTICE %s :on %u ca %u(%u) ft %u(%u)%s", - me.name, cptr->name, entry->connected, entry->attempts, - IPCHECK_CLONE_LIMIT, free_targets, STARTTARGETS, tr); + sendcmdto_one(&me, CMD_NOTICE, cptr, "%C :on %u ca %u(%u) ft %u(%u)%s", + cptr, entry->connected, entry->attempts, IPCHECK_CLONE_LIMIT, + free_targets, STARTTARGETS, tr); } /* diff --git a/ircd/class.c b/ircd/class.c index 459caf0..f248524 100644 --- a/ircd/class.c +++ b/ircd/class.c @@ -21,6 +21,7 @@ #include "class.h" #include "client.h" #include "ircd.h" +#include "ircd_reply.h" #include "list.h" #include "numeric.h" #include "s_conf.h" @@ -198,9 +199,8 @@ void report_classes(struct Client *sptr) struct ConfClass *cltmp; for (cltmp = FirstClass(); cltmp; cltmp = NextClass(cltmp)) - sendto_one(sptr, rpl_str(RPL_STATSYLINE), me.name, sptr->name, - 'Y', ConClass(cltmp), PingFreq(cltmp), ConFreq(cltmp), - MaxLinks(cltmp), MaxSendq(cltmp)); + send_reply(sptr, RPL_STATSYLINE, 'Y', ConClass(cltmp), PingFreq(cltmp), + ConFreq(cltmp), MaxLinks(cltmp), MaxSendq(cltmp)); } unsigned int get_sendq(struct Client *cptr) diff --git a/ircd/hash.c b/ircd/hash.c index 1e25937..af01600 100644 --- a/ircd/hash.c +++ b/ircd/hash.c @@ -27,6 +27,7 @@ #include "ircd_chattr.h" #include "ircd_string.h" #include "ircd.h" +#include "msg.h" #include "send.h" #include "struct.h" #include "support.h" @@ -456,7 +457,7 @@ int m_hash(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) struct Channel* ch; int i; - sendto_one(sptr, "NOTICE %s :Hash Table Statistics", parv[0]); + sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :Hash Table Statistics", sptr); for (i = 0; i < HASHSIZE; ++i) { if ((cl = clientTable[i])) { @@ -470,8 +471,8 @@ int m_hash(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) } } - sendto_one(sptr, "NOTICE %s :Client: entries: %d buckets: %d max chain: %d", - parv[0], count, buckets, max_chain); + sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :Client: entries: %d buckets: %d " + "max chain: %d", sptr, count, buckets, max_chain); buckets = 0; count = 0; @@ -489,8 +490,8 @@ int m_hash(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) } } - sendto_one(sptr, "NOTICE %s :Channel: entries: %d buckets: %d max chain: %d", - parv[0], count, buckets, max_chain); + sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :Channel: entries: %d buckets: %d " + "max chain: %d", sptr, count, buckets, max_chain); return 0; } -- 2.20.1