Beispiel #1
0
std::string Trace::ShowShort()
{
	std::string editedby = "unknown";
	
	try {
		AccountPtr account = mud::AccountManager::Get()->GetByKey(getAccount());
		editedby = account->getName();
	} catch(RowNotFoundException& e) {
		
	}
	
	return Global::Get()->sprintf("%s (%ld): %s\n", 
			editedby.c_str(),
			getTime(),
			getDescription().c_str());
}
Beispiel #2
0
std::vector<std::string> Trace::Show()
{
	std::vector<std::string> result;
	std::string editedby = "unknown";
	
	try {
		AccountPtr account = mud::AccountManager::Get()->GetByKey(getAccount());
		editedby = account->getName();
	} catch(RowNotFoundException& e) {
		
	}
	
	result.push_back(Global::Get()->sprintf("Account: '%s'.", editedby.c_str()));
	result.push_back(Global::Get()->sprintf("Description: '%s'.", getDescription().c_str()));
	result.push_back(Global::Get()->sprintf("Diff: %s.", getDiff().c_str()));
	result.push_back(Global::Get()->sprintf("Time: %ld.", getTime()));
	
	return result;
}