From 4a0092fb3b31908f6339fd87be0bb03bb037799f Mon Sep 17 00:00:00 2001 From: "geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b" Date: Wed, 29 Aug 2007 18:39:54 +0000 Subject: BUILD : 1.7.19 (1287) BUGS : 761 NOTES : Fixed OperServ SGLINE to now remove trailing spaces from the mask... this is not 100% syntactically correct, but spaces on the end are not usually needed anyways git-svn-id: svn://svn.anope.org/anope/trunk@1287 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1005 5417fbe8-f217-4b02-8779-1006273d7864 --- src/core/os_sgline.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/core/os_sgline.c b/src/core/os_sgline.c index 5bc7c3f08..7185b885f 100644 --- a/src/core/os_sgline.c +++ b/src/core/os_sgline.c @@ -115,6 +115,11 @@ int do_sgline(User * u) } if (mask && (reason = strtok(NULL, ""))) { + /* Clean up the last character of the mask if it is a space. */ + size_t masklen = strlen(mask); + if (mask[masklen - 1] == ' ') + mask[masklen - 1] = '\0'; + /* We first do some sanity check on the proposed mask. */ if (mask && strspn(mask, "*?") == strlen(mask)) { -- cgit