diff options
author | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2013-01-19 23:16:05 +0000 |
---|---|---|
committer | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2013-01-19 23:16:05 +0000 |
commit | 33be06af08af5d2a073417d96882b7232d0f7319 (patch) | |
tree | 252dc6f14b7950851667fb078d56a746112215cd | |
parent | 9f6d873c7562b4afff4af7219ca8e2e78d9132ef (diff) |
- Forward-port -r1771 [channel_mode.c: check_string() didn't work right in case
string started with a space. (i.e., "MODE #chan +b : c" results in a weird
ban mask)
Bug got introduced in ircd-hybrid-5/channel.c, Revision 1.26
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/trunk@1772 82007160-df01-0410-b94d-b575c5fd34c7
-rw-r--r-- | src/channel_mode.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/channel_mode.c b/src/channel_mode.c index 3dc08d8..cf8783d 100644 --- a/src/channel_mode.c +++ b/src/channel_mode.c @@ -110,7 +110,6 @@ static struct ChCapCombo chcap_combos[NCHCAP_COMBOS]; extern mp_pool_t *ban_pool; -/* XXX check_string is propably not longer required in add_id and del_id */ /* check_string() * * inputs - string to check @@ -126,7 +125,7 @@ check_string(char *s) char *str = s; static char star[] = "*"; - if (EmptyString(s)) + if (EmptyString(str)) return star; for (; *s; ++s) @@ -138,7 +137,7 @@ check_string(char *s) } } - return str; + return EmptyString(str) ? star : str; } /* |