aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/CalendarHandler.cpp118
-rw-r--r--src/shared/MemoryLeaks.h48
-rw-r--r--src/shared/revision_nr.h4
-rw-r--r--src/trinitycore/monitor-mangosd18
-rw-r--r--src/trinitycore/resource.h15
-rw-r--r--src/trinitycore/run-mangosd14
-rw-r--r--src/trinityrealm/resource.h15
7 files changed, 62 insertions, 170 deletions
diff --git a/src/game/CalendarHandler.cpp b/src/game/CalendarHandler.cpp
deleted file mode 100644
index 9c69e3a91f6..00000000000
--- a/src/game/CalendarHandler.cpp
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include "Common.h"
-#include "Log.h"
-#include "Player.h"
-#include "WorldPacket.h"
-#include "WorldSession.h"
-#include "Opcodes.h"
-
-void WorldSession::HandleCalendarGetCalendar(WorldPacket &recv_data)
-{
- sLog.outDebug("WORLD: CMSG_CALENDAR_GET_CALENDAR");
- recv_data.hexlike();
-}
-
-void WorldSession::HandleCalendarGetEvent(WorldPacket &recv_data)
-{
- sLog.outDebug("WORLD: CMSG_CALENDAR_GET_EVENT");
- recv_data.hexlike();
-}
-
-void WorldSession::HandleCalendarGuildFilter(WorldPacket &recv_data)
-{
- sLog.outDebug("WORLD: CMSG_CALENDAR_GUILD_FILTER");
- recv_data.hexlike();
-}
-
-void WorldSession::HandleCalendarArenaTeam(WorldPacket &recv_data)
-{
- sLog.outDebug("WORLD: CMSG_CALENDAR_ARENA_TEAM");
- recv_data.hexlike();
-}
-
-void WorldSession::HandleCalendarAddEvent(WorldPacket &recv_data)
-{
- sLog.outDebug("WORLD: CMSG_CALENDAR_ADD_EVENT");
- recv_data.hexlike();
-}
-
-void WorldSession::HandleCalendarUpdateEvent(WorldPacket &recv_data)
-{
- sLog.outDebug("WORLD: CMSG_CALENDAR_UPDATE_EVENT");
- recv_data.hexlike();
-}
-
-void WorldSession::HandleCalendarRemoveEvent(WorldPacket &recv_data)
-{
- sLog.outDebug("WORLD: CMSG_CALENDAR_REMOVE_EVENT");
- recv_data.hexlike();
-}
-
-void WorldSession::HandleCalendarCopyEvent(WorldPacket &recv_data)
-{
- sLog.outDebug("WORLD: CMSG_CALENDAR_COPY_EVENT");
- recv_data.hexlike();
-}
-
-void WorldSession::HandleCalendarEventInvite(WorldPacket &recv_data)
-{
- sLog.outDebug("WORLD: CMSG_CALENDAR_EVENT_INVITE");
- recv_data.hexlike();
-}
-
-void WorldSession::HandleCalendarEventRsvp(WorldPacket &recv_data)
-{
- sLog.outDebug("WORLD: CMSG_CALENDAR_EVENT_RSVP");
- recv_data.hexlike();
-}
-
-void WorldSession::HandleCalendarEventRemoveInvite(WorldPacket &recv_data)
-{
- sLog.outDebug("WORLD: CMSG_CALENDAR_EVENT_REMOVE_INVITE");
- recv_data.hexlike();
-}
-
-void WorldSession::HandleCalendarEventStatus(WorldPacket &recv_data)
-{
- sLog.outDebug("WORLD: CMSG_CALENDAR_EVENT_STATUS");
- recv_data.hexlike();
-}
-
-void WorldSession::HandleCalendarEventModeratorStatus(WorldPacket &recv_data)
-{
- sLog.outDebug("WORLD: CMSG_CALENDAR_EVENT_MODERATOR_STATUS");
- recv_data.hexlike();
-}
-
-void WorldSession::HandleCalendarComplain(WorldPacket &recv_data)
-{
- sLog.outDebug("WORLD: CMSG_CALENDAR_COMPLAIN");
- recv_data.hexlike();
-}
-
-void WorldSession::HandleCalendarGetNumPending(WorldPacket &recv_data)
-{
- sLog.outDebug("WORLD: CMSG_CALENDAR_GET_NUM_PENDING");
- recv_data.hexlike();
-
- WorldPacket data(SMSG_CALENDAR_SEND_NUM_PENDING, 4);
- data << uint32(0); // 0 - no pending invites, 1 - some pending invites
- SendPacket(&data);
-}
diff --git a/src/shared/MemoryLeaks.h b/src/shared/MemoryLeaks.h
deleted file mode 100644
index fceb9d6f444..00000000000
--- a/src/shared/MemoryLeaks.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef MANGOSSERVER_MEMORY_H
-#define MANGOSSERVER_MEMORY_H
-
-#include "Platform/CompilerDefs.h"
-
-#if COMPILER == COMPILER_MICROSOFT
-
-#ifndef _WIN64
-// Visual Leak Detector support enabled
-//#include <vld/vld.h>
-// standard Visual Studio leak check disabled,
-//# define _CRTDBG_MAP_ALLOC
-//# include <stdlib.h>
-//# include <crtdbg.h>
-#else
-# define _CRTDBG_MAP_ALLOC
-# include <stdlib.h>
-# include <crtdbg.h>
-#endif
-
-#endif
-
-
-#include "Policies/Singleton.h"
-
-struct MemoryManager : public MaNGOS::Singleton < MemoryManager >
-{
- MemoryManager();
-};
-#endif
diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h
deleted file mode 100644
index 5d6f980e5f4..00000000000
--- a/src/shared/revision_nr.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#ifndef __REVISION_NR_H__
-#define __REVISION_NR_H__
- #define REVISION_NR "6940"
-#endif // __REVISION_NR_H__
diff --git a/src/trinitycore/monitor-mangosd b/src/trinitycore/monitor-mangosd
new file mode 100644
index 00000000000..a740ae5e8fa
--- /dev/null
+++ b/src/trinitycore/monitor-mangosd
@@ -0,0 +1,18 @@
+#!/bin/bash
+# Massive Network Game Object Server
+# Monitoring Script
+
+pid=`ps ax | awk '($5 ~ /mangos-worldd/) { print $1 }'`
+cpu=`top -b -n 1 -p $pid | awk '($12 ~ /mangos-worldd/) { print $9 }'`
+#echo $pid
+#echo $cpu
+intcpu=${cpu%.*}
+#echo $intcpu
+if [ "$intcpu" -gt "95" ]
+then
+ kill -9 $pid
+ echo "Killed MaNGOS for exceeding it's cpu limit."
+ echo `date` ", Killed MaNGOS for $intcpu% CPU Usage." >> serverlog
+else
+ echo "MaNGOS Passes the cpu test."
+fi
diff --git a/src/trinitycore/resource.h b/src/trinitycore/resource.h
new file mode 100644
index 00000000000..7e7d8e4b76f
--- /dev/null
+++ b/src/trinitycore/resource.h
@@ -0,0 +1,15 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by TrinityCore.rc
+//
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 101
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1000
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/src/trinitycore/run-mangosd b/src/trinitycore/run-mangosd
new file mode 100644
index 00000000000..f307bd9e1ad
--- /dev/null
+++ b/src/trinitycore/run-mangosd
@@ -0,0 +1,14 @@
+#!/bin/bash
+# Trinity Server
+# autorestart Script
+
+while :
+do
+ echo "TrinityCore daemon restarted"
+ echo `date` >> crash.log &
+ ./mangosd | tail -n 20 >> crash.log
+ echo " " >> crash.log &
+ pid=`ps ax | awk '($5 ~ /trinitycore/) { print $1 }'`
+ wait $pid
+ echo `date` ", TrinityCore daemon crashed and restarted." >> serverlog
+done
diff --git a/src/trinityrealm/resource.h b/src/trinityrealm/resource.h
new file mode 100644
index 00000000000..7e7d8e4b76f
--- /dev/null
+++ b/src/trinityrealm/resource.h
@@ -0,0 +1,15 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by TrinityCore.rc
+//
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 101
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1000
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif