From b88effbe1bf5b50ff15b3766d16e690178211b9b Mon Sep 17 00:00:00 2001 From: Michael Poole Date: Tue, 30 Oct 2007 01:19:52 +0000 Subject: [PATCH] Clean up / regularize parts of m*_gline(). git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1837 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- ChangeLog | 5 +++++ ircd/m_gline.c | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 28916be..b69439c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-09-05 Michael Poole + + * ircd/m_gline.c (ms_gline): Remove dead branch when 4 < parc < 5. + (mo_gline): Consistently use the last argument as the reason. + 2007-09-05 Michael Poole * ircd/Makefile.in: Fix dependencies for version.h generation. diff --git a/ircd/m_gline.c b/ircd/m_gline.c index cf0f002..cd930a9 100644 --- a/ircd/m_gline.c +++ b/ircd/m_gline.c @@ -292,9 +292,6 @@ ms_gline(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) case GLINE_MODIFY: /* modifying a G-line */ /* convert expire and lastmod, look for lifetime and reason */ if (parc > 4) { /* protect against fall-through from 4-param form */ - if (parc < 5) - return need_more_params(sptr, "GLINE"); - expire = atoi(parv[3]); /* convert expiration and lastmod */ expire = abs_expire(expire); lastmod = atoi(parv[4]); @@ -418,7 +415,7 @@ mo_gline(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) flags |= GLINE_EXPIRE; /* remember that we got an expire time */ if (parc > 4) { /* also got a reason... */ - reason = parv[4]; + reason = parv[parc - 1]; flags |= GLINE_REASON; } -- 2.20.1