Changeset - af39c58f687f
[Not reviewed]
0 3 0
HanzZ - 14 years ago 2011-10-26 23:56:50
hanzz.k@gmail.com
Support for line-end comments
3 files changed with 11 insertions and 3 deletions:
0 comments (0 inline, 0 general)
backends/libpurple/main.cpp
Show inline comments
 
@@ -73,12 +73,19 @@ static std::string KEYFILE_STRING(const std::string &cat, const std::string &key
 
	gchar *str = g_key_file_get_string(keyfile, cat.c_str(), key.c_str(), 0);
 
	if (!str) {
 
		return def;
 
	}
 
	std::string ret(str);
 
	free(str);
 

	
 
	if (ret.find("#") != std::string::npos) {
 
		ret = ret.substr(0, ret.find("#"));
 
		while(*(ret.end() - 1) == ' ') {
 
			ret.erase(ret.end() - 1);
 
		}
 
	}
 
	return ret;
 
}
 

	
 
#define KEYFILE_BOOL(CAT, KEY) g_key_file_get_boolean(keyfile, CAT, KEY, 0)
 

	
 
static gboolean nodaemon = FALSE;
spectrum/src/sample.cfg
Show inline comments
 
[service]
 
jid = localhost
 
password = secret
 
server = 127.0.0.1
 
port = 5222
 
server_mode = 1
 
backend_host=localhost # < this option doesn't work yet
 
backend_host=localhost
 
# < this option doesn't work yet
 
backend_port=10001
 
admin_username=admin
 
admin_password=test
 
#cert=server.pfx #patch to PKCS#12 certificate
 
#cert_password=test #password to that certificate if any
 
users_per_backend=10
 
@@ -22,12 +23,12 @@ protocol=any
 
[backend]
 
#default_avatar=catmelonhead.jpg
 
#no_vcard_fetch=true
 

	
 
[logging]
 
#config=logging.cfg # log4cxx/log4j logging configuration file
 
#backend_config=backend_logging.cfg # log4cxx/log4j logging configuration file for backends
 
#backend_config=/home/hanzz/code/libtransport/spectrum/src/backend-logging.cfg # log4cxx/log4j logging configuration file for backends
 

	
 
[database]
 
type = none # or "none" without database backend
 
database = test.sql
 
prefix=icq
spectrum/src/sample2.cfg
Show inline comments
 
@@ -62,13 +62,13 @@ type=xmpp
 

	
 
[logging]
 
# log4cxx/log4j logging configuration file in ini format used for main spectrum2 instance.
 
config = /etc/spectrum2/logging.cfg 
 

	
 
# log4cxx/log4j logging configuration file in ini format used for backends.
 
backend_config = /etc/spectrum2/backend_logging.cfg # log4cxx/log4j logging configuration file for backends
 
backend_config = /etc/spectrum2/backend-logging.cfg # log4cxx/log4j logging configuration file for backends
 

	
 
[database]
 
# Database backend type
 
# "sqlite3", "mysql" or "none" without database backend
 
type = none 
 

	
0 comments (0 inline, 0 general)