Changeset - ff62fff115f8
[Not reviewed]
Merge
0 1 0
Jan Kaluza - 13 years ago 2012-07-17 15:40:42
hanzz.k@gmail.com
Merge pull request #10 from arnt/master

Here's my one-liner to avoid WTF-8 without depending on the locale to be "right"
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
backends/libcommuni/singleircnetworkplugin.cpp
Show inline comments
 
@@ -49,24 +49,25 @@ void SingleIRCNetworkPlugin::handleLoginRequest(const std::string &user, const s
 
	if (m_sessions[user] != NULL) {
 
		LOG4CXX_WARN(logger, user << ": Already logged in.");
 
		return;
 
	}
 
	LOG4CXX_INFO(logger, user << ": Connecting " << m_server << " as " << legacyName);
 

	
 
	MyIrcSession *session = new MyIrcSession(user, this);
 
	session->setUserName(FROM_UTF8(legacyName));
 
	session->setNickName(FROM_UTF8(legacyName));
 
	session->setRealName(FROM_UTF8(legacyName));
 
	session->setHost(FROM_UTF8(m_server));
 
	session->setPort(6667);
 
	session->setEncoding( "utf-8" );
 

	
 
	if (!password.empty()) {
 
		std::string identify = m_identify;
 
		boost::replace_all(identify, "$password", password);
 
		boost::replace_all(identify, "$name", legacyName);
 
		session->setIdentify(identify);
 
	}
 

	
 
	session->open();
 

	
 
	m_sessions[user] = session;
 
}
0 comments (0 inline, 0 general)