summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 0af9d113c..6f4095148 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -71,6 +71,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "util/string.h"
#include "subgame.h"
#include "quicktune.h"
+#include "serverlist.h"
/*
Settings.
@@ -1581,7 +1582,7 @@ int main(int argc, char *argv[])
if(menudata.selected_world != -1)
g_settings->set("selected_world_path",
worldspecs[menudata.selected_world].path);
-
+
// Break out of menu-game loop to shut down cleanly
if(device->run() == false || kill == true)
break;
@@ -1598,6 +1599,15 @@ int main(int argc, char *argv[])
current_address = "";
current_port = 30011;
}
+ else if (address != "")
+ {
+ ServerListSpec server;
+ server.name = menudata.servername;
+ server.address = wide_to_narrow(menudata.address);
+ server.port = wide_to_narrow(menudata.port);
+ server.description = menudata.serverdescription;
+ ServerList::insert(server);
+ }
// Set world path to selected one
if(menudata.selected_world != -1){