MOTD Removal

From Valve Developer Community
Revision as of 18:01, 7 February 2016 by Axitonium (talk | contribs) (hl2mp_client.cpp)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


This is a simple code removal to stop the MOTD (Message Of The Day) Panel showing every time you load a map.


In the Server folder of the source look for and open hl2mp_client.cpp

Search for const ConVar *hostname = cvar->FindVar( "hostname" ); at line 66 and comment out or delete the following code block

const ConVar *hostname = cvar->FindVar( "hostname" );
const char *title = (hostname) ? hostname->GetString() : "MESSAGE OF THE DAY";

KeyValues *data = new KeyValues("data");
data->SetString( "title", title );		// info panel title
data->SetString( "type", "1" );			// show userdata from stringtable entry
data->SetString( "msg",	"motd" );		// use this stringtable entry

pPlayer->ShowViewPortPanel( PANEL_INFO, true, data );


The MOTD should now no longer appear every time you load a map