mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
Changed so that a MOTD will also display when there is no ServerName message (as proposed by karlos on the forums).
This commit is contained in:
parent
e15c151167
commit
f06796c275
@ -79,12 +79,15 @@ void UTIL_ShowMenu( edict_t* pEdict, int slots, int time, char *menu, int mlen )
|
||||
/* warning - don't pass here const string */
|
||||
void UTIL_ShowMOTD( edict_t *client , char *motd, int mlen, const char *name)
|
||||
{
|
||||
if (!gmsgServerName)
|
||||
if (!gmsgMOTD)
|
||||
return; // :TODO: Maybe output a warning log?
|
||||
|
||||
if (gmsgServerName)
|
||||
{
|
||||
MESSAGE_BEGIN( MSG_ONE , gmsgServerName, NULL, client );
|
||||
WRITE_STRING(name);
|
||||
MESSAGE_END();
|
||||
}
|
||||
|
||||
char *n = motd;
|
||||
char c = 0;
|
||||
@ -104,9 +107,12 @@ void UTIL_ShowMOTD( edict_t *client , char *motd, int mlen, const char *name)
|
||||
motd = n;
|
||||
}
|
||||
|
||||
if (gmsgServerName)
|
||||
{
|
||||
MESSAGE_BEGIN( MSG_ONE , gmsgServerName, NULL, client );
|
||||
WRITE_STRING( hostname->string );
|
||||
MESSAGE_END();
|
||||
}
|
||||
}
|
||||
|
||||
void UTIL_IntToString(int value, char *output)
|
||||
|
Loading…
Reference in New Issue
Block a user