From 954ceb91ddd94985594996d6d3c50be7b5652626 Mon Sep 17 00:00:00 2001
From: Andrei Karas <akaras@inbox.ru>
Date: Tue, 1 Feb 2011 20:58:10 +0200
Subject: Add ability to enable/disable manaserv with embedded enet. Set
 manaserv disabled in automake and cmake by default but enabled in build
 scripts.

---
 src/net/net.cpp      | 5 ++++-
 src/net/serverinfo.h | 3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)

(limited to 'src/net')

diff --git a/src/net/net.cpp b/src/net/net.cpp
index 36e414643..862505fdb 100644
--- a/src/net/net.cpp
+++ b/src/net/net.cpp
@@ -41,7 +41,9 @@
 
 #include "net/tmwa/generalhandler.h"
 
+#ifdef MANASERV_SUPPORT
 #include "net/manaserv/generalhandler.h"
+#endif
 
 Net::AdminHandler *adminHandler = NULL;
 Net::CharHandler *charHandler = NULL;
@@ -157,10 +159,11 @@ void connectToServer(const ServerInfo &server)
 
         switch (server.type)
         {
+#ifdef MANASERV_SUPPORT
             case ServerInfo::MANASERV:
                 new ManaServ::GeneralHandler;
                 break;
-
+#endif
             case ServerInfo::TMWATHENA:
                 new TmwAthena::GeneralHandler;
                 break;
diff --git a/src/net/serverinfo.h b/src/net/serverinfo.h
index 113d8a9b2..74d537b80 100644
--- a/src/net/serverinfo.h
+++ b/src/net/serverinfo.h
@@ -105,9 +105,10 @@ public:
         // Used for backward compatibility
         else if (compareStrI(type, "eathena") == 0)
             return TMWATHENA;
+#ifdef MANASERV_SUPPORT
         else if (compareStrI(type, "manaserv") == 0)
             return MANASERV;
-
+#endif
         return UNKNOWN;
     }
 };
-- 
cgit v1.2.3-70-g09d2