diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-26 21:29:18 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-26 21:29:18 +0300 |
commit | 17a96c972cd483fa556a79c4cd60e5d7490177a4 (patch) | |
tree | fc745dec71523b49428838582a5aa40712538140 /src/commands.cpp | |
parent | c06c787acceec22845f023b2f849858d36af6585 (diff) | |
download | mv-17a96c972cd483fa556a79c4cd60e5d7490177a4.tar.gz mv-17a96c972cd483fa556a79c4cd60e5d7490177a4.tar.bz2 mv-17a96c972cd483fa556a79c4cd60e5d7490177a4.tar.xz mv-17a96c972cd483fa556a79c4cd60e5d7490177a4.zip |
Move chat command /uptime into actions.
Diffstat (limited to 'src/commands.cpp')
-rw-r--r-- | src/commands.cpp | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/src/commands.cpp b/src/commands.cpp index 8f89d59be..29e850208 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -157,75 +157,6 @@ impHandler(hack) return true; } -impHandler0(uptime) -{ - if (!debugChatTab) - return false; - - if (cur_time < start_time) - { - // TRANSLATORS: uptime command - debugChatTab->chatLog(strprintf(_("Client uptime: %s"), "unknown")); - } - else - { - std::string str; - int timeDiff = cur_time - start_time; - - const int weeks = timeDiff / 60 / 60 / 24 / 7; - if (weeks > 0) - { - // TRANSLATORS: uptime command - str = strprintf(ngettext(N_("%d week"), N_("%d weeks"), - weeks), weeks); - timeDiff -= weeks * 60 * 60 * 24 * 7; - } - - const int days = timeDiff / 60 / 60 / 24; - if (days > 0) - { - if (!str.empty()) - str.append(", "); - // TRANSLATORS: uptime command - str.append(strprintf(ngettext(N_("%d day"), N_("%d days"), - days), days)); - timeDiff -= days * 60 * 60 * 24; - } - const int hours = timeDiff / 60 / 60; - if (hours > 0) - { - if (!str.empty()) - str.append(", "); - // TRANSLATORS: uptime command - str.append(strprintf(ngettext(N_("%d hour"), N_("%d hours"), - hours), hours)); - timeDiff -= hours * 60 * 60; - } - const int min = timeDiff / 60; - if (min > 0) - { - if (!str.empty()) - str.append(", "); - // TRANSLATORS: uptime command - str.append(strprintf(ngettext(N_("%d minute"), N_("%d minutes"), - min), min)); - timeDiff -= min * 60; - } - - if (timeDiff > 0) - { - if (!str.empty()) - str.append(", "); - // TRANSLATORS: uptime command - str.append(strprintf(ngettext(N_("%d second"), N_("%d seconds"), - timeDiff), timeDiff)); - } - // TRANSLATORS: uptime command - debugChatTab->chatLog(strprintf(_("Client uptime: %s"), str.c_str())); - } - return true; -} - impHandler(addPriorityAttack) { if (!actorManager |