From 885203035d6a873457e5c5eb12bff5c501d11179 Mon Sep 17 00:00:00 2001 From: nenolod Date: Tue, 3 Apr 2007 03:11:06 -0700 Subject: [PATCH] [svn] - change some sendto_one() to sendto_one_numeric(). --- ChangeLog | 10 ++++++++++ include/serno.h | 2 +- modules/m_admin.c | 18 ++++++------------ modules/m_map.c | 10 +++++----- src/messages.tab | 26 +++++++++++++------------- src/s_conf.c | 5 ++--- src/s_user.c | 21 ++++++++++----------- 7 files changed, 47 insertions(+), 45 deletions(-) diff --git a/ChangeLog b/ChangeLog index cbdad36..f00ff33 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +nenolod 2007/04/03 09:57:53 UTC (20070403-3366) + Log: + - river's ports.c from old charybdis trunk + + + Changes: Modified: + +195 -0 trunk/configure.ac (File Modified) + + - trunk/libcharybdis/ports.c (File Added) + + nenolod 2007/04/03 09:50:56 UTC (20070403-3364) Log: - remove broken ports stuff and devpoll stuff. diff --git a/include/serno.h b/include/serno.h index 24742c8..0c68260 100644 --- a/include/serno.h +++ b/include/serno.h @@ -1 +1 @@ -#define SERNO "20070403-3364" +#define SERNO "20070403-3366" diff --git a/modules/m_admin.c b/modules/m_admin.c index 0a83485..49d60f8 100644 --- a/modules/m_admin.c +++ b/modules/m_admin.c @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * - * $Id: m_admin.c 254 2005-09-21 23:35:12Z nenolod $ + * $Id: m_admin.c 3368 2007-04-03 10:11:06Z nenolod $ */ #include "stdinc.h" @@ -56,7 +56,7 @@ mapi_hlist_av1 admin_hlist[] = { { NULL, NULL } }; -DECLARE_MODULE_AV1(admin, NULL, NULL, admin_clist, admin_hlist, NULL, "$Revision: 254 $"); +DECLARE_MODULE_AV1(admin, NULL, NULL, admin_clist, admin_hlist, NULL, "$Revision: 3368 $"); /* * mr_admin - ADMIN command handler @@ -142,22 +142,16 @@ ms_admin(struct Client *client_p, struct Client *source_p, int parc, const char static void do_admin(struct Client *source_p) { - const char *myname; - const char *nick; - if(IsPerson(source_p)) admin_spy(source_p); - myname = get_id(&me, source_p); - nick = EmptyString(source_p->name) ? "*" : get_id(source_p, source_p); - - sendto_one(source_p, form_str(RPL_ADMINME), myname, nick, me.name); + sendto_one_numeric(source_p, RPL_ADMINME, form_str(RPL_ADMINME), me.name); if(AdminInfo.name != NULL) - sendto_one(source_p, form_str(RPL_ADMINLOC1), myname, nick, AdminInfo.name); + sendto_one_numeric(source_p, RPL_ADMINLOC1, form_str(RPL_ADMINLOC1), AdminInfo.name); if(AdminInfo.description != NULL) - sendto_one(source_p, form_str(RPL_ADMINLOC2), myname, nick, AdminInfo.description); + sendto_one_numeric(source_p, RPL_ADMINLOC2, form_str(RPL_ADMINLOC2), AdminInfo.description); if(AdminInfo.email != NULL) - sendto_one(source_p, form_str(RPL_ADMINEMAIL), myname, nick, AdminInfo.email); + sendto_one_numeric(source_p, RPL_ADMINEMAIL, form_str(RPL_ADMINEMAIL), AdminInfo.email); } /* admin_spy() diff --git a/modules/m_map.c b/modules/m_map.c index 423f055..aeb7c7f 100644 --- a/modules/m_map.c +++ b/modules/m_map.c @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * - * $Id: m_map.c 254 2005-09-21 23:35:12Z nenolod $ + * $Id: m_map.c 3368 2007-04-03 10:11:06Z nenolod $ */ #include "stdinc.h" @@ -41,7 +41,7 @@ struct Message map_msgtab = { }; mapi_clist_av1 map_clist[] = { &map_msgtab, NULL }; -DECLARE_MODULE_AV1(map, NULL, NULL, map_clist, NULL, NULL, "$Revision: 254 $"); +DECLARE_MODULE_AV1(map, NULL, NULL, map_clist, NULL, NULL, "$Revision: 3368 $"); static void dump_map(struct Client *client_p, struct Client *root, char *pbuf); @@ -61,7 +61,7 @@ m_map(struct Client *client_p, struct Client *source_p, int parc, const char *pa } dump_map(client_p, &me, buf); - sendto_one(client_p, form_str(RPL_MAPEND), me.name, client_p->name); + sendto_one_numeric(client_p, RPL_MAPEND, form_str(RPL_MAPEND)); return 0; } @@ -73,7 +73,7 @@ static int mo_map(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) { dump_map(client_p, &me, buf); - sendto_one(client_p, form_str(RPL_MAPEND), me.name, client_p->name); + sendto_one_numeric(client_p, RPL_MAPEND, form_str(RPL_MAPEND)); return 0; } @@ -112,7 +112,7 @@ dump_map(struct Client *client_p, struct Client *root_p, char *pbuf) " | Users: %5lu (%4.1f%%)", dlink_list_length(&root_p->serv->users), 100 * (float) dlink_list_length(&root_p->serv->users) / (float) Count.total); - sendto_one(client_p, form_str(RPL_MAP), me.name, client_p->name, buf); + sendto_one_numeric(client_p, RPL_MAP, form_str(RPL_MAP), buf); if(root_p->serv->servers.head != NULL) { diff --git a/src/messages.tab b/src/messages.tab index b5ef187..033d5df 100644 --- a/src/messages.tab +++ b/src/messages.tab @@ -16,28 +16,28 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: messages.tab 3307 2007-03-28 15:40:24Z jilles $ + * $Id: messages.tab 3368 2007-04-03 10:11:06Z nenolod $ */ static const char * replies[] = { /* 000 */ NULL, -/* 001 RPL_WELCOME, */ ":%s 001 %s :Welcome to the %s Internet Relay Chat Network %s", -/* 002 RPL_YOURHOST,*/ ":%s 002 %s :Your host is %s, running version %s", -/* 003 RPL_CREATED, */ ":%s 003 %s :This server was created %s", -/* 004 RPL_MYINFO, */ ":%s 004 %s %s %s %s biklmnopstveqrcgzjfILPQF bkloveqjfI", +/* 001 RPL_WELCOME, */ ":Welcome to the %s Internet Relay Chat Network %s", +/* 002 RPL_YOURHOST,*/ ":Your host is %s, running version %s", +/* 003 RPL_CREATED, */ ":This server was created %s", +/* 004 RPL_MYINFO, */ "%s %s %s biklmnopstveqrcgzjfILPQF bkloveqjfI", /* 005 RPL_ISUPPORT, */ "%s :are supported by this server", /* 006 */ NULL, /* 007 */ NULL, -/* 008 RPL_SNOMASK */ ":%s 008 %s %s :Server notice mask", +/* 008 RPL_SNOMASK */ "%s :Server notice mask", /* 009 */ NULL, -/* 010 RPL_REDIR, */ ":%s 010 %s %s %d :Please use this Server/Port instead", +/* 010 RPL_REDIR, */ "%s %d :Please use this Server/Port instead", /* 011 */ NULL, /* 012 */ NULL, /* 013 */ NULL, /* 014 */ NULL, -/* 015 RPL_MAP */ ":%s 015 %s :%s", +/* 015 RPL_MAP */ ":%s", /* 016 */ NULL, -/* 017 RPL_MAPEND */ ":%s 017 %s :End of /MAP", +/* 017 RPL_MAPEND */ ":End of /MAP", /* 018 */ NULL, /* 019 */ NULL, /* 020 */ NULL, @@ -277,10 +277,10 @@ static const char * replies[] = { /* 253 RPL_LUSERUNKNOWN, */ "%d :unknown connection(s)", /* 254 RPL_LUSERCHANNELS, */ "%d :channels formed", /* 255 RPL_LUSERME, */ ":I have %d clients and %d servers", -/* 256 RPL_ADMINME, */ ":%s 256 %s :Administrative info about %s", -/* 257 RPL_ADMINLOC1, */ ":%s 257 %s :%s", -/* 258 RPL_ADMINLOC2, */ ":%s 258 %s :%s", -/* 259 RPL_ADMINEMAIL, */ ":%s 259 %s :%s", +/* 256 RPL_ADMINME, */ ":Administrative info about %s", +/* 257 RPL_ADMINLOC1, */ ":%s", +/* 258 RPL_ADMINLOC2, */ ":%s", +/* 259 RPL_ADMINEMAIL, */ ":%s", /* 260 */ NULL, /* 261 RPL_TRACELOG, */ NULL, /* 262 RPL_ENDOFTRACE, */ "%s :End of TRACE", diff --git a/src/s_conf.c b/src/s_conf.c index 8521776..5f393ce 100644 --- a/src/s_conf.c +++ b/src/s_conf.c @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * - * $Id: s_conf.c 3354 2007-04-03 09:21:31Z nenolod $ + * $Id: s_conf.c 3368 2007-04-03 10:11:06Z nenolod $ */ #include "stdinc.h" @@ -337,8 +337,7 @@ verify_access(struct Client *client_p, const char *username) { if(aconf->flags & CONF_FLAGS_REDIR) { - sendto_one(client_p, form_str(RPL_REDIR), - me.name, client_p->name, + sendto_one_numeric(client_p, RPL_REDIR, form_str(RPL_REDIR), aconf->name ? aconf->name : "", aconf->port); return (NOT_AUTHORISED); } diff --git a/src/s_user.c b/src/s_user.c index f4ff4b0..3580717 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * - * $Id: s_user.c 3293 2007-03-28 14:33:50Z jilles $ + * $Id: s_user.c 3368 2007-04-03 10:11:06Z nenolod $ */ #include "stdinc.h" @@ -942,9 +942,11 @@ user_mode(struct Client *client_p, struct Client *source_p, int parc, const char *m = '\0'; sendto_one(source_p, form_str(RPL_UMODEIS), me.name, source_p->name, buf); + if (source_p->snomask != 0) - sendto_one(source_p, form_str(RPL_SNOMASK), me.name, source_p->name, + sendto_one_numeric(source_p, RPL_SNOMASK, form_str(RPL_SNOMASK), construct_snobuf(source_p->snomask)); + return 0; } @@ -1117,7 +1119,7 @@ user_mode(struct Client *client_p, struct Client *source_p, int parc, const char */ send_umode_out(client_p, source_p, setflags); if (showsnomask && MyConnect(source_p)) - sendto_one(source_p, form_str(RPL_SNOMASK), me.name, source_p->name, + sendto_one_numeric(source_p, RPL_SNOMASK, form_str(RPL_SNOMASK), construct_snobuf(source_p->snomask)); return (0); @@ -1217,14 +1219,11 @@ send_umode_out(struct Client *client_p, struct Client *source_p, int old) void user_welcome(struct Client *source_p) { - sendto_one(source_p, form_str(RPL_WELCOME), me.name, source_p->name, - ServerInfo.network_name, source_p->name); - sendto_one(source_p, form_str(RPL_YOURHOST), me.name, - source_p->name, + sendto_one_numeric(source_p, RPL_WELCOME, form_str(RPL_WELCOME), ServerInfo.network_name, source_p->name); + sendto_one_numeric(source_p, RPL_YOURHOST, form_str(RPL_YOURHOST), get_listener_name(source_p->localClient->listener), ircd_version); - - sendto_one(source_p, form_str(RPL_CREATED), me.name, source_p->name, creation); - sendto_one(source_p, form_str(RPL_MYINFO), me.name, source_p->name, me.name, ircd_version, umodebuf); + sendto_one_numeric(source_p, RPL_CREATED, form_str(RPL_CREATED), creation); + sendto_one_numeric(source_p, RPL_MYINFO, form_str(RPL_MYINFO), me.name, ircd_version, umodebuf); show_isupport(source_p); @@ -1312,7 +1311,7 @@ oper_up(struct Client *source_p, struct oper_conf *oper_p) if((old & UMODE_INVISIBLE) && !IsInvisible(source_p)) --Count.invisi; send_umode_out(source_p, source_p, old); - sendto_one(source_p, form_str(RPL_SNOMASK), me.name, source_p->name, + sendto_one_numeric(source_p, RPL_SNOMASK, form_str(RPL_SNOMASK), construct_snobuf(source_p->snomask)); sendto_one(source_p, form_str(RPL_YOUREOPER), me.name, source_p->name); sendto_one_notice(source_p, ":*** Oper privs are %s", get_oper_privs(oper_p->flags));