Skip to content

Commit

Permalink
Merge branch 'master' of github.com:skyjake/Doomsday-Engine
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Mar 28, 2013
2 parents 2b9fb72 + bd15e74 commit 86d1c59
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 43 deletions.
9 changes: 8 additions & 1 deletion doomsday/client/src/network/masterserver.cpp
Expand Up @@ -269,7 +269,14 @@ void N_MasterAnnounceServer(boolean isOpen)
{
#ifdef __SERVER__
// Must be a server.
if(isClient) return;
if(isClient) return;

if(isOpen && !strlen(netPassword))
{
Con_Message("Cannot announce server as public: no shell password set!\n"
"You must set one with the 'server-password' cvar.");
return;
}

DEBUG_Message(("N_MasterAnnounceServer: Announcing as open=%i.\n", isOpen));

Expand Down
43 changes: 1 addition & 42 deletions doomsday/client/src/network/net_main.cpp
Expand Up @@ -1221,13 +1221,11 @@ D_CMD(Net)
Con_Printf(" setup client\n");
Con_Printf(" search (address) [port] (local or targeted query)\n");
Con_Printf(" servers (asks the master server)\n");
//Con_Printf(" connect (idx)\n");
Con_Printf(" connect (idx)\n");
Con_Printf(" mconnect (m-idx)\n");
Con_Printf(" disconnect\n");
#endif
#ifdef __SERVER__
Con_Printf(" server go/start\n");
Con_Printf(" server close/stop\n");
Con_Printf(" announce\n");
#endif
return true;
Expand Down Expand Up @@ -1284,45 +1282,6 @@ D_CMD(Net)

if(argc == 3) // Two arguments?
{
#ifdef __SERVER__
if(!stricmp(argv[1], "server"))
{
if(!stricmp(argv[2], "go") || !stricmp(argv[2], "start"))
{
if(netGame)
{
Con_Message("Already in a netGame.");
return false;
}

CmdReturnValue = success = N_ServerOpen();

if(success)
{
Con_Message("Server \"%s\" started.", serverName);
}
}
else if(!stricmp(argv[2], "close") || !stricmp(argv[2], "stop"))
{
if(!isServer)
{
Con_Message("This is not a server!");
return false;
}

// Close the server and kick everybody out.
if((success = N_ServerClose()) != false)
{
Con_Message("Server \"%s\" closed.", serverName);
}
}
else
{
Con_Message("Bad arguments.");
return false;
}
}
#endif // __SERVER__
#ifdef __CLIENT__
if(!stricmp(argv[1], "search"))
{
Expand Down

0 comments on commit 86d1c59

Please sign in to comment.