diff options
| author | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:45 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:45 +0200 |
| commit | 9dcec1feba68dc5ba38cdc634f5bf113c0f77348 (patch) | |
| tree | 1d3b0191f4377b0b93ebc67b989e4b8a4f9c3671 /src/cli | |
| parent | d34015c5ba231b95de20e9fcd7a33c5b2b9a1006 (diff) | |
tagging yhttpd-0.7.2yhttpd-0.7.2
Diffstat (limited to 'src/cli')
| -rwxr-xr-x | src/cli/cli.cpp | 46 | ||||
| -rwxr-xr-x | src/cli/cli.h | 16 |
2 files changed, 13 insertions, 49 deletions
diff --git a/src/cli/cli.cpp b/src/cli/cli.cpp index 0e7b531..0adddb1 100755 --- a/src/cli/cli.cpp +++ b/src/cli/cli.cpp @@ -31,7 +31,7 @@ cli::parse_input( string s_input ) if ( s_input.compare("help") == 0 || s_input.compare("h") == 0) { cout << CLIPRMO << "COMMAND LINE INTERFACE HELP MENU" << endl - << CLIPRMO << " !command - Uses system to run a command" << endl; + << CLIPRMO << " !command - Uses system to run a command" << endl; #ifdef DEBUG cout << CLIPRMO << " (d)ebug - Starts debug routine (cli.cpp)" << endl; @@ -47,22 +47,17 @@ cli::parse_input( string s_input ) #endif cout << CLIPRMO << " (h)elp - Prints out this help!" << endl; - //<<* - cout << CLIPRMO << " (m)ysql - Runs MySQL client on yChat DB" << endl - << CLIPRMO << " (rel)oad - Reloads all modules" << endl; - //*>> #ifdef EXPERIM cout << CLIPRMO << " (re)conf - Reloads configuration (EXPERIMENTAL)" << endl; #endif cout << CLIPRMO << " (r)usage - Shows current resource usage" << endl - << CLIPRMO << " (ru)sageh - Shows resource usage history (yChat needs to run > 1 day)" << endl + << CLIPRMO << " (ru)sageh - Shows resource usage history (yhttpd needs to run > 1 day)" << endl << CLIPRMO << " (set) VAR VAL - Sets configuration value VAR to VAL" << endl << CLIPRMO << " (sh)ell - Runs a system shell" << endl << CLIPRMO << " (s)hutdown - Shuts down the whole server" << endl << CLIPRMO << " (t)ime - Prints out time and uptime" << endl; - cout << CLIPRMO << " (unl)oad - Unloads all loaded modules" << endl;//<< cout << CLIPRMO << " (u)nset VAR - Deletes configuration value VAR" << endl << CLIPRMO << " (v)ersion - Prints out version" << endl; cout << CLIPRMI; @@ -115,19 +110,6 @@ cli::parse_input( string s_input ) cout << CLIPRMI; } - //<<* - else if( s_input.compare("mysql") == 0 || s_input.compare("m") == 0 ) - { - cout << CLIPRMO << CLIMSQL << endl; - - system((wrap::CONF->get_elem("chat.system.mysqlclient") + " -p -h " + - wrap::CONF->get_elem("chat.database.serverhost") + " -u " + - wrap::CONF->get_elem("chat.database.user") ).c_str()); - - cout << CLIPRMO << CLIWELC << endl; - cout << CLIPRMI; - } - //*>> #ifdef NCURSES else if( s_input.compare("exit") == 0 || s_input.compare("ex") == 0 ) @@ -136,20 +118,11 @@ cli::parse_input( string s_input ) } #endif - //<<* - else if( s_input.compare("reload") == 0 || s_input.compare("rel") == 0 ) - { - cout << CLIPRMO; - wrap::MODL->reload_modules(); - cout << MODRELO << endl; - cout << CLIPRMI; - } - //*>> #ifdef EXPERIM else if( s_input.compare("reconf") == 0 || s_input.compare("re") == 0 ) { - wrap::CHAT->reconf(); + wrap::HTTPD->reconf(); cout << CLIPRMI; } #endif @@ -210,15 +183,6 @@ cli::parse_input( string s_input ) cout << CLIPRMI; } - //<<* - else if( s_input.compare("unl") == 0 || s_input.compare("unload") == 0 ) - { - cout << CLIPRMO; - wrap::MODL->unload_modules(); - cout << MODUNLO << endl; - cout << CLIPRMI; - } - //*>> else if( s_input.compare("u") == 0 || s_input.compare("unset") == 0 ) { @@ -239,7 +203,7 @@ cli::parse_input( string s_input ) } else if( s_input.compare("v") == 0 || s_input.compare("version") == 0 ) { - cout << CLIPRMO << tool::ychat_version() << " " << UNAME << endl; + cout << CLIPRMO << tool::yhttpd_version() << " " << UNAME << endl; cout << CLIPRMI; } else @@ -295,7 +259,7 @@ cli::print_rusage() } vector<string> -cli::vectorize(string s_param) +cli::vectorize(string s_param) { vector<string> vec_ret; unsigned i_pos; diff --git a/src/cli/cli.h b/src/cli/cli.h index 8ec75cb..7d51e3f 100755 --- a/src/cli/cli.h +++ b/src/cli/cli.h @@ -30,30 +30,30 @@ using namespace std; class cli : public thro { #else -class cli +class cli { #endif private: int parse_input(string s_input); vector<string> vectorize(string s_param); - + public: - cli( ); - ~cli( ); +cli( ); +~cli( ); #ifdef DEBUG - void debug_routine(); +void debug_routine(); #endif - void print_rusage(); +void print_rusage(); #ifndef NCURSES - void start(void* p_void); +void start(void* p_void); #else - void start(); +void start(); #endif }; |
