diff options
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/serverinfo.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/net/serverinfo.h b/src/net/serverinfo.h index 63d50ce4..803bcc71 100644 --- a/src/net/serverinfo.h +++ b/src/net/serverinfo.h @@ -83,6 +83,16 @@ public: return (type != other.type || hostname != other.hostname || port != other.port); } + + static Type parseType(const std::string &type) + { + if (compareStrI(type, "eathena") == 0) + return EATHENA; + else if (compareStrI(type, "manaserv") == 0) + return MANASERV; + + return UNKNOWN; + } }; typedef std::vector<ServerInfo> ServerInfos; |