common: Fix whitespace CTCP ignore invalid index
authorShane Synan <digitalcircuit36939@gmail.com>
Sat, 1 Sep 2018 21:17:33 +0000 (16:17 -0500)
committerManuel Nickschas <sputnick@quassel-irc.org>
Mon, 3 Sep 2018 20:12:02 +0000 (22:12 +0200)
commit6fd69e84e6c395a108e6b2620c6428907b7d7efd
treee9b2af415e9787e9f135be22c9de419f48826027
parent5b397a71c0f4827c3050659c39749d78831a0d6d
common: Fix whitespace CTCP ignore invalid index

When constructing a CTCP ignore, check that splitting on whitespace
results in non-empty list before taking from the list.  If it's
empty, fall back to assuming any valid sender, i.e. "*"/".*"
depending on whether the rule is set as wildcard or regex.

This fixes issues when receiving a CTCP with an invalid CTCP ignore
rule such as "  ".
src/common/ignorelistmanager.h