sourcemm/concommands.cpp
changeset 287 0492209c065f
parent 282 7a237e9ea5a1
child 296 ba7337defd34
     1.1 --- a/sourcemm/concommands.cpp	Mon Feb 19 13:17:07 2007 +0000
     1.2 +++ b/sourcemm/concommands.cpp	Wed Feb 21 01:51:54 2007 +0000
     1.3 @@ -156,6 +156,32 @@
     1.4  			CONMSG("  DLL Path: %s\n", g_BinPath.c_str());
     1.5  			CONMSG("  Interface: ServerGameDLL%03d\n", g_GameDllVersion);
     1.6  
     1.7 +			// Display user messages
     1.8 +			if (g_SmmAPI.MsgCacheSuccessful())
     1.9 +			{
    1.10 +				const char *msgname;
    1.11 +				int msgsize;
    1.12 +				int msgcount = g_SmmAPI.GetUserMessageCount();
    1.13 +
    1.14 +				if (msgcount > 0)
    1.15 +				{
    1.16 +					CONMSG("  User Messages:  %-32.31s  %-5s  %-5s\n", "Name", "Index", "Size");
    1.17 +
    1.18 +					for (int i = 0; i < msgcount; i++)
    1.19 +					{
    1.20 +						msgname = g_SmmAPI.GetUserMessage(i, &msgsize);
    1.21 +
    1.22 +						CONMSG("                  %-32.31s  %-5d  %-5d\n", msgname, i, msgsize); 
    1.23 +					}
    1.24 +
    1.25 +					CONMSG("  %d user message%s in total\n", msgcount, (msgcount > 1) ? "s" : "");
    1.26 +				} else {
    1.27 +					CONMSG("  User Messages: None\n");
    1.28 +				}
    1.29 +			} else {
    1.30 +				CONMSG("  User Messages: Failed to get list of user messages\n");
    1.31 +			}
    1.32 +
    1.33  			return;
    1.34  		} else if (strcmp(command, "refresh") == 0) {
    1.35  			char full_path[255];