From 0482ebf7b6bdbd48d07a75232e783386c61ed855 Mon Sep 17 00:00:00 2001 From: jilles Date: Sun, 6 May 2007 07:46:45 -0700 Subject: [PATCH] [svn] Target left IRC (more friendly error message if a UID cannot be found) for /invite. --- ChangeLog | 10 ++++++++++ include/serno.h | 2 +- modules/m_invite.c | 15 ++++++++++----- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index a3b76db..917c21d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +jilles 2007/05/02 19:56:40 UTC (20070502-3436) + Log: + Remove emptyline craq because it leaks memory on /rehash motd etc. + from ratbox 2.2 (anfl/Androsyn) + + + Changes: Modified: + +6 -14 trunk/src/cache.c (File Modified) + + jilles 2007/04/28 23:47:25 UTC (20070428-3434) Log: Merge old trunk r2767: diff --git a/include/serno.h b/include/serno.h index e0ca67a..d587c32 100644 --- a/include/serno.h +++ b/include/serno.h @@ -1 +1 @@ -#define SERNO "20070428-3434" +#define SERNO "20070502-3436" diff --git a/modules/m_invite.c b/modules/m_invite.c index 6466d59..6464ce3 100644 --- a/modules/m_invite.c +++ b/modules/m_invite.c @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * - * $Id: m_invite.c 3259 2007-03-15 18:09:08Z jilles $ + * $Id: m_invite.c 3438 2007-05-06 14:46:45Z jilles $ */ #include "stdinc.h" @@ -48,7 +48,7 @@ struct Message invite_msgtab = { {mg_unreg, {m_invite, 3}, {m_invite, 3}, mg_ignore, mg_ignore, {m_invite, 3}} }; mapi_clist_av1 invite_clist[] = { &invite_msgtab, NULL }; -DECLARE_MODULE_AV1(invite, NULL, NULL, invite_clist, NULL, NULL, "$Revision: 3259 $"); +DECLARE_MODULE_AV1(invite, NULL, NULL, invite_clist, NULL, NULL, "$Revision: 3438 $"); static void add_invite(struct Channel *, struct Client *); @@ -70,9 +70,14 @@ m_invite(struct Client *client_p, struct Client *source_p, int parc, const char if((target_p = find_person(parv[1])) == NULL) { - sendto_one_numeric(source_p, ERR_NOSUCHNICK, - form_str(ERR_NOSUCHNICK), - IsDigit(parv[1][0]) ? "*" : parv[1]); + if(!MyClient(source_p) && IsDigit(parv[1][0])) + sendto_one_numeric(source_p, ERR_NOSUCHNICK, + "* :Target left IRC. Failed to invite to %s", + parv[2]); + else + sendto_one_numeric(source_p, ERR_NOSUCHNICK, + form_str(ERR_NOSUCHNICK), + parv[1]); return 0; }