mirror of
https://github.com/znc/znc.git
synced 2026-08-07 09:22:55 +02:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user