mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Add support for character encodings
Previous commit added support of it to Csocket. When encoding is specified, core will convert incoming messages to UTF-8, and outgoing messages from UTF-8. When no encoding is specified, it will do nothing to bytes, like before. This is to be changed somewhere in future, to have UTF-8 on wire by default too. When encoding's name starts with *, incoming messages will be treated as UTF-8, if it is already correct UTF-8. Otherwise, it's converted. Fix #151 Fix #366
This commit is contained in:
@@ -673,6 +673,7 @@ void CClient::AcceptLogin(CUser& User) {
|
||||
SetTimeout(540, TMO_READ);
|
||||
|
||||
SetSockName("USR::" + m_pUser->GetUserName());
|
||||
SetEncoding(m_pUser->GetClientEncoding());
|
||||
|
||||
if (!m_sNetwork.empty()) {
|
||||
m_pNetwork = m_pUser->FindNetwork(m_sNetwork);
|
||||
|
||||
Reference in New Issue
Block a user