mirror of
https://github.com/znc/znc.git
synced 2026-08-06 08:52:57 +02:00
Disable legacy encoding mode when modpython is loaded.
Python is not happy when using non-unicode text as str. Fix #1229
This commit is contained in:
+11
@@ -72,6 +72,7 @@ CZNC::CZNC()
|
||||
m_lpConnectQueue(),
|
||||
m_pConnectQueueTimer(nullptr),
|
||||
m_uiConnectPaused(0),
|
||||
m_uiForceEncoding(0),
|
||||
m_sConnectThrottle(),
|
||||
m_bProtectWebSessions(true),
|
||||
m_bHideVersion(false) {
|
||||
@@ -2071,6 +2072,16 @@ void CZNC::ResumeConnectQueue() {
|
||||
}
|
||||
}
|
||||
|
||||
void CZNC::ForceEncoding() { m_uiForceEncoding++; }
|
||||
void CZNC::UnforceEncoding() { m_uiForceEncoding--; }
|
||||
bool CZNC::IsForcingEncoding() const { return m_uiForceEncoding; }
|
||||
CString CZNC::FixupEncoding(const CString& sEncoding) const {
|
||||
if (sEncoding.empty() && m_uiForceEncoding) {
|
||||
return "UTF-8";
|
||||
}
|
||||
return sEncoding;
|
||||
}
|
||||
|
||||
void CZNC::AddNetworkToQueue(CIRCNetwork* pNetwork) {
|
||||
// Make sure we are not already in the queue
|
||||
if (std::find(m_lpConnectQueue.begin(), m_lpConnectQueue.end(), pNetwork) !=
|
||||
|
||||
Reference in New Issue
Block a user