partyline: Only inject prefixes if we know the prefixes

There are apparently "IRC" daemons (which don't deserve that name) that don't
send any 005. Yes, I'm looking at you, chat.wikileaks.org. For these servers we
shouldn't inject partyline's channel prefix because that makes us send out a
"CHANTYPES=~" line which severely confuses clients. XChat then turns everything
into a query!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2162 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2010-10-21 17:27:19 +00:00
parent c9278e8f72
commit e93523c42e
+1 -1
View File
@@ -184,7 +184,7 @@ public:
}
virtual void OnClientLogin() {
if (m_spInjectedPrefixes.find(m_pUser) == m_spInjectedPrefixes.end()) {
if (m_spInjectedPrefixes.find(m_pUser) == m_spInjectedPrefixes.end() && !m_pUser->GetChanPrefixes().empty()) {
m_pClient->PutClient(":" + GetIRCServer(m_pUser) + " 005 " + m_pUser->GetIRCNick().GetNick() + " CHANTYPES=" + m_pUser->GetChanPrefixes() + CHAN_PREFIX_1 " :are supported by this server.");
}