Exemple #1
0
BOOL CMDUptime::Execute(const std::string &verb, Player* mobile,std::vector<std::string> &args,int subcmd)
{
    World* world = World::GetPtr();
    TimeInfo ruptime(time(NULL)-world->GetRealUptime());
    TimeInfo cuptime(time(NULL)-world->GetCopyoverUptime());

    mobile->Message(MSG_INFO,Capitalize(MUD_NAME)+" has been up for "+ruptime.ToString()+".");
    if (world->GetCopyoverUptime() == 0)
        {
            mobile->Message(MSG_INFO,"There hasn't been a copyover this reboot.");
        }
    else
        {
            mobile->Message(MSG_INFO,"The last copyover occured "+cuptime.ToString()+" ago.");
        }

    return true;
}