Ticket #3771: 3771_quickly_uglyWIP.patch
File 3771_quickly_uglyWIP.patch, 1.9 KB (added by , 7 years ago) |
---|
-
source/lobby/XmppClient.cpp
114 114 m_client->registerMessageHandler(this); 115 115 116 116 // Uncomment to see the raw stanzas 117 //m_client->getWrapped()->logInstance().registerLogHandler( gloox::LogLevelDebug, gloox::LogAreaAll, this );117 m_client->getWrapped()->logInstance().registerLogHandler( gloox::LogLevelDebug, gloox::LogAreaAll, this ); 118 118 119 119 if (!regOpt) 120 120 { … … 175 175 */ 176 176 void XmppClient::handleLog(gloox::LogLevel level, gloox::LogArea area, const std::string& message) 177 177 { 178 std::cout << "log: level: " << level << ", area: " << area << ", message: " << message << std::endl; 178 //LOGERROR(/*"log: level: %s, area: %s, */"message: %s"/*, level, area*/, message); 179 if (message.find("Users are not allowed to register accounts so quickly") != std::string::npos) 180 { 181 CreateGUIMessage("system", "error", "Users are not allowed to register accounts so quickly"); 182 //LOGERROR("found"); 183 } 179 184 } 180 185 181 186 /***************************************************** -
source/lobby/XmppClient.h
33 33 struct CertInfo; 34 34 } 35 35 36 class XmppClient : public IXmppClient, public glooxwrapper::ConnectionListener, public glooxwrapper::MUCRoomHandler, public glooxwrapper::IqHandler, public glooxwrapper::RegistrationHandler, public glooxwrapper::MessageHandler 36 class XmppClient : public IXmppClient, public glooxwrapper::ConnectionListener, public glooxwrapper::MUCRoomHandler, public glooxwrapper::IqHandler, public glooxwrapper::RegistrationHandler, public glooxwrapper::MessageHandler, public gloox::LogHandler 37 37 { 38 38 NONCOPYABLE(XmppClient); 39 39