diff options
| author | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:46 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:46 +0200 |
| commit | eab0b1c2d649fa16707b24cd2a91f195078167b0 (patch) | |
| tree | e960f351655305e3911089ff75677caef364a280 /src/conf | |
| parent | 07706f56cd421bf8b101a5c0fe44674d36e161a0 (diff) | |
tagging ychat-0.7.2ychat-0.7.2
Diffstat (limited to 'src/conf')
| -rwxr-xr-x | src/conf/conf.cpp | 14 | ||||
| -rwxr-xr-x | src/conf/conf.h | 3 |
2 files changed, 13 insertions, 4 deletions
diff --git a/src/conf/conf.cpp b/src/conf/conf.cpp index 99347e9..67849ef 100755 --- a/src/conf/conf.cpp +++ b/src/conf/conf.cpp @@ -12,7 +12,7 @@ conf::conf( string s_conf, map<string,string>* p_start_params ) : nmap<string,st { string s_check[] = { get_name(), - string(getenv("HOME"))+string("/.yhttpd/") + get_name(), + string(getenv("HOME"))+string("/.ychat/") + get_name(), string("./etc/") + get_name(), string("/etc/") + get_name(), string(PREFIX+string("etc/")+get_name()) }; @@ -56,9 +56,9 @@ conf::conf( string s_conf, map<string,string>* p_start_params ) : nmap<string,st vector<string> vec_string; parse_xml(p_xml, &vec_string); - nmap<string,string>::add_elem_insecure(tool::yhttpd_version(), "yhttpd.version"); + nmap<string,string>::add_elem_insecure(tool::ychat_version(), "ychat.version"); - // Overrides yhttpd.conf values with command line options (yhttpd -o key1 value1 -o key2 value2 ...) + // Overrides ychat.conf values with command line options (ychat -o key1 value1 -o key2 value2 ...) map<string,string>::iterator iter; for ( iter = p_start_params->begin(); iter != p_start_params->end(); iter++ ) { @@ -152,4 +152,12 @@ conf::exit_if_xml_error() const } } +//<<* +string +conf::colored_error_msg(string s_key) +{ + return "<font color=\"#" + nmap<string,string>::get_elem("chat.html.errorcolor") + "\">" + nmap<string,string>::get_elem(s_key) + "</font><br>\n"; +} +//*>> + #endif diff --git a/src/conf/conf.h b/src/conf/conf.h index 7508872..7ff69ac 100755 --- a/src/conf/conf.h +++ b/src/conf/conf.h @@ -19,9 +19,10 @@ private: void exit_if_xml_error() const; void parse_xml( TiXmlNode* p_node, vector<string>* p_vec); public: - //conf ( string s_conf ); conf ( string s_conf, map<string,string>* p_start_params ); ~conf(); + + string colored_error_msg( string s_key ); //<< }; #endif |
