Use CString::Split() in more places

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1808 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2010-03-07 11:08:26 +00:00
parent 6796cabbaf
commit edd09a5f37
8 changed files with 48 additions and 51 deletions
+5 -7
View File
@@ -17,15 +17,13 @@ public:
}
virtual bool OnLoad(const CString& sArgs, CString& sMessage) {
unsigned int a = 0;
CString sChan = sArgs.Token(a++);
VCString vsChans;
sArgs.Split(" ", vsChans, false);
while (!sChan.empty()) {
if (!Add(sChan)) {
PutModule("Unable to add [" + sChan + "]");
for (VCString::const_iterator it = vsChans.begin(); it != vsChans.end(); ++it) {
if (!Add(*it)) {
PutModule("Unable to add [" + *it + "]");
}
sChan = sArgs.Token(a++);
}
// Load our saved settings, ignore errors