Changeset - 1330e37ad04b
[Not reviewed]
0 3 0
Jan Kaluza - 13 years ago 2012-08-21 08:48:54
hanzz.k@gmail.com
Set default twitter consumer_key and consumer_secret
3 files changed with 22 insertions and 13 deletions:
0 comments (0 inline, 0 general)
backends/twitter/TwitterPlugin.cpp
Show inline comments
 
@@ -41,20 +41,29 @@ TwitterPlugin::TwitterPlugin(Config *config, Swift::SimpleEventLoop *loop, Stora
 
	this->config = config;
 
	this->storagebackend = storagebackend;
 

	
 
	if(CONFIG_HAS_KEY(config, "twitter.consumer_key") == false ||
 
	   CONFIG_HAS_KEY(config, "twitter.consumer_secret") == false) {
 
		LOG4CXX_ERROR(logger, "Couldn't find consumer key and/or secret. Please check config file.");
 
		exit(0);
 
	if (CONFIG_HAS_KEY(config, "twitter.consumer_key") == false) {
 
		consumerKey = "5mFePMiJi0KpeURONkelg";
 
	}
 
	
 
	else {
 
		consumerKey = CONFIG_STRING(config, "twitter.consumer_key");
 
	}
 
	if (CONFIG_HAS_KEY(config, "twitter.consumer_secret") == false) {
 
		consumerSecret = "YFZCDJwRhbkccXEnaYr1waCQejTJcOY8F7l5Wim3FA";
 
	}
 
	else {
 
		consumerSecret = CONFIG_STRING(config, "twitter.consumer_secret");
 
	}
 

	
 
	if (consumerSecret.empty() || consumerKey.empty()) {
 
		LOG4CXX_ERROR(logger, "Consumer key and Consumer secret can't be empty.");
 
		exit(1);
 
	}
 

	
 
	adminLegacyName = "twitter.com"; 
 
	adminChatRoom = "#twitter"; 
 
	adminNickName = "twitter"; 
 
	adminAlias = "twitter";
 

	
 
	consumerKey = CONFIG_STRING(config, "twitter.consumer_key");
 
	consumerSecret = CONFIG_STRING(config, "twitter.consumer_secret");
 

	
 
	OAUTH_KEY = "twitter_oauth_token";
 
	OAUTH_SECRET = "twitter_oauth_secret";
 
	MODE = "mode";
docs/guide/CMakeLists.txt
Show inline comments
 
macro(ADD_TEXTILE SRC TITLE)
 
	MESSAGE(STATUS "Process file: ${SRC}")
 
	STRING(REGEX REPLACE ".textile\$" "" outfileName "${SRC}")
 
	SET(outfile "${CMAKE_CURRENT_BINARY_DIR}/${outfileName}.html")
 
	# Custom command to do the processing
 
	message(STATUS "FILES" ${outfile})
 
	if(${ARGN})
 
		ADD_CUSTOM_COMMAND(OUTPUT "${outfile}"
 
			COMMAND pandoc -o "${outfile}" "${SRC}" -f textile -t html -s --base-header-level=2 --template=template.html -T "${TITLE}"
 
@@ -21,6 +19,7 @@ endmacro()
 

	
 
ADD_TEXTILE("index.textile" "Spectrum 2 documentation" 1)
 
ADD_TEXTILE("config_file.textile" "Spectrum 2 - Config File")
 
ADD_TEXTILE("from_source_code.textile" "Spectrum 2 - Installing from source code")
 
ADD_TEXTILE("server_ssl.textile" "Spectrum 2 - Server mode SSL support")
 
ADD_TEXTILE("mysql.textile" "Spectrum 2 - MySQL Support")
 
ADD_TEXTILE("postgresql.textile" "Spectrum 2 - PostgreSQL Support")
 
@@ -28,5 +27,5 @@ ADD_TEXTILE("logging.textile" "Spectrum 2 - Logging")
 

	
 

	
 
# Setup a target to drive the conversion
 
ADD_CUSTOM_TARGET(guide ALL DEPENDS ${outFiles})
 
ADD_CUSTOM_TARGET(guide DEPENDS ${outFiles})
 

	
docs/guide/index.textile
Show inline comments
 
h2. About
 

	
 
h2. Installing
 
h2. Installation
 
* "From source code":from_source_code.html
 

	
 
h2. Configuring
 
h2. Configuration
 

	
 
* "Configuration file description":config_file.html
 
* "MySQL Support":mysql.html
0 comments (0 inline, 0 general)