summaryrefslogtreecommitdiff
path: root/src/net/manaserv
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-12-02 14:35:42 -0700
committerJared Adams <jaxad0127@gmail.com>2009-12-02 14:35:42 -0700
commit91761b7926c2503664c4db24c5aa44f817384227 (patch)
treea6c1c5d31593048326f1026fa52997b3003df471 /src/net/manaserv
parentd12c93d4d6fc38eb86b5cb8515f4b8f8a7e96b54 (diff)
downloadmana-91761b7926c2503664c4db24c5aa44f817384227.tar.gz
mana-91761b7926c2503664c4db24c5aa44f817384227.tar.bz2
mana-91761b7926c2503664c4db24c5aa44f817384227.tar.xz
mana-91761b7926c2503664c4db24c5aa44f817384227.zip
Centralize netcode handler instances in Net
Instead of each netcode making the global variables and Net referencing them, Net now makes them and the netcodes reference them. Also remove an innappropriate ChatHandler reference from eA's AdminHandler.
Diffstat (limited to 'src/net/manaserv')
-rw-r--r--src/net/manaserv/adminhandler.cpp2
-rw-r--r--src/net/manaserv/charhandler.cpp2
-rw-r--r--src/net/manaserv/chathandler.cpp2
-rw-r--r--src/net/manaserv/gamehandler.cpp2
-rw-r--r--src/net/manaserv/generalhandler.cpp2
-rw-r--r--src/net/manaserv/guildhandler.cpp2
-rw-r--r--src/net/manaserv/inventoryhandler.cpp2
-rw-r--r--src/net/manaserv/loginhandler.cpp3
-rw-r--r--src/net/manaserv/npchandler.cpp2
-rw-r--r--src/net/manaserv/partyhandler.cpp2
-rw-r--r--src/net/manaserv/playerhandler.cpp2
-rw-r--r--src/net/manaserv/specialhandler.cpp2
-rw-r--r--src/net/manaserv/tradehandler.cpp2
13 files changed, 13 insertions, 14 deletions
diff --git a/src/net/manaserv/adminhandler.cpp b/src/net/manaserv/adminhandler.cpp
index e77d2bec..033e4db9 100644
--- a/src/net/manaserv/adminhandler.cpp
+++ b/src/net/manaserv/adminhandler.cpp
@@ -25,7 +25,7 @@
#include "net/manaserv/messageout.h"
#include "net/manaserv/protocol.h"
-Net::AdminHandler *adminHandler;
+extern Net::AdminHandler *adminHandler;
namespace ManaServ {
diff --git a/src/net/manaserv/charhandler.cpp b/src/net/manaserv/charhandler.cpp
index a239e2d1..ee32c5ae 100644
--- a/src/net/manaserv/charhandler.cpp
+++ b/src/net/manaserv/charhandler.cpp
@@ -43,7 +43,7 @@
#include "utils/gettext.h"
-Net::CharHandler *charHandler;
+extern Net::CharHandler *charHandler;
struct CharInfo {
unsigned char slot;
diff --git a/src/net/manaserv/chathandler.cpp b/src/net/manaserv/chathandler.cpp
index a72fc8fd..4efde53a 100644
--- a/src/net/manaserv/chathandler.cpp
+++ b/src/net/manaserv/chathandler.cpp
@@ -45,7 +45,7 @@
extern Being *player_node;
-Net::ChatHandler *chatHandler;
+extern Net::ChatHandler *chatHandler;
namespace ManaServ {
diff --git a/src/net/manaserv/gamehandler.cpp b/src/net/manaserv/gamehandler.cpp
index c2d20233..8b8b9d0f 100644
--- a/src/net/manaserv/gamehandler.cpp
+++ b/src/net/manaserv/gamehandler.cpp
@@ -28,7 +28,7 @@
#include "main.h"
-Net::GameHandler *gameHandler;
+extern Net::GameHandler *gameHandler;
extern ManaServ::ChatHandler *chatHandler;
diff --git a/src/net/manaserv/generalhandler.cpp b/src/net/manaserv/generalhandler.cpp
index bd8e42ee..e526a4bb 100644
--- a/src/net/manaserv/generalhandler.cpp
+++ b/src/net/manaserv/generalhandler.cpp
@@ -55,7 +55,7 @@
#include <list>
-Net::GeneralHandler *generalHandler = NULL;
+extern Net::GeneralHandler *generalHandler;
extern ManaServ::LoginHandler *loginHandler;
diff --git a/src/net/manaserv/guildhandler.cpp b/src/net/manaserv/guildhandler.cpp
index dfc0e8c5..c87671ea 100644
--- a/src/net/manaserv/guildhandler.cpp
+++ b/src/net/manaserv/guildhandler.cpp
@@ -43,7 +43,7 @@
#include <iostream>
-Net::GuildHandler *guildHandler;
+extern Net::GuildHandler *guildHandler;
namespace ManaServ {
diff --git a/src/net/manaserv/inventoryhandler.cpp b/src/net/manaserv/inventoryhandler.cpp
index e2a579fd..ba4031ec 100644
--- a/src/net/manaserv/inventoryhandler.cpp
+++ b/src/net/manaserv/inventoryhandler.cpp
@@ -38,7 +38,7 @@
#include "log.h" // <<< REMOVE ME!
-Net::InventoryHandler *inventoryHandler;
+extern Net::InventoryHandler *inventoryHandler;
namespace ManaServ {
diff --git a/src/net/manaserv/loginhandler.cpp b/src/net/manaserv/loginhandler.cpp
index 4a0339b4..ff8d142d 100644
--- a/src/net/manaserv/loginhandler.cpp
+++ b/src/net/manaserv/loginhandler.cpp
@@ -33,8 +33,7 @@
#include "utils/gettext.h"
#include "utils/sha256.h"
-Net::LoginHandler *loginHandler;
-
+extern Net::LoginHandler *loginHandler;
namespace ManaServ {
diff --git a/src/net/manaserv/npchandler.cpp b/src/net/manaserv/npchandler.cpp
index 4c4aa53f..9856daeb 100644
--- a/src/net/manaserv/npchandler.cpp
+++ b/src/net/manaserv/npchandler.cpp
@@ -32,7 +32,7 @@
#include "gui/npcpostdialog.h"
#include "gui/npcdialog.h"
-Net::NpcHandler *npcHandler;
+extern Net::NpcHandler *npcHandler;
namespace ManaServ {
diff --git a/src/net/manaserv/partyhandler.cpp b/src/net/manaserv/partyhandler.cpp
index 2426f17e..ae33ead6 100644
--- a/src/net/manaserv/partyhandler.cpp
+++ b/src/net/manaserv/partyhandler.cpp
@@ -38,7 +38,7 @@
#include <iostream>
-Net::PartyHandler *partyHandler;
+extern Net::PartyHandler *partyHandler;
namespace ManaServ {
diff --git a/src/net/manaserv/playerhandler.cpp b/src/net/manaserv/playerhandler.cpp
index 276b2c3a..b0f299b6 100644
--- a/src/net/manaserv/playerhandler.cpp
+++ b/src/net/manaserv/playerhandler.cpp
@@ -87,7 +87,7 @@ namespace {
} deathListener;
}
-Net::PlayerHandler *playerHandler;
+extern Net::PlayerHandler *playerHandler;
namespace ManaServ {
diff --git a/src/net/manaserv/specialhandler.cpp b/src/net/manaserv/specialhandler.cpp
index 17d26d07..c270971d 100644
--- a/src/net/manaserv/specialhandler.cpp
+++ b/src/net/manaserv/specialhandler.cpp
@@ -26,7 +26,7 @@
#include "net/manaserv/messageout.h"
#include "net/manaserv/protocol.h"
-Net::SpecialHandler *specialHandler;
+extern Net::SpecialHandler *specialHandler;
namespace ManaServ {
diff --git a/src/net/manaserv/tradehandler.cpp b/src/net/manaserv/tradehandler.cpp
index bcfe20e9..cbcc29dc 100644
--- a/src/net/manaserv/tradehandler.cpp
+++ b/src/net/manaserv/tradehandler.cpp
@@ -43,7 +43,7 @@
std::string tradePartnerName;
int tradePartnerID;
-Net::TradeHandler *tradeHandler;
+extern Net::TradeHandler *tradeHandler;
namespace ManaServ {