Changeset - 16e3bc94250c
[Not reviewed]
0 2 0
Jan Kaluza - 13 years ago 2012-12-10 14:00:16
hanzz.k@gmail.com
set needPassword=false in twitter backend
2 files changed with 11 insertions and 0 deletions:
0 comments (0 inline, 0 general)
backends/twitter/TwitterPlugin.cpp
Show inline comments
 
@@ -40,6 +40,7 @@ TwitterPlugin::TwitterPlugin(Config *config, Swift::SimpleEventLoop *loop, Stora
 
{
 
	this->config = config;
 
	this->storagebackend = storagebackend;
 
	this->m_firstPing = true;
 

	
 
	if (CONFIG_HAS_KEY(config, "twitter.consumer_key") == false) {
 
		consumerKey = "5mFePMiJi0KpeURONkelg";
 
@@ -104,6 +105,15 @@ void TwitterPlugin::sendData(const std::string &string)
 
// Receive date from the NetworkPlugin server and invoke the appropirate payload handler (implement in the NetworkPlugin class)
 
void TwitterPlugin::_handleDataRead(boost::shared_ptr<Swift::SafeByteArray> data) 
 
{
 
	if (m_firstPing) {
 
		m_firstPing = false;
 
		// Users can join the network without registering if we allow
 
		// one user to connect multiple IRC networks.
 
		NetworkPlugin::PluginConfig cfg;
 
		cfg.setNeedPassword(false);
 
		sendConfig(cfg);
 
	}
 

	
 
	std::string d(data->begin(), data->end());
 
	handleDataRead(d);
 
}
backends/twitter/TwitterPlugin.h
Show inline comments
 
@@ -174,5 +174,6 @@ class TwitterPlugin : public NetworkPlugin {
 
			UserData() { sessions = NULL; }
 
		};
 
		std::map<std::string, UserData> userdb;
 
		bool m_firstPing;
 
};
 
#endif
0 comments (0 inline, 0 general)