aboutsummaryrefslogtreecommitdiff
path: root/src/trinitycore
diff options
context:
space:
mode:
authormegamage <none@none>2009-02-18 11:36:19 -0600
committermegamage <none@none>2009-02-18 11:36:19 -0600
commit31637d4aac6ae2081ccb3db976cab17936019f1a (patch)
treea0e098d4afafaddcb901486d00da1563ecd628b9 /src/trinitycore
parent017f309b5b5b981b6edfe0ae071971d513828a20 (diff)
parent7bff1c1d60b78ba78f2ab0a9c67bdde80427ea30 (diff)
*Merge.
--HG-- branch : trunk
Diffstat (limited to 'src/trinitycore')
-rw-r--r--src/trinitycore/CliRunnable.cpp1
-rw-r--r--src/trinitycore/CliRunnable.h1
-rw-r--r--src/trinitycore/Main.cpp1
-rw-r--r--src/trinitycore/Master.cpp1
-rw-r--r--src/trinitycore/Master.h1
-rw-r--r--src/trinitycore/RASocket.cpp1
-rw-r--r--src/trinitycore/RASocket.h68
-rw-r--r--src/trinitycore/WorldRunnable.cpp1
-rw-r--r--src/trinitycore/WorldRunnable.h1
-rw-r--r--src/trinitycore/resource.h1
10 files changed, 77 insertions, 0 deletions
diff --git a/src/trinitycore/CliRunnable.cpp b/src/trinitycore/CliRunnable.cpp
index a0609309298..e256128ed90 100644
--- a/src/trinitycore/CliRunnable.cpp
+++ b/src/trinitycore/CliRunnable.cpp
@@ -373,3 +373,4 @@ void CliRunnable::run()
///- End the database thread
WorldDatabase.ThreadEnd(); // free mySQL thread resources
}
+
diff --git a/src/trinitycore/CliRunnable.h b/src/trinitycore/CliRunnable.h
index f50cae814bc..ea60ef695bc 100644
--- a/src/trinitycore/CliRunnable.h
+++ b/src/trinitycore/CliRunnable.h
@@ -33,3 +33,4 @@ class CliRunnable : public ZThread::Runnable
};
#endif
/// @}
+
diff --git a/src/trinitycore/Main.cpp b/src/trinitycore/Main.cpp
index df9d9185deb..43783dc24ee 100644
--- a/src/trinitycore/Main.cpp
+++ b/src/trinitycore/Main.cpp
@@ -172,3 +172,4 @@ extern int main(int argc, char **argv)
}
/// @}
+
diff --git a/src/trinitycore/Master.cpp b/src/trinitycore/Master.cpp
index 8eeda54ab83..557124ca5e0 100644
--- a/src/trinitycore/Master.cpp
+++ b/src/trinitycore/Master.cpp
@@ -518,3 +518,4 @@ void Master::_UnhookSignals()
signal(SIGBREAK, 0);
#endif
}
+
diff --git a/src/trinitycore/Master.h b/src/trinitycore/Master.h
index 36d4b29495e..456202594f6 100644
--- a/src/trinitycore/Master.h
+++ b/src/trinitycore/Master.h
@@ -50,3 +50,4 @@ class Master
#define sMaster Trinity::Singleton<Master>::Instance()
#endif
/// @}
+
diff --git a/src/trinitycore/RASocket.cpp b/src/trinitycore/RASocket.cpp
index a48928d5a23..48749b09ceb 100644
--- a/src/trinitycore/RASocket.cpp
+++ b/src/trinitycore/RASocket.cpp
@@ -257,3 +257,4 @@ void RASocket::zprint( const char * szText )
#endif
}
+
diff --git a/src/trinitycore/RASocket.h b/src/trinitycore/RASocket.h
new file mode 100644
index 00000000000..145afd52c60
--- /dev/null
+++ b/src/trinitycore/RASocket.h
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ *
+ * Copyright (C) 2008 Trinity <http://www.trinitycore.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
+ */
+
+/// \addtogroup Trinityd
+/// @{
+/// \file
+
+#ifndef _RASOCKET_H
+#define _RASOCKET_H
+
+#include "Common.h"
+#include "sockets/TcpSocket.h"
+
+#define RA_BUFF_SIZE 1024
+
+class ISocketHandler;
+
+/// Remote Administration socket
+class RASocket: public TcpSocket
+{
+ public:
+
+ RASocket(ISocketHandler& h);
+ ~RASocket();
+
+ void OnAccept();
+ void OnRead();
+
+ private:
+
+ char * buff;
+ std::string szLogin;
+ uint32 iSess;
+ unsigned int iInputLength;
+ bool bLog;
+ bool bSecure; //kick on wrong pass, non exist. user, user with no priv
+ //will protect from DOS, bruteforce attacks
+ //some 'smart' protection must be added for more security
+ uint8 iMinLevel;
+ enum
+ {
+ NONE, //initial value
+ LG, //only login was entered
+ OK, //both login and pass were given, and they are correct and user have enough priv.
+ }stage;
+
+ static void zprint( const char * szText );
+};
+#endif
+/// @}
+
diff --git a/src/trinitycore/WorldRunnable.cpp b/src/trinitycore/WorldRunnable.cpp
index ec4c25a6cf6..b29e1434a64 100644
--- a/src/trinitycore/WorldRunnable.cpp
+++ b/src/trinitycore/WorldRunnable.cpp
@@ -84,3 +84,4 @@ void WorldRunnable::run()
///- End the database thread
WorldDatabase.ThreadEnd(); // free mySQL thread resources
}
+
diff --git a/src/trinitycore/WorldRunnable.h b/src/trinitycore/WorldRunnable.h
index 73a7f17e52f..b84e5b6a04c 100644
--- a/src/trinitycore/WorldRunnable.h
+++ b/src/trinitycore/WorldRunnable.h
@@ -33,3 +33,4 @@ class WorldRunnable : public ZThread::Runnable
};
#endif
/// @}
+
diff --git a/src/trinitycore/resource.h b/src/trinitycore/resource.h
index 7dc5cb9ef7b..fbc730320b4 100644
--- a/src/trinitycore/resource.h
+++ b/src/trinitycore/resource.h
@@ -13,3 +13,4 @@
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
+