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 | 5f4e214740242513c837c8a005ca23779bab1d0c (patch) | |
| tree | 3880f745b0d3376030e3342e60679f25b38bdc4c /src/monitor/dump.cpp | |
| parent | 23c5e7d57e1e9216f4da3446656df2dc7202975d (diff) | |
tagging ychat-0.8.2ychat-0.8.2
Diffstat (limited to 'src/monitor/dump.cpp')
| -rw-r--r-- | src/monitor/dump.cpp | 38 |
1 files changed, 26 insertions, 12 deletions
diff --git a/src/monitor/dump.cpp b/src/monitor/dump.cpp index 6b49bfe..71cc862 100644 --- a/src/monitor/dump.cpp +++ b/src/monitor/dump.cpp @@ -8,13 +8,13 @@ using namespace std; const string dumpable::s_sep = "->"; const int dumpable::i_max_level = 100; -dumpable::dumpable() +dumpable::dumpable() { initialize(0); } void -dumpable::initialize(int i_level) +dumpable::initialize(int i_level) { this->i_level = i_level; this->i_lined = i_level; @@ -24,13 +24,13 @@ dumpable::initialize(int i_level) } string -dumpable::dump() +dumpable::dump() { return dump(0); } string -dumpable::dump(int i_level) +dumpable::dump(int i_level) { initialize(i_level); dumpit(); @@ -38,34 +38,37 @@ dumpable::dump(int i_level) } void -dumpable::add(string s_line) +dumpable::add + (string s_line) { if ( i_lined > i_max_level ) i_lined = i_max_level; - if (!b_lined) + if (!b_lined) s_dump.append(s_sep); - else for ( int i = 0; i < i_lined; ++i ) - s_dump.append(" "); + else + for ( int i = 0; i < i_lined; ++i ) + s_dump.append(" "); s_dump.append(s_line); - if (b_next_no_nl) + if (b_next_no_nl) b_next_no_nl = false; else s_dump.append("\n"); - if (!b_lined) { + if (!b_lined) + { b_lined = true; i_lined = i_level + s_sep.length(); } } int -dumpable::get_level() const -{ +dumpable::get_level() const +{ return i_lined; } @@ -74,6 +77,7 @@ dump::dump(vector<string> vec_params) if (vec_params.empty()) { cout << CLIPRMO << "all conf sock"; + cout << " chat modl sman"; //<< Not for yhttpd cout << endl; return; } @@ -98,6 +102,16 @@ dump::run(vector<string> &vec_params) if (!s_part.compare("sock") || !s_part.compare("all")) s_ret.append(wrap::SOCK->dump()); + //<<* + if (!s_part.compare("modl") || !s_part.compare("all")) + s_ret.append(wrap::MODL->dump()); + + if (!s_part.compare("sman") || !s_part.compare("all")) + s_ret.append(wrap::SMAN->dump()); + + if (!s_part.compare("chat") || !s_part.compare("all")) + s_ret.append(wrap::CHAT->dump()); + //*>> } return s_ret; |
