summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-13 20:31:54 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-13 20:31:54 +0000
commitd9e3bb8d4343643504ab7ee6ab943a000065cc8a (patch)
tree24d5d857f66b843f2d08c8a39ebbf812592c0f73 /src/inspircd.cpp
parent8f9dafbfa3b62b1c88a8b1ad7988d5786f914528 (diff)
Remove redundant ServerInstance* fields
It has been impossible to have more than one InspIRCd* object in the same address space for some time now, and this feature was never used. This formalizes class InspIRCd as a singleton object. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11703 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 3d80f5250..8f763e2b6 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -43,7 +43,7 @@
#include "caller.h"
#include "testsuite.h"
-InspIRCd* SI = NULL;
+InspIRCd* ServerInstance = NULL;
int* mysig = NULL;
/** Seperate from the other casemap tables so that code *can* still exclusively rely on RFC casemapping
@@ -351,6 +351,8 @@ InspIRCd::InspIRCd(int argc, char** argv) :
WindowsIPC = 0;
#endif
+ ServerInstance = this;
+
Extensible::Register(&User::NICKForced);
Extensible::Register(&User::OperQuit);
@@ -888,9 +890,9 @@ void InspIRCd::SetSignal(int signal)
*/
ENTRYPOINT
{
- SI = new InspIRCd(argc, argv);
- mysig = &SI->s_signal;
- SI->Run();
- delete SI;
+ new InspIRCd(argc, argv);
+ mysig = &ServerInstance->s_signal;
+ ServerInstance->Run();
+ delete ServerInstance;
return 0;
}