mirror of
https://github.com/znc/znc.git
synced 2026-07-06 09:51:25 +02:00
Added concept of default channels that a user is automatically joined to every time they attach
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@707 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -29,6 +29,14 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
CString sChan;
|
||||
unsigned int a = 0;
|
||||
while (!(sChan = sArgs.Token(a++)).empty()) {
|
||||
if (sChan.Left(2) == "~#") {
|
||||
m_ssDefaultChans.insert(sChan);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -77,6 +85,11 @@ public:
|
||||
m_pClient->PutClient(":" + m_pUser->GetIRCServer() + " 005 " + m_pUser->GetIRCNick().GetNick() + " CHANTYPES=" + m_pUser->GetChanPrefixes() + "~ :are supported by this server.");
|
||||
}
|
||||
|
||||
// Make sure this user is in the default channels
|
||||
for (set<CString>::iterator a = m_ssDefaultChans.begin(); a != m_ssDefaultChans.end(); a++) {
|
||||
m_msChans[*a].insert(m_pUser->GetUserName());
|
||||
}
|
||||
|
||||
for (map<CString, set<CString> >::iterator it = m_msChans.begin(); it != m_msChans.end(); it++) {
|
||||
set<CString>& ssNicks = it->second;
|
||||
|
||||
@@ -316,6 +329,7 @@ public:
|
||||
private:
|
||||
map<CString, set<CString> > m_msChans;
|
||||
set<CUser*> m_spInjectedPrefixes;
|
||||
set<CString> m_ssDefaultChans;
|
||||
};
|
||||
|
||||
GLOBALMODULEDEFS(CPartylineMod, "Internal channels and queries for users connected to znc");
|
||||
|
||||
Reference in New Issue
Block a user