summaryrefslogtreecommitdiff
path: root/src/net/serverinfo.h
diff options
context:
space:
mode:
authorjurkan <jurkan@gmx.de>2012-03-21 19:53:50 +0800
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-03-21 22:03:25 +0800
commit347cb6477d1394148340ed0f4650a6ecfaaaaf94 (patch)
tree135ec2a0a233b3063ce548a1631935d01eeb6f11 /src/net/serverinfo.h
parentb3b7a6763ed8d16397965db50a1197f78aaec65a (diff)
downloadmana-347cb6477d1394148340ed0f4650a6ecfaaaaf94.tar.gz
mana-347cb6477d1394148340ed0f4650a6ecfaaaaf94.tar.bz2
mana-347cb6477d1394148340ed0f4650a6ecfaaaaf94.tar.xz
mana-347cb6477d1394148340ed0f4650a6ecfaaaaf94.zip
Added default ports when connecting to a custom server.
When creating a custom server entry, the default port is used if no other port is specified. Reviewed-by: Thorbjørn Lindeijer Mantis-issue: 464
Diffstat (limited to 'src/net/serverinfo.h')
-rw-r--r--src/net/serverinfo.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/net/serverinfo.h b/src/net/serverinfo.h
index e709bed0..8e2ee5b0 100644
--- a/src/net/serverinfo.h
+++ b/src/net/serverinfo.h
@@ -108,6 +108,18 @@ public:
return MANASERV;
return UNKNOWN;
}
+
+ static unsigned short defaultPortForServerType(Type type)
+ {
+ switch (type)
+ {
+ default:
+ case ServerInfo::TMWATHENA:
+ return 6901;
+ case ServerInfo::MANASERV:
+ return 9601;
+ }
+ }
};
typedef std::deque<ServerInfo> ServerInfos;