stickychan: Accept a channel list as module arguments

If you now load stickychan with "#chan1,#chan2 bla" as its argument, both
channels are stuck where "bla" is the channel key for #chan2.

Thanks to FB-eYe for the suggestion.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1534 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2009-06-05 19:56:23 +00:00
parent 226ccbf56d
commit 9c1f2ee462
+13
View File
@@ -112,6 +112,19 @@ static void RunTimer(CModule * pModule, CFPTimer *pTimer)
bool CStickyChan::OnLoad(const CString& sArgs, CString& sMessage)
{
VCString vsChans;
VCString::iterator it;
sArgs.Split(",", vsChans, false);
for (it = vsChans.begin(); it != vsChans.end(); it++) {
CString sChan = it->Token(0);
CString sKey = it->Token(1, true);
SetNV(sChan, sKey);
}
// Since we now have these channels added, clear the argument list
SetArgs("");
AddTimer(RunTimer, "StickyChanTimer", 15);
return(true);
}