mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
Change space indentation to tabs
This commit is contained in:
+4
-3
@@ -115,8 +115,8 @@ bool Adventure::Process()
|
||||
else if(status == AS_WaitingForPrimaryEndTime)
|
||||
{
|
||||
//Do partial failure: send a message to the clients that they can only get a certain amount of points.
|
||||
SendAdventureMessage(13, "You failed to complete your adventure in time. Complete your adventure goal within 30 minutes to "
|
||||
"receive a lesser reward. This adventure will end in 30 minutes and your party will be ejected from the dungeon.");
|
||||
SendAdventureMessage(13, "You failed to complete your adventure in time. Complete your adventure goal within 30 minutes to "
|
||||
"receive a lesser reward. This adventure will end in 30 minutes and your party will be ejected from the dungeon.");
|
||||
SetStatus(AS_WaitingForSecondaryEndTime);
|
||||
}
|
||||
else
|
||||
@@ -435,4 +435,5 @@ void Adventure::MoveCorpsesToGraveyard()
|
||||
iter++;
|
||||
c_iter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+20
-20
@@ -68,8 +68,8 @@ void AdventureManager::CalculateAdventureRequestReply(const char *data)
|
||||
}
|
||||
|
||||
/**
|
||||
* This block checks to see if we actually have any adventures for the requested theme.
|
||||
*/
|
||||
* This block checks to see if we actually have any adventures for the requested theme.
|
||||
*/
|
||||
map<uint32, list<AdventureTemplate*> >::iterator adv_list_iter = adventure_entries.find(sar->template_id);
|
||||
if(adv_list_iter == adventure_entries.end())
|
||||
{
|
||||
@@ -84,10 +84,10 @@ void AdventureManager::CalculateAdventureRequestReply(const char *data)
|
||||
}
|
||||
|
||||
/**
|
||||
* This block checks to see if our requested group has anyone with an "Active" adventure
|
||||
* Active being in progress, finished adventures that are still waiting to expire do not count
|
||||
* Though they will count against you for which new adventure you can get.
|
||||
*/
|
||||
* This block checks to see if our requested group has anyone with an "Active" adventure
|
||||
* Active being in progress, finished adventures that are still waiting to expire do not count
|
||||
* Though they will count against you for which new adventure you can get.
|
||||
*/
|
||||
list<Adventure*>::iterator iter = adventure_list.begin();
|
||||
while(iter != adventure_list.end())
|
||||
{
|
||||
@@ -117,9 +117,9 @@ void AdventureManager::CalculateAdventureRequestReply(const char *data)
|
||||
}
|
||||
|
||||
/**
|
||||
* Now we need to get every available adventure for our selected theme and exclude ones we can't use.
|
||||
* ie. the ones that would cause overlap issues for new adventures with the old unexpired adventures.
|
||||
*/
|
||||
* Now we need to get every available adventure for our selected theme and exclude ones we can't use.
|
||||
* ie. the ones that would cause overlap issues for new adventures with the old unexpired adventures.
|
||||
*/
|
||||
list<AdventureZones> excluded_zones;
|
||||
list<AdventureZoneIn> excluded_zone_ins;
|
||||
for(int i = 0; i < sar->member_count; ++i)
|
||||
@@ -149,9 +149,9 @@ void AdventureManager::CalculateAdventureRequestReply(const char *data)
|
||||
|
||||
list<AdventureTemplate*> eligible_adventures = adventure_entries[sar->template_id];
|
||||
/**
|
||||
* Remove zones from eligible zones based on their difficulty and type.
|
||||
* ie only use difficult zones for difficult, collect for collect, etc.
|
||||
*/
|
||||
* Remove zones from eligible zones based on their difficulty and type.
|
||||
* ie only use difficult zones for difficult, collect for collect, etc.
|
||||
*/
|
||||
list<AdventureTemplate*>::iterator ea_iter = eligible_adventures.begin();
|
||||
while(ea_iter != eligible_adventures.end())
|
||||
{
|
||||
@@ -170,8 +170,8 @@ void AdventureManager::CalculateAdventureRequestReply(const char *data)
|
||||
}
|
||||
|
||||
/**
|
||||
* Get levels for this group.
|
||||
*/
|
||||
* Get levels for this group.
|
||||
*/
|
||||
int valid_count = 0;
|
||||
int avg_level = 0;
|
||||
int min_level = 40000;
|
||||
@@ -263,8 +263,8 @@ void AdventureManager::CalculateAdventureRequestReply(const char *data)
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the zones from our eligible zones based on the exclusion above
|
||||
*/
|
||||
* Remove the zones from our eligible zones based on the exclusion above
|
||||
*/
|
||||
list<AdventureZones>::iterator ez_iter = excluded_zones.begin();
|
||||
while(ez_iter != excluded_zones.end())
|
||||
{
|
||||
@@ -282,7 +282,7 @@ void AdventureManager::CalculateAdventureRequestReply(const char *data)
|
||||
}
|
||||
|
||||
list<AdventureZoneIn>::iterator ezi_iter = excluded_zone_ins.begin();
|
||||
while(ezi_iter != excluded_zone_ins.end())
|
||||
while(ezi_iter != excluded_zone_ins.end())
|
||||
{
|
||||
list<AdventureTemplate*>::iterator ea_iter = eligible_adventures.begin();
|
||||
while(ea_iter != eligible_adventures.end())
|
||||
@@ -297,9 +297,9 @@ void AdventureManager::CalculateAdventureRequestReply(const char *data)
|
||||
ezi_iter++;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove Zones based on level
|
||||
*/
|
||||
/**
|
||||
* Remove Zones based on level
|
||||
*/
|
||||
ea_iter = eligible_adventures.begin();
|
||||
while(ea_iter != eligible_adventures.end())
|
||||
{
|
||||
|
||||
+66
-66
@@ -1,66 +1,66 @@
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
|
||||
|
||||
SET(world_sources
|
||||
Adventure.cpp
|
||||
AdventureManager.cpp
|
||||
client.cpp
|
||||
cliententry.cpp
|
||||
clientlist.cpp
|
||||
CMakeLists.txt
|
||||
console.cpp
|
||||
EQLConfig.cpp
|
||||
EQW.cpp
|
||||
EQWHTTPHandler.cpp
|
||||
EQWParser.cpp
|
||||
HTTPRequest.cpp
|
||||
LauncherLink.cpp
|
||||
LauncherList.cpp
|
||||
lfplist.cpp
|
||||
LoginServer.cpp
|
||||
LoginServerList.cpp
|
||||
net.cpp
|
||||
perl_EQLConfig.cpp
|
||||
perl_EQW.cpp
|
||||
perl_HTTPRequest.cpp
|
||||
queryserv.cpp
|
||||
ucs.cpp
|
||||
wguild_mgr.cpp
|
||||
world_logsys.cpp
|
||||
WorldConfig.cpp
|
||||
worlddb.cpp
|
||||
zonelist.cpp
|
||||
zoneserver.cpp
|
||||
Adventure.cpp
|
||||
AdventureManager.cpp
|
||||
client.cpp
|
||||
cliententry.cpp
|
||||
clientlist.cpp
|
||||
CMakeLists.txt
|
||||
console.cpp
|
||||
EQLConfig.cpp
|
||||
EQW.cpp
|
||||
EQWHTTPHandler.cpp
|
||||
EQWParser.cpp
|
||||
HTTPRequest.cpp
|
||||
LauncherLink.cpp
|
||||
LauncherList.cpp
|
||||
lfplist.cpp
|
||||
LoginServer.cpp
|
||||
LoginServerList.cpp
|
||||
net.cpp
|
||||
perl_EQLConfig.cpp
|
||||
perl_EQW.cpp
|
||||
perl_HTTPRequest.cpp
|
||||
queryserv.cpp
|
||||
ucs.cpp
|
||||
wguild_mgr.cpp
|
||||
world_logsys.cpp
|
||||
WorldConfig.cpp
|
||||
worlddb.cpp
|
||||
zonelist.cpp
|
||||
zoneserver.cpp
|
||||
)
|
||||
|
||||
SET(world_headers
|
||||
Adventure.h
|
||||
AdventureManager.h
|
||||
AdventureTemplate.h
|
||||
client.h
|
||||
cliententry.h
|
||||
clientlist.h
|
||||
CMakeLists.txt
|
||||
console.h
|
||||
EQLConfig.h
|
||||
EQW.h
|
||||
EQWHTTPHandler.h
|
||||
EQWParser.h
|
||||
HTTPRequest.h
|
||||
LauncherLink.h
|
||||
LauncherList.h
|
||||
lfplist.h
|
||||
LoginServer.h
|
||||
LoginServerList.h
|
||||
net.h
|
||||
queryserv.h
|
||||
SoFCharCreateData.h
|
||||
ucs.h
|
||||
wguild_mgr.h
|
||||
WorldConfig.h
|
||||
worlddb.h
|
||||
WorldTCPConnection.h
|
||||
zonelist.h
|
||||
zoneserver.h
|
||||
Adventure.h
|
||||
AdventureManager.h
|
||||
AdventureTemplate.h
|
||||
client.h
|
||||
cliententry.h
|
||||
clientlist.h
|
||||
CMakeLists.txt
|
||||
console.h
|
||||
EQLConfig.h
|
||||
EQW.h
|
||||
EQWHTTPHandler.h
|
||||
EQWParser.h
|
||||
HTTPRequest.h
|
||||
LauncherLink.h
|
||||
LauncherList.h
|
||||
lfplist.h
|
||||
LoginServer.h
|
||||
LoginServerList.h
|
||||
net.h
|
||||
queryserv.h
|
||||
SoFCharCreateData.h
|
||||
ucs.h
|
||||
wguild_mgr.h
|
||||
WorldConfig.h
|
||||
worlddb.h
|
||||
WorldTCPConnection.h
|
||||
zonelist.h
|
||||
zoneserver.h
|
||||
)
|
||||
|
||||
ADD_EXECUTABLE(world ${world_sources} ${world_headers})
|
||||
@@ -71,21 +71,21 @@ TARGET_LINK_LIBRARIES(world Common ${PERL_LIBRARY} debug ${MySQL_LIBRARY_DEBUG}
|
||||
|
||||
IF(MSVC)
|
||||
|
||||
SET_TARGET_PROPERTIES(world PROPERTIES LINK_FLAGS_RELEASE "/OPT:REF /OPT:ICF")
|
||||
TARGET_LINK_LIBRARIES(world "Ws2_32.lib")
|
||||
SET_TARGET_PROPERTIES(world PROPERTIES LINK_FLAGS_RELEASE "/OPT:REF /OPT:ICF")
|
||||
TARGET_LINK_LIBRARIES(world "Ws2_32.lib")
|
||||
ENDIF(MSVC)
|
||||
|
||||
IF(MINGW)
|
||||
TARGET_LINK_LIBRARIES(world "WS2_32")
|
||||
TARGET_LINK_LIBRARIES(world "WS2_32")
|
||||
ENDIF(MINGW)
|
||||
|
||||
IF(UNIX)
|
||||
TARGET_LINK_LIBRARIES(world "dl")
|
||||
TARGET_LINK_LIBRARIES(world "z")
|
||||
TARGET_LINK_LIBRARIES(world "m")
|
||||
TARGET_LINK_LIBRARIES(world "rt")
|
||||
TARGET_LINK_LIBRARIES(world "pthread")
|
||||
ADD_DEFINITIONS(-fPIC)
|
||||
TARGET_LINK_LIBRARIES(world "dl")
|
||||
TARGET_LINK_LIBRARIES(world "z")
|
||||
TARGET_LINK_LIBRARIES(world "m")
|
||||
TARGET_LINK_LIBRARIES(world "rt")
|
||||
TARGET_LINK_LIBRARIES(world "pthread")
|
||||
ADD_DEFINITIONS(-fPIC)
|
||||
ENDIF(UNIX)
|
||||
|
||||
SET(EXECUTABLE_OUTPUT_PATH ../Bin)
|
||||
|
||||
+31
-56
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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/debug.h"
|
||||
#include "EQLConfig.h"
|
||||
@@ -39,7 +39,7 @@ void EQLConfig::LoadSettings() {
|
||||
MYSQL_ROW row;
|
||||
LauncherZone tmp;
|
||||
|
||||
char namebuf[128];
|
||||
char namebuf[128];
|
||||
database.DoEscapeString(namebuf, m_name.c_str(), m_name.length()&0x3F); //limit len to 64
|
||||
namebuf[127] = '\0';
|
||||
|
||||
@@ -77,15 +77,15 @@ void EQLConfig::LoadSettings() {
|
||||
|
||||
EQLConfig *EQLConfig::CreateLauncher(const char *name, uint8 dynamic_count) {
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char *query = 0;
|
||||
char *query = 0;
|
||||
|
||||
char namebuf[128];
|
||||
char namebuf[128];
|
||||
database.DoEscapeString(namebuf, name, strlen(name)&0x3F); //limit len to 64
|
||||
namebuf[127] = '\0';
|
||||
|
||||
if (!database.RunQuery(query, MakeAnyLenString(&query,
|
||||
"INSERT INTO launcher (name,dynamics) VALUES('%s', %d)",
|
||||
namebuf, dynamic_count), errbuf)) {
|
||||
namebuf, dynamic_count), errbuf)) {
|
||||
LogFile->write(EQEMuLog::Error, "Error in CreateLauncher query: %s", errbuf);
|
||||
safe_delete_array(query);
|
||||
return nullptr;
|
||||
@@ -127,9 +127,9 @@ void EQLConfig::DeleteLauncher() {
|
||||
launcher_list.Remove(m_name.c_str());
|
||||
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char *query = 0;
|
||||
char *query = 0;
|
||||
|
||||
char namebuf[128];
|
||||
char namebuf[128];
|
||||
database.DoEscapeString(namebuf, m_name.c_str(), m_name.length()&0x3F); //limit len to 64
|
||||
namebuf[127] = '\0';
|
||||
|
||||
@@ -185,18 +185,18 @@ bool EQLConfig::BootStaticZone(Const_char *short_name, uint16 port) {
|
||||
|
||||
//database update
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char *query = 0;
|
||||
char *query = 0;
|
||||
|
||||
char namebuf[128];
|
||||
char namebuf[128];
|
||||
database.DoEscapeString(namebuf, m_name.c_str(), m_name.length()&0x3F); //limit len to 64
|
||||
namebuf[127] = '\0';
|
||||
char zonebuf[32];
|
||||
char zonebuf[32];
|
||||
database.DoEscapeString(zonebuf, short_name, strlen(short_name)&0xF); //limit len to 16
|
||||
zonebuf[31] = '\0';
|
||||
|
||||
if (!database.RunQuery(query, MakeAnyLenString(&query,
|
||||
"INSERT INTO launcher_zones (launcher,zone,port) VALUES('%s', '%s', %d)",
|
||||
namebuf, zonebuf, port), errbuf)) {
|
||||
namebuf, zonebuf, port), errbuf)) {
|
||||
LogFile->write(EQEMuLog::Error, "Error in BootStaticZone query: %s", errbuf);
|
||||
safe_delete_array(query);
|
||||
return false;
|
||||
@@ -235,18 +235,18 @@ bool EQLConfig::ChangeStaticZone(Const_char *short_name, uint16 port) {
|
||||
|
||||
//database update
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char *query = 0;
|
||||
char *query = 0;
|
||||
|
||||
char namebuf[128];
|
||||
char namebuf[128];
|
||||
database.DoEscapeString(namebuf, m_name.c_str(), m_name.length()&0x3F); //limit len to 64
|
||||
namebuf[127] = '\0';
|
||||
char zonebuf[32];
|
||||
char zonebuf[32];
|
||||
database.DoEscapeString(zonebuf, short_name, strlen(short_name)&0xF); //limit len to 16
|
||||
zonebuf[31] = '\0';
|
||||
|
||||
if (!database.RunQuery(query, MakeAnyLenString(&query,
|
||||
"UPDATE launcher_zones SET port=%d WHERE launcher='%s' AND zone='%s'",
|
||||
port, namebuf, zonebuf), errbuf)) {
|
||||
port, namebuf, zonebuf), errbuf)) {
|
||||
LogFile->write(EQEMuLog::Error, "Error in ChangeStaticZone query: %s", errbuf);
|
||||
safe_delete_array(query);
|
||||
return false;
|
||||
@@ -278,12 +278,12 @@ bool EQLConfig::DeleteStaticZone(Const_char *short_name) {
|
||||
|
||||
//database update
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char *query = 0;
|
||||
char *query = 0;
|
||||
|
||||
char namebuf[128];
|
||||
char namebuf[128];
|
||||
database.DoEscapeString(namebuf, m_name.c_str(), m_name.length()&0x3F); //limit len to 64
|
||||
namebuf[127] = '\0';
|
||||
char zonebuf[32];
|
||||
char zonebuf[32];
|
||||
database.DoEscapeString(zonebuf, short_name, strlen(short_name)&0xF); //limit len to 16
|
||||
zonebuf[31] = '\0';
|
||||
|
||||
@@ -310,15 +310,15 @@ bool EQLConfig::DeleteStaticZone(Const_char *short_name) {
|
||||
|
||||
bool EQLConfig::SetDynamicCount(int count) {
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char *query = 0;
|
||||
char *query = 0;
|
||||
|
||||
char namebuf[128];
|
||||
char namebuf[128];
|
||||
database.DoEscapeString(namebuf, m_name.c_str(), m_name.length()&0x3F); //limit len to 64
|
||||
namebuf[127] = '\0';
|
||||
|
||||
if (!database.RunQuery(query, MakeAnyLenString(&query,
|
||||
"UPDATE launcher SET dynamics=%d WHERE name='%s'",
|
||||
count, namebuf), errbuf)) {
|
||||
count, namebuf), errbuf)) {
|
||||
LogFile->write(EQEMuLog::Error, "Error in SetDynamicCount query: %s", errbuf);
|
||||
safe_delete_array(query);
|
||||
return false;
|
||||
@@ -357,28 +357,3 @@ map<string,string> EQLConfig::GetZoneDetails(Const_char *zone_ref) {
|
||||
return(res);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+12
-18
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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 EQLCONFIG_H_
|
||||
#define EQLCONFIG_H_
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
bool DeleteStaticZone(Const_char *short_name);
|
||||
|
||||
bool SetDynamicCount(int count);
|
||||
int GetDynamicCount() const;
|
||||
int GetDynamicCount() const;
|
||||
|
||||
vector<string> ListZones(); //returns an array of zone refs
|
||||
map<string,string> GetZoneDetails(Const_char *zone_ref);
|
||||
@@ -72,11 +72,5 @@ protected:
|
||||
map<string, LauncherZone> m_zones; //static zones.
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /*EQLCONFIG_H_*/
|
||||
|
||||
|
||||
|
||||
+60
-78
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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
|
||||
*/
|
||||
|
||||
#ifdef EMBPERL
|
||||
@@ -55,26 +55,23 @@ extern LoginServerList loginserverlist;
|
||||
extern LauncherList launcher_list;
|
||||
extern volatile bool RunLoops;
|
||||
|
||||
|
||||
|
||||
|
||||
EQW EQW::s_EQW;
|
||||
|
||||
//IO Capture routine
|
||||
XS(XS_EQWIO_PRINT); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_EQWIO_PRINT)
|
||||
{
|
||||
dXSARGS;
|
||||
if (items < 2)
|
||||
return;
|
||||
dXSARGS;
|
||||
if (items < 2)
|
||||
return;
|
||||
|
||||
int r;
|
||||
for(r = 1; r < items; r++) {
|
||||
char *str = SvPV_nolen(ST(r));
|
||||
EQW::Singleton()->AppendOutput(str);
|
||||
}
|
||||
}
|
||||
|
||||
XSRETURN_EMPTY;
|
||||
XSRETURN_EMPTY;
|
||||
}
|
||||
|
||||
EQW::EQW() {
|
||||
@@ -341,7 +338,7 @@ bool EQW::SetDynamicCount(Const_char *launcher_name, int count) {
|
||||
return(false);
|
||||
}
|
||||
|
||||
int EQW::GetDynamicCount(Const_char *launcher_name) {
|
||||
int EQW::GetDynamicCount(Const_char *launcher_name) {
|
||||
return(0);
|
||||
}
|
||||
*/
|
||||
@@ -391,72 +388,72 @@ bool EQW::SetPublicNote(uint32 charid, const char *note) {
|
||||
}
|
||||
|
||||
int EQW::CountBugs() {
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char* query = 0;
|
||||
MYSQL_RES *result;
|
||||
MYSQL_ROW row;
|
||||
if(database.RunQuery(query, MakeAnyLenString(&query, "SELECT count(*) FROM bugs where status = 0"), errbuf, &result)) {
|
||||
if(database.RunQuery(query, MakeAnyLenString(&query, "SELECT count(*) FROM bugs where status = 0"), errbuf, &result)) {
|
||||
safe_delete_array(query);
|
||||
if((row = mysql_fetch_row(result))) {
|
||||
int count = atoi(row[0]);
|
||||
mysql_free_result(result);
|
||||
return count;
|
||||
}
|
||||
mysql_free_result(result);
|
||||
}
|
||||
safe_delete_array(query);
|
||||
return 0;
|
||||
if((row = mysql_fetch_row(result))) {
|
||||
int count = atoi(row[0]);
|
||||
mysql_free_result(result);
|
||||
return count;
|
||||
}
|
||||
mysql_free_result(result);
|
||||
}
|
||||
safe_delete_array(query);
|
||||
return 0;
|
||||
}
|
||||
|
||||
vector<string> EQW::ListBugs(uint32 offset) {
|
||||
vector<string> res;
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
vector<string> res;
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char* query = 0;
|
||||
MYSQL_RES *result;
|
||||
MYSQL_ROW row;
|
||||
if(database.RunQuery(query, MakeAnyLenString(&query, "SELECT id FROM bugs WHERE status = 0 limit %d, 30", offset), errbuf, &result)) {
|
||||
if(database.RunQuery(query, MakeAnyLenString(&query, "SELECT id FROM bugs WHERE status = 0 limit %d, 30", offset), errbuf, &result)) {
|
||||
safe_delete_array(query);
|
||||
while((row = mysql_fetch_row(result))) {
|
||||
res.push_back(row[0]);
|
||||
}
|
||||
mysql_free_result(result);
|
||||
}
|
||||
safe_delete_array(query);
|
||||
return res;
|
||||
while((row = mysql_fetch_row(result))) {
|
||||
res.push_back(row[0]);
|
||||
}
|
||||
mysql_free_result(result);
|
||||
}
|
||||
safe_delete_array(query);
|
||||
return res;
|
||||
}
|
||||
|
||||
map<string,string> EQW::GetBugDetails(Const_char *id) {
|
||||
map<string,string> res;
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
map<string,string> res;
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char* query = 0;
|
||||
MYSQL_RES *result;
|
||||
MYSQL_ROW row;
|
||||
if(database.RunQuery(query, MakeAnyLenString(&query, "select name, zone, x, y, z, target, bug from bugs where id = %s", id), errbuf, &result)) {
|
||||
if(database.RunQuery(query, MakeAnyLenString(&query, "select name, zone, x, y, z, target, bug from bugs where id = %s", id), errbuf, &result)) {
|
||||
safe_delete_array(query);
|
||||
while((row = mysql_fetch_row(result))) {
|
||||
res["name"] = row[0];
|
||||
res["zone"] = row[1];
|
||||
res["x"] = row[2];
|
||||
res["y"] = row[3];
|
||||
res["z"] = row[4];
|
||||
res["target"] = row[5];
|
||||
res["bug"] = row[6];
|
||||
res["id"] = id;
|
||||
}
|
||||
mysql_free_result(result);
|
||||
}
|
||||
safe_delete_array(query);
|
||||
return res;
|
||||
while((row = mysql_fetch_row(result))) {
|
||||
res["name"] = row[0];
|
||||
res["zone"] = row[1];
|
||||
res["x"] = row[2];
|
||||
res["y"] = row[3];
|
||||
res["z"] = row[4];
|
||||
res["target"] = row[5];
|
||||
res["bug"] = row[6];
|
||||
res["id"] = id;
|
||||
}
|
||||
mysql_free_result(result);
|
||||
}
|
||||
safe_delete_array(query);
|
||||
return res;
|
||||
}
|
||||
|
||||
void EQW::ResolveBug(const char *id) {
|
||||
vector<string> res;
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
vector<string> res;
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char* query = 0;
|
||||
if(database.RunQuery(query, MakeAnyLenString(&query, "UPDATE bugs SET status=1 WHERE id=%s", id), errbuf)) {
|
||||
if(database.RunQuery(query, MakeAnyLenString(&query, "UPDATE bugs SET status=1 WHERE id=%s", id), errbuf)) {
|
||||
safe_delete_array(query);
|
||||
}
|
||||
safe_delete_array(query);
|
||||
}
|
||||
safe_delete_array(query);
|
||||
}
|
||||
|
||||
void EQW::SendMessage(uint32 type, const char *msg) {
|
||||
@@ -469,18 +466,3 @@ void EQW::WorldShutDown(uint32 time, uint32 interval) {
|
||||
|
||||
#endif //EMBPERL
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+17
-17
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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 EQW_H_
|
||||
#define EQW_H_
|
||||
@@ -45,15 +45,15 @@ public:
|
||||
bool LSConnected();
|
||||
void LSReconnect();
|
||||
|
||||
int CountZones();
|
||||
int CountZones();
|
||||
vector<string> ListBootedZones(); //returns an array of zone_refs (opaque)
|
||||
map<string,string> GetZoneDetails(Const_char *zone_ref); //returns a hash ref of details
|
||||
|
||||
int CountPlayers();
|
||||
int CountPlayers();
|
||||
vector<string> ListPlayers(Const_char *zone_name = ""); //returns an array of player refs (opaque)
|
||||
map<string,string> GetPlayerDetails(Const_char *player_ref); //returns a hash ref of details
|
||||
|
||||
int CountLaunchers(bool active_only);
|
||||
int CountLaunchers(bool active_only);
|
||||
// vector<string> ListActiveLaunchers(); //returns an array of launcher names
|
||||
vector<string> ListLaunchers(); //returns an array of launcher names
|
||||
EQLConfig * GetLauncher(Const_char *launcher_name); //returns the EQLConfig object for the specified launcher.
|
||||
@@ -72,9 +72,9 @@ public:
|
||||
bool SetTributeFlag(uint32 charid, bool enabled);
|
||||
bool SetPublicNote(uint32 charid, const char *note);
|
||||
|
||||
//bugs
|
||||
int CountBugs();
|
||||
vector<string> ListBugs(uint32 offset); //returns an array of zone_refs (opaque)
|
||||
//bugs
|
||||
int CountBugs();
|
||||
vector<string> ListBugs(uint32 offset); //returns an array of zone_refs (opaque)
|
||||
map<string,string> GetBugDetails(const char *id);
|
||||
void ResolveBug(const char *id);
|
||||
|
||||
|
||||
+14
-16
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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/debug.h"
|
||||
#include "EQWHTTPHandler.h"
|
||||
@@ -34,8 +34,8 @@ EQWParser *EQWHTTPHandler::s_parser = nullptr;
|
||||
const int EQWHTTPHandler::READ_BUFFER_LEN = 1024; //for page IO, was a static const member, but VC6 got mad.
|
||||
|
||||
EQWHTTPHandler::EQWHTTPHandler(uint32 ID, SOCKET in_socket, uint32 irIP, uint16 irPort)
|
||||
: HttpdSocket(ID,in_socket,irIP,irPort),
|
||||
m_closeOnFinish(false)
|
||||
: HttpdSocket(ID,in_socket,irIP,irPort),
|
||||
m_closeOnFinish(false)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ void EQWHTTPHandler::SendPage(const std::string &file) {
|
||||
SendBuf(buffer, len);
|
||||
}
|
||||
delete[] buffer;
|
||||
fclose(f);
|
||||
fclose(f);
|
||||
#ifdef EMBPERL
|
||||
if(process) {
|
||||
//convert the base form into a useful perl exportable form
|
||||
@@ -336,5 +336,3 @@ ThreadReturnType EQWHTTPServer::ThreadProc(void *data) {
|
||||
THREAD_RETURN(nullptr);
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
|
||||
+11
-14
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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 EQWHTTPHandler_H
|
||||
#define EQWHTTPHandler_H
|
||||
@@ -96,6 +96,3 @@ protected:
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+45
-47
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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
|
||||
*/
|
||||
|
||||
//a lot of this is copied from embperl.cpp, but I didnt feel like factoring the common stuff out
|
||||
@@ -30,7 +30,7 @@
|
||||
using namespace std;
|
||||
|
||||
#ifndef GvCV_set
|
||||
#define GvCV_set(gv,cv) (GvCV(gv) = (cv))
|
||||
#define GvCV_set(gv,cv) (GvCV(gv) = (cv))
|
||||
#endif
|
||||
|
||||
|
||||
@@ -130,18 +130,18 @@ void EQWParser::DoInit() {
|
||||
eval_pv(
|
||||
"package EQWIO; "
|
||||
// "&boot_EQEmuIO;"
|
||||
"sub TIEHANDLE { my $me = bless {}, $_[0]; $me->PRINT('Creating '.$me); return($me); } "
|
||||
"sub WRITE { } "
|
||||
"sub PRINTF { my $me = shift; my $fmt = shift; $me->PRINT(sprintf($fmt, @_)); } "
|
||||
"sub CLOSE { my $me = shift; $me->PRINT('Closing '.$me); } "
|
||||
"sub DESTROY { my $me = shift; $me->PRINT('Destroying '.$me); } "
|
||||
"sub TIEHANDLE { my $me = bless {}, $_[0]; $me->PRINT('Creating '.$me); return($me); } "
|
||||
"sub WRITE { } "
|
||||
"sub PRINTF { my $me = shift; my $fmt = shift; $me->PRINT(sprintf($fmt, @_)); } "
|
||||
"sub CLOSE { my $me = shift; $me->PRINT('Closing '.$me); } "
|
||||
"sub DESTROY { my $me = shift; $me->PRINT('Destroying '.$me); } "
|
||||
//this ties us for all packages
|
||||
"package MAIN;"
|
||||
" if(tied *STDOUT) { untie(*STDOUT); }"
|
||||
" if(tied *STDERR) { untie(*STDERR); }"
|
||||
" tie *STDOUT, 'EQWIO';"
|
||||
" tie *STDERR, 'EQWIO';"
|
||||
,FALSE);
|
||||
"package MAIN;"
|
||||
" if(tied *STDOUT) { untie(*STDOUT); }"
|
||||
" if(tied *STDERR) { untie(*STDERR); }"
|
||||
" tie *STDOUT, 'EQWIO';"
|
||||
" tie *STDERR, 'EQWIO';"
|
||||
,FALSE);
|
||||
|
||||
eval_pv(
|
||||
"package world; "
|
||||
@@ -171,16 +171,16 @@ void EQWParser::DoInit() {
|
||||
|
||||
//load up EQW
|
||||
eval_pv(
|
||||
"package EQW;"
|
||||
"&boot_EQW;" //load our EQW XS
|
||||
"package EQDB;"
|
||||
"&boot_EQDB;" //load our EQW XS
|
||||
"package EQDBRes;"
|
||||
"&boot_EQDBRes;" //load our EQW XS
|
||||
"package HTTPRequest;"
|
||||
"&boot_HTTPRequest;" //load our HTTPRequest XS
|
||||
"package EQLConfig;"
|
||||
"&boot_EQLConfig;" //load our EQLConfig XS
|
||||
"package EQW;"
|
||||
"&boot_EQW;" //load our EQW XS
|
||||
"package EQDB;"
|
||||
"&boot_EQDB;" //load our EQW XS
|
||||
"package EQDBRes;"
|
||||
"&boot_EQDBRes;" //load our EQW XS
|
||||
"package HTTPRequest;"
|
||||
"&boot_HTTPRequest;" //load our HTTPRequest XS
|
||||
"package EQLConfig;"
|
||||
"&boot_EQLConfig;" //load our EQLConfig XS
|
||||
, FALSE );
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ EQWParser::~EQWParser() {
|
||||
"package quest;"
|
||||
" untie *STDOUT;"
|
||||
" untie *STDERR;"
|
||||
,FALSE);
|
||||
,FALSE);
|
||||
*/
|
||||
perl_free(my_perl);
|
||||
}
|
||||
@@ -226,25 +226,25 @@ bool EQWParser::eval_file(const char * packagename, const char * filename, std::
|
||||
|
||||
bool EQWParser::dosub(const char * subname, const std::vector<std::string> &args, string &error, int mode) {
|
||||
bool err = false;
|
||||
dSP; /* initialize stack pointer */
|
||||
ENTER; /* everything created after here */
|
||||
SAVETMPS; /* ...is a temporary variable. */
|
||||
PUSHMARK(SP); /* remember the stack pointer */
|
||||
dSP; // initialize stack pointer
|
||||
ENTER; // everything created after here
|
||||
SAVETMPS; // ...is a temporary variable
|
||||
PUSHMARK(SP); // remember the stack pointer
|
||||
if(args.size() > 0)
|
||||
{
|
||||
for(std::vector<std::string>::const_iterator i = args.begin(); i != args.end(); ++i)
|
||||
{/* push the arguments onto the perl stack */
|
||||
{/* push the arguments onto the perl stack */
|
||||
XPUSHs(sv_2mortal(newSVpv(i->c_str(), i->length())));
|
||||
}
|
||||
}
|
||||
PUTBACK; /* make local stack pointer global */
|
||||
call_pv(subname, mode); /*eval our code*/
|
||||
SPAGAIN; /* refresh stack pointer */
|
||||
PUTBACK; // make local stack pointer global
|
||||
call_pv(subname, mode); /*eval our code*/
|
||||
SPAGAIN; // refresh stack pointer
|
||||
if(SvTRUE(ERRSV)) {
|
||||
err = true;
|
||||
}
|
||||
FREETMPS; /* free temp values */
|
||||
LEAVE; /* ...and the XPUSHed "mortal" args.*/
|
||||
FREETMPS; // free temp values
|
||||
LEAVE; // ...and the XPUSHed "mortal" args.
|
||||
|
||||
if(err) {
|
||||
error = "Perl runtime error: ";
|
||||
@@ -260,7 +260,6 @@ bool EQWParser::eval(const char * code, string &error) {
|
||||
return(dosub("my_eval", arg, error, G_SCALAR|G_DISCARD|G_EVAL|G_KEEPERR));
|
||||
}
|
||||
|
||||
|
||||
void EQWParser::EQW_eval(const char *pkg, const char *code) {
|
||||
char namebuf[64];
|
||||
|
||||
@@ -330,7 +329,6 @@ class MerchantEditor extends BaseEditor {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function dispatch() {
|
||||
my $dispatcher = $this->_dispatchers[$action];
|
||||
$body = new Template($dispatcher["template"]);
|
||||
@@ -348,5 +346,5 @@ function dispatch() {
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#endif //EMBPERL
|
||||
|
||||
|
||||
+12
-19
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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 EQWPARSER_H_
|
||||
#define EQWPARSER_H_
|
||||
@@ -68,12 +68,5 @@ protected:
|
||||
};
|
||||
#endif //EMBPERL
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /*EQWPARSER_H_*/
|
||||
|
||||
|
||||
+11
-22
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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/debug.h"
|
||||
#include "HTTPRequest.h"
|
||||
@@ -80,14 +80,3 @@ void HTTPRequest::redirect(Const_char *URL) {
|
||||
SetResponseCode("302");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+11
-15
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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 HTTPREQUEST_H_
|
||||
#define HTTPREQUEST_H_
|
||||
@@ -37,7 +37,6 @@ public:
|
||||
|
||||
//BEGIN PERL EXPORT
|
||||
|
||||
|
||||
Const_char * get(Const_char *name, Const_char *default_value = "") const;
|
||||
int getInt(Const_char *name, int default_value = 0) const;
|
||||
float getFloat(Const_char *name, float default_value = 0.0) const;
|
||||
@@ -57,8 +56,5 @@ protected:
|
||||
std::map<std::string, std::string> m_values;
|
||||
};
|
||||
|
||||
|
||||
#endif /*HTTPREQUEST_H_*/
|
||||
|
||||
|
||||
|
||||
|
||||
+18
-18
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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/debug.h"
|
||||
@@ -37,10 +37,10 @@ extern LauncherList launcher_list;
|
||||
|
||||
LauncherLink::LauncherLink(int id, EmuTCPConnection *c)
|
||||
: ID(id),
|
||||
tcpc(c),
|
||||
authenticated(false),
|
||||
m_name(""),
|
||||
m_bootTimer(2000)
|
||||
tcpc(c),
|
||||
authenticated(false),
|
||||
m_name(""),
|
||||
m_bootTimer(2000)
|
||||
{
|
||||
m_dynamicCount = 0;
|
||||
m_bootTimer.Disable();
|
||||
@@ -78,7 +78,7 @@ bool LauncherLink::Process() {
|
||||
if (memcmp(pack->pBuffer, tmppass, 16) == 0)
|
||||
authenticated = true;
|
||||
else {
|
||||
struct in_addr in;
|
||||
struct in_addr in;
|
||||
in.s_addr = GetIP();
|
||||
_log(WORLD__LAUNCH_ERR, "Launcher authorization failed.");
|
||||
ServerPacket* pack = new ServerPacket(ServerOP_ZAAuthFailed);
|
||||
@@ -89,7 +89,7 @@ bool LauncherLink::Process() {
|
||||
}
|
||||
}
|
||||
else {
|
||||
struct in_addr in;
|
||||
struct in_addr in;
|
||||
in.s_addr = GetIP();
|
||||
_log(WORLD__LAUNCH_ERR, "Launcher authorization failed.");
|
||||
ServerPacket* pack = new ServerPacket(ServerOP_ZAAuthFailed);
|
||||
@@ -188,7 +188,7 @@ bool LauncherLink::ContainsZone(const char *short_name) const {
|
||||
return(m_states.find(short_name) != m_states.end());
|
||||
|
||||
/*
|
||||
* std::map<std::string, bool>::const_iterator cur, end;
|
||||
* std::map<std::string, bool>::const_iterator cur, end;
|
||||
cur = m_states.begin();
|
||||
end = m_states.end();
|
||||
for(; cur != end; cur++) {
|
||||
|
||||
+15
-18
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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 LAUNCHERLINK_H_
|
||||
#define LAUNCHERLINK_H_
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
inline uint32 GetIP() const { return tcpc->GetrIP(); }
|
||||
inline uint16 GetPort() const { return tcpc->GetrPort(); }
|
||||
inline const char * GetName() const { return(m_name.c_str()); }
|
||||
inline int CountZones() const { return(m_states.size()); }
|
||||
inline int CountZones() const { return(m_states.size()); }
|
||||
|
||||
bool ContainsZone(const char *short_name) const;
|
||||
|
||||
@@ -58,10 +58,10 @@ public:
|
||||
void GetZoneDetails(const char *short_name, std::map<std::string,std::string> &result);
|
||||
|
||||
protected:
|
||||
const int ID;
|
||||
const int ID;
|
||||
EmuTCPConnection*const tcpc;
|
||||
bool authenticated;
|
||||
std::string m_name;
|
||||
std::string m_name;
|
||||
Timer m_bootTimer;
|
||||
|
||||
uint8 m_dynamicCount;
|
||||
@@ -74,8 +74,5 @@ protected:
|
||||
std::map<std::string, ZoneState> m_states;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /*LAUNCHERLINK_H_*/
|
||||
|
||||
|
||||
+11
-37
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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
|
||||
*/
|
||||
|
||||
|
||||
@@ -194,29 +194,3 @@ void LauncherList::Remove(const char *name) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+12
-21
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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 LAUNCHERLIST_H_
|
||||
#define LAUNCHERLIST_H_
|
||||
@@ -54,14 +54,5 @@ protected:
|
||||
int nextID;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /*LAUNCHERLIST_H_*/
|
||||
|
||||
|
||||
+95
-96
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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/debug.h"
|
||||
#include <iostream>
|
||||
@@ -105,100 +105,99 @@ bool LoginServer::Process() {
|
||||
_hex(WORLD__LS_TRACE,pack->pBuffer,pack->size);
|
||||
|
||||
switch(pack->opcode) {
|
||||
case 0:
|
||||
break;
|
||||
case ServerOP_KeepAlive: {
|
||||
// ignore this
|
||||
break;
|
||||
}
|
||||
case ServerOP_UsertoWorldReq: {
|
||||
UsertoWorldRequest_Struct* utwr = (UsertoWorldRequest_Struct*) pack->pBuffer;
|
||||
uint32 id = database.GetAccountIDFromLSID(utwr->lsaccountid);
|
||||
int16 status = database.CheckStatus(id);
|
||||
case 0:
|
||||
break;
|
||||
case ServerOP_KeepAlive: {
|
||||
// ignore this
|
||||
break;
|
||||
}
|
||||
case ServerOP_UsertoWorldReq: {
|
||||
UsertoWorldRequest_Struct* utwr = (UsertoWorldRequest_Struct*) pack->pBuffer;
|
||||
uint32 id = database.GetAccountIDFromLSID(utwr->lsaccountid);
|
||||
int16 status = database.CheckStatus(id);
|
||||
|
||||
ServerPacket* outpack = new ServerPacket;
|
||||
outpack->opcode = ServerOP_UsertoWorldResp;
|
||||
outpack->size = sizeof(UsertoWorldResponse_Struct);
|
||||
outpack->pBuffer = new uchar[outpack->size];
|
||||
memset(outpack->pBuffer, 0, outpack->size);
|
||||
UsertoWorldResponse_Struct* utwrs = (UsertoWorldResponse_Struct*) outpack->pBuffer;
|
||||
utwrs->lsaccountid = utwr->lsaccountid;
|
||||
utwrs->ToID = utwr->FromID;
|
||||
ServerPacket* outpack = new ServerPacket;
|
||||
outpack->opcode = ServerOP_UsertoWorldResp;
|
||||
outpack->size = sizeof(UsertoWorldResponse_Struct);
|
||||
outpack->pBuffer = new uchar[outpack->size];
|
||||
memset(outpack->pBuffer, 0, outpack->size);
|
||||
UsertoWorldResponse_Struct* utwrs = (UsertoWorldResponse_Struct*) outpack->pBuffer;
|
||||
utwrs->lsaccountid = utwr->lsaccountid;
|
||||
utwrs->ToID = utwr->FromID;
|
||||
|
||||
if(Config->Locked == true)
|
||||
{
|
||||
if((status == 0 || status < 100) && (status != -2 || status != -1))
|
||||
utwrs->response = 0;
|
||||
if(status >= 100)
|
||||
if(Config->Locked == true)
|
||||
{
|
||||
if((status == 0 || status < 100) && (status != -2 || status != -1))
|
||||
utwrs->response = 0;
|
||||
if(status >= 100)
|
||||
utwrs->response = 1;
|
||||
}
|
||||
else {
|
||||
utwrs->response = 1;
|
||||
}
|
||||
|
||||
int32 x = Config->MaxClients;
|
||||
if( (int32)numplayers >= x && x != -1 && x != 255 && status < 80)
|
||||
utwrs->response = -3;
|
||||
|
||||
if(status == -1)
|
||||
utwrs->response = -1;
|
||||
if(status == -2)
|
||||
utwrs->response = -2;
|
||||
|
||||
utwrs->worldid = utwr->worldid;
|
||||
SendPacket(outpack);
|
||||
delete outpack;
|
||||
break;
|
||||
}
|
||||
else {
|
||||
utwrs->response = 1;
|
||||
case ServerOP_LSClientAuth: {
|
||||
ServerLSClientAuth* slsca = (ServerLSClientAuth*) pack->pBuffer;
|
||||
|
||||
if (RuleI(World, AccountSessionLimit) >= 0) {
|
||||
// Enforce the limit on the number of characters on the same account that can be
|
||||
// online at the same time.
|
||||
client_list.EnforceSessionLimit(slsca->lsaccount_id);
|
||||
}
|
||||
|
||||
client_list.CLEAdd(slsca->lsaccount_id, slsca->name, slsca->key, slsca->worldadmin, slsca->ip, slsca->local);
|
||||
break;
|
||||
}
|
||||
|
||||
int32 x = Config->MaxClients;
|
||||
if( (int32)numplayers >= x && x != -1 && x != 255 && status < 80)
|
||||
utwrs->response = -3;
|
||||
|
||||
if(status == -1)
|
||||
utwrs->response = -1;
|
||||
if(status == -2)
|
||||
utwrs->response = -2;
|
||||
|
||||
utwrs->worldid = utwr->worldid;
|
||||
SendPacket(outpack);
|
||||
delete outpack;
|
||||
break;
|
||||
}
|
||||
case ServerOP_LSClientAuth: {
|
||||
ServerLSClientAuth* slsca = (ServerLSClientAuth*) pack->pBuffer;
|
||||
|
||||
if (RuleI(World, AccountSessionLimit) >= 0) {
|
||||
// Enforce the limit on the number of characters on the same account that can be
|
||||
// online at the same time.
|
||||
client_list.EnforceSessionLimit(slsca->lsaccount_id);
|
||||
case ServerOP_LSFatalError: {
|
||||
#ifndef IGNORE_LS_FATAL_ERROR
|
||||
WorldConfig::DisableLoginserver();
|
||||
_log(WORLD__LS_ERR, "Login server responded with FatalError. Disabling reconnect.");
|
||||
#else
|
||||
_log(WORLD__LS_ERR, "Login server responded with FatalError.");
|
||||
#endif
|
||||
if (pack->size > 1) {
|
||||
_log(WORLD__LS_ERR, " %s",pack->pBuffer);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
client_list.CLEAdd(slsca->lsaccount_id, slsca->name, slsca->key, slsca->worldadmin, slsca->ip, slsca->local);
|
||||
break;
|
||||
}
|
||||
case ServerOP_LSFatalError: {
|
||||
#ifndef IGNORE_LS_FATAL_ERROR
|
||||
WorldConfig::DisableLoginserver();
|
||||
_log(WORLD__LS_ERR, "Login server responded with FatalError. Disabling reconnect.");
|
||||
#else
|
||||
_log(WORLD__LS_ERR, "Login server responded with FatalError.");
|
||||
#endif
|
||||
if (pack->size > 1) {
|
||||
_log(WORLD__LS_ERR, " %s",pack->pBuffer);
|
||||
case ServerOP_SystemwideMessage: {
|
||||
ServerSystemwideMessage* swm = (ServerSystemwideMessage*) pack->pBuffer;
|
||||
zoneserver_list.SendEmoteMessageRaw(0, 0, 0, swm->type, swm->message);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ServerOP_SystemwideMessage: {
|
||||
ServerSystemwideMessage* swm = (ServerSystemwideMessage*) pack->pBuffer;
|
||||
zoneserver_list.SendEmoteMessageRaw(0, 0, 0, swm->type, swm->message);
|
||||
break;
|
||||
}
|
||||
case ServerOP_LSRemoteAddr: {
|
||||
if (!Config->WorldAddress.length()) {
|
||||
WorldConfig::SetWorldAddress((char *)pack->pBuffer);
|
||||
_log(WORLD__LS, "Loginserver provided %s as world address",pack->pBuffer);
|
||||
case ServerOP_LSRemoteAddr: {
|
||||
if (!Config->WorldAddress.length()) {
|
||||
WorldConfig::SetWorldAddress((char *)pack->pBuffer);
|
||||
_log(WORLD__LS, "Loginserver provided %s as world address",pack->pBuffer);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ServerOP_LSAccountUpdate: {
|
||||
_log(WORLD__LS, "Received ServerOP_LSAccountUpdate packet from loginserver");
|
||||
CanAccountUpdate = true;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
_log(WORLD__LS_ERR, "Unknown LSOpCode: 0x%04x size=%d",(int)pack->opcode,pack->size);
|
||||
DumpPacket(pack->pBuffer, pack->size);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ServerOP_LSAccountUpdate: {
|
||||
_log(WORLD__LS, "Received ServerOP_LSAccountUpdate packet from loginserver");
|
||||
CanAccountUpdate = true;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
_log(WORLD__LS_ERR, "Unknown LSOpCode: 0x%04x size=%d",(int)pack->opcode,pack->size);
|
||||
DumpPacket(pack->pBuffer, pack->size);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
delete pack;
|
||||
}
|
||||
|
||||
|
||||
+11
-11
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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 LOGINSERVER_H
|
||||
#define LOGINSERVER_H
|
||||
|
||||
+13
-13
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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/debug.h"
|
||||
#include <iostream>
|
||||
@@ -69,9 +69,9 @@ bool LoginServerList::Process() {
|
||||
}
|
||||
|
||||
#ifdef _WINDOWS
|
||||
void AutoInitLoginServer(void *tmp) {
|
||||
void AutoInitLoginServer(void *tmp) {
|
||||
#else
|
||||
void *AutoInitLoginServer(void *tmp) {
|
||||
void *AutoInitLoginServer(void *tmp) {
|
||||
#endif
|
||||
loginserverlist.InitLoginServer();
|
||||
#ifndef WIN32
|
||||
|
||||
+11
-11
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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/debug.h"
|
||||
#include "WorldConfig.h"
|
||||
|
||||
+11
-11
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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 __WorldConfig_H
|
||||
#define __WorldConfig_H
|
||||
|
||||
+11
-11
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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 WorldTCPCONNECTION_H
|
||||
#define WorldTCPCONNECTION_H
|
||||
|
||||
+523
-522
File diff suppressed because it is too large
Load Diff
+12
-13
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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 CLIENT_H
|
||||
#define CLIENT_H
|
||||
@@ -36,7 +36,7 @@ class EQStreamInterface;
|
||||
class Client {
|
||||
public:
|
||||
Client(EQStreamInterface* ieqs);
|
||||
~Client();
|
||||
~Client();
|
||||
|
||||
bool Process();
|
||||
void ReceiveData(uchar* buf, int len);
|
||||
@@ -111,7 +111,6 @@ private:
|
||||
EQStreamInterface* const eqs;
|
||||
};
|
||||
|
||||
|
||||
bool CheckCharCreateInfoSoF(CharCreate_Struct *cc);
|
||||
bool CheckCharCreateInfoTitanium(CharCreate_Struct *cc);
|
||||
|
||||
|
||||
+11
-40
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2005 EQEMu Development Team (http://eqemulator.net)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2005 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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/debug.h"
|
||||
#include "cliententry.h"
|
||||
@@ -295,32 +295,3 @@ bool ClientListEntry::CheckAuth(uint32 id, const char* iKey, uint32 ip) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+4
-4
@@ -34,11 +34,11 @@ public:
|
||||
void SetOnline(int8 iOnline = CLE_Status_Online);
|
||||
void SetChar(uint32 iCharID, const char* iCharName);
|
||||
inline int8 Online() { return pOnline; }
|
||||
inline const uint32 GetID() const { return id; }
|
||||
inline const uint32 GetIP() const { return pIP; }
|
||||
inline const uint32 GetID() const { return id; }
|
||||
inline const uint32 GetIP() const { return pIP; }
|
||||
inline void SetIP(const uint32& iIP) { pIP = iIP; }
|
||||
inline void KeepAlive() { stale = 0; }
|
||||
inline uint8 GetStaleCounter() const { return stale; }
|
||||
inline uint8 GetStaleCounter() const { return stale; }
|
||||
void LeavingZone(ZoneServer* iZS = 0, int8 iOnline = CLE_Status_Offline);
|
||||
void Camp(ZoneServer* iZS = 0);
|
||||
|
||||
@@ -122,5 +122,5 @@ private:
|
||||
char pLFGComments[64];
|
||||
};
|
||||
|
||||
|
||||
#endif /*CLIENTENTRY_H_*/
|
||||
|
||||
|
||||
+34
-33
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2005 EQEMu Development Team (http://eqemulator.net)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2005 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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/debug.h"
|
||||
#include "clientlist.h"
|
||||
@@ -57,7 +57,7 @@ void ClientList::Process() {
|
||||
iterator.Reset();
|
||||
while(iterator.MoreElements()) {
|
||||
if (!iterator.GetData()->Process()) {
|
||||
struct in_addr in;
|
||||
struct in_addr in;
|
||||
in.s_addr = iterator.GetData()->GetIP();
|
||||
_log(WORLD__CLIENTLIST,"Removing client from %s:%d", inet_ntoa(in), iterator.GetData()->GetPort());
|
||||
//the client destructor should take care of this.
|
||||
@@ -113,7 +113,7 @@ void ClientList::EnforceSessionLimit(uint32 iLSAccountID) {
|
||||
ClientEntry = iterator.GetData();
|
||||
|
||||
if ((ClientEntry->LSAccountID() == iLSAccountID) &&
|
||||
((ClientEntry->Admin() <= (RuleI(World, ExemptAccountLimitStatus))) || (RuleI(World, ExemptAccountLimitStatus) < 0))) {
|
||||
((ClientEntry->Admin() <= (RuleI(World, ExemptAccountLimitStatus))) || (RuleI(World, ExemptAccountLimitStatus) < 0))) {
|
||||
|
||||
CharacterCount++;
|
||||
|
||||
@@ -227,15 +227,15 @@ void ClientList::DisconnectByIP(uint32 iIP) {
|
||||
while(iterator.MoreElements()) {
|
||||
countCLEIPs = iterator.GetData();
|
||||
if ((countCLEIPs->GetIP() == iIP)) {
|
||||
if(strlen(countCLEIPs->name())) {
|
||||
ServerPacket* pack = new ServerPacket(ServerOP_KickPlayer, sizeof(ServerKickPlayer_Struct));
|
||||
ServerKickPlayer_Struct* skp = (ServerKickPlayer_Struct*) pack->pBuffer;
|
||||
strcpy(skp->adminname, "SessionLimit");
|
||||
strcpy(skp->name, countCLEIPs->name());
|
||||
skp->adminrank = 255;
|
||||
zoneserver_list.SendPacket(pack);
|
||||
safe_delete(pack);
|
||||
}
|
||||
if(strlen(countCLEIPs->name())) {
|
||||
ServerPacket* pack = new ServerPacket(ServerOP_KickPlayer, sizeof(ServerKickPlayer_Struct));
|
||||
ServerKickPlayer_Struct* skp = (ServerKickPlayer_Struct*) pack->pBuffer;
|
||||
strcpy(skp->adminname, "SessionLimit");
|
||||
strcpy(skp->name, countCLEIPs->name());
|
||||
skp->adminrank = 255;
|
||||
zoneserver_list.SendPacket(pack);
|
||||
safe_delete(pack);
|
||||
}
|
||||
countCLEIPs->SetOnline(CLE_Status_Offline);
|
||||
iterator.RemoveCurrent();
|
||||
}
|
||||
@@ -301,7 +301,7 @@ void ClientList::SendCLEList(const int16& admin, const char* to, WorldTCPConnect
|
||||
while(iterator.MoreElements()) {
|
||||
ClientListEntry* cle = iterator.GetData();
|
||||
if (admin >= cle->Admin() && (iName == 0 || namestrlen == 0 || strncasecmp(cle->name(), iName, namestrlen) == 0 || strncasecmp(cle->AccountName(), iName, namestrlen) == 0 || strncasecmp(cle->LSName(), iName, namestrlen) == 0)) {
|
||||
struct in_addr in;
|
||||
struct in_addr in;
|
||||
in.s_addr = cle->GetIP();
|
||||
if (addnewline) {
|
||||
AppendAnyLenString(&output, &outsize, &outlen, newline);
|
||||
@@ -395,7 +395,7 @@ void ClientList::CLEKeepAlive(uint32 numupdates, uint32* wid) {
|
||||
|
||||
|
||||
ClientListEntry* ClientList::CheckAuth(uint32 id, const char* iKey, uint32 ip ) {
|
||||
LinkedListIterator<ClientListEntry*> iterator(clientlist);
|
||||
LinkedListIterator<ClientListEntry*> iterator(clientlist);
|
||||
|
||||
iterator.Reset();
|
||||
while(iterator.MoreElements()) {
|
||||
@@ -406,7 +406,7 @@ ClientListEntry* ClientList::CheckAuth(uint32 id, const char* iKey, uint32 ip )
|
||||
return 0;
|
||||
}
|
||||
ClientListEntry* ClientList::CheckAuth(uint32 iLSID, const char* iKey) {
|
||||
LinkedListIterator<ClientListEntry*> iterator(clientlist);
|
||||
LinkedListIterator<ClientListEntry*> iterator(clientlist);
|
||||
|
||||
iterator.Reset();
|
||||
while(iterator.MoreElements()) {
|
||||
@@ -880,7 +880,7 @@ void ClientList::SendFriendsWho(ServerFriendsWho_Struct *FriendsWho, WorldTCPCon
|
||||
WAPP3->ZoneMSGID = ZoneMSGID;
|
||||
WAPP3->Zone = PlayerZone;
|
||||
WAPP3->Class_ = PlayerClass;
|
||||
WAPP3->Level = PlayerLevel;
|
||||
WAPP3->Level = PlayerLevel;
|
||||
WAPP3->Race = PlayerRace;
|
||||
WAPP3->Account[0] = 0;
|
||||
|
||||
@@ -920,16 +920,16 @@ void ClientList::SendLFGMatches(ServerLFGMatchesRequest_Struct *smrs) {
|
||||
// First we check that the player meets the level and class criteria of the person
|
||||
// doing the search.
|
||||
if((CLE->level() >= smrs->FromLevel) && (CLE->level() <= smrs->ToLevel) &&
|
||||
(BitMask & smrs->Classes))
|
||||
// Then we check if if the player doing the search meets the level criteria specified
|
||||
(BitMask & smrs->Classes))
|
||||
// Then we check if if the player doing the search meets the level criteria specified
|
||||
// by the player who is LFG.
|
||||
//
|
||||
// GetLFGMatchFilter returns the setting of the 'Only players who match my posted filters
|
||||
// can query me' checkbox.
|
||||
// can query me' checkbox.
|
||||
//
|
||||
// FromLevel and ToLevel are the settings of the 'Want group levels:' boxes.
|
||||
if(!CLE->GetLFGMatchFilter() || ((smrs->QuerierLevel >= CLE->GetLFGFromLevel()) &&
|
||||
(smrs->QuerierLevel <= CLE->GetLFGToLevel())))
|
||||
if(!CLE->GetLFGMatchFilter() || ((smrs->QuerierLevel >= CLE->GetLFGFromLevel()) &&
|
||||
(smrs->QuerierLevel <= CLE->GetLFGToLevel())))
|
||||
Matches++;
|
||||
}
|
||||
Iterator.Advance();
|
||||
@@ -950,7 +950,7 @@ void ClientList::SendLFGMatches(ServerLFGMatchesRequest_Struct *smrs) {
|
||||
if(CLE->LFG()) {
|
||||
unsigned int BitMask = 1 << CLE->class_();
|
||||
if((CLE->level() >= smrs->FromLevel) && (CLE->level() <= smrs->ToLevel) &&
|
||||
(BitMask & smrs->Classes)) {
|
||||
(BitMask & smrs->Classes)) {
|
||||
Matches--;
|
||||
strcpy(Buffer->Name, CLE->name());
|
||||
Buffer->Class_ = CLE->class_();
|
||||
@@ -1358,5 +1358,6 @@ void ClientList::SendClientVersionSummary(const char *Name)
|
||||
}
|
||||
|
||||
zoneserver_list.SendEmoteMessage(Name, 0, 0, 13, "There are %i 6.2, %i Titanium, %i SoF, %i SoD, %i UF, %i RoF clients currently connected.",
|
||||
Client62Count, ClientTitaniumCount, ClientSoFCount, ClientSoDCount, ClientUnderfootCount, ClientRoFCount);
|
||||
Client62Count, ClientTitaniumCount, ClientSoFCount, ClientSoDCount, ClientUnderfootCount, ClientRoFCount);
|
||||
}
|
||||
|
||||
|
||||
+2
-4
@@ -40,7 +40,7 @@ public:
|
||||
void SendOnlineGuildMembers(uint32 FromID, uint32 GuildID);
|
||||
void SendClientVersionSummary(const char *Name);
|
||||
void SendLFGMatches(ServerLFGMatchesRequest_Struct *LFGMatchesRequest);
|
||||
void ConsoleSendWhoAll(const char* to, int16 admin, Who_All_Struct* whom, WorldTCPConnection* connection);
|
||||
void ConsoleSendWhoAll(const char* to, int16 admin, Who_All_Struct* whom, WorldTCPConnection* connection);
|
||||
void SendCLEList(const int16& admin, const char* to, WorldTCPConnection* connection, const char* iName = 0);
|
||||
|
||||
bool SendPacket(const char* to, ServerPacket* pack);
|
||||
@@ -79,7 +79,5 @@ protected:
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /*CLIENTLIST_H_*/
|
||||
|
||||
|
||||
+29
-28
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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/debug.h"
|
||||
#include <iostream>
|
||||
@@ -53,7 +53,7 @@ using namespace std;
|
||||
#define vsnprintf _vsnprintf
|
||||
#endif
|
||||
#define strncasecmp _strnicmp
|
||||
#define strcasecmp _stricmp
|
||||
#define strcasecmp _stricmp
|
||||
#endif
|
||||
|
||||
extern ZSList zoneserver_list;
|
||||
@@ -69,9 +69,9 @@ ConsoleList console_list;
|
||||
void CatchSignal(int sig_num);
|
||||
|
||||
Console::Console(EmuTCPConnection* itcpc)
|
||||
: WorldTCPConnection(),
|
||||
timeout_timer(RuleI(Console, SessionTimeOut)),
|
||||
prompt_timer(1000)
|
||||
: WorldTCPConnection(),
|
||||
timeout_timer(RuleI(Console, SessionTimeOut)),
|
||||
prompt_timer(1000)
|
||||
{
|
||||
tcpc = itcpc;
|
||||
tcpc->SetEcho(true);
|
||||
@@ -89,7 +89,7 @@ Console::~Console() {
|
||||
|
||||
void Console::Die() {
|
||||
state = CONSOLE_STATE_CLOSED;
|
||||
struct in_addr in;
|
||||
struct in_addr in;
|
||||
in.s_addr = GetIP();
|
||||
_log(WORLD__CONSOLE,"Removing console from %s:%d",inet_ntoa(in),GetPort());
|
||||
tcpc->Disconnect();
|
||||
@@ -100,17 +100,17 @@ bool Console::SendChannelMessage(const ServerChannelMessage_Struct* scm) {
|
||||
return false;
|
||||
switch (scm->chan_num) {
|
||||
if(RuleB(Chat, ServerWideAuction)){
|
||||
case 4: {
|
||||
SendMessage(1, "%s auctions, '%s'", scm->from, scm->message);
|
||||
break;
|
||||
case 4: {
|
||||
SendMessage(1, "%s auctions, '%s'", scm->from, scm->message);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(RuleB(Chat, ServerWideOOC)){
|
||||
case 5: {
|
||||
SendMessage(1, "%s says ooc, '%s'", scm->from, scm->message);
|
||||
break;
|
||||
if(RuleB(Chat, ServerWideOOC)){
|
||||
case 5: {
|
||||
SendMessage(1, "%s says ooc, '%s'", scm->from, scm->message);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
case 6: {
|
||||
SendMessage(1, "%s BROADCASTS, '%s'", scm->from, scm->message);
|
||||
break;
|
||||
@@ -219,7 +219,7 @@ bool Console::Process() {
|
||||
return false;
|
||||
|
||||
if (!tcpc->Connected()) {
|
||||
struct in_addr in;
|
||||
struct in_addr in;
|
||||
in.s_addr = GetIP();
|
||||
_log(WORLD__CONSOLE,"Removing console (!tcpc->Connected) from %s:%d",inet_ntoa(in),GetPort());
|
||||
return false;
|
||||
@@ -234,7 +234,7 @@ bool Console::Process() {
|
||||
if (timeout_timer.Check()) {
|
||||
SendMessage(1, 0);
|
||||
SendMessage(1, "Timeout, disconnecting...");
|
||||
struct in_addr in;
|
||||
struct in_addr in;
|
||||
in.s_addr = GetIP();
|
||||
_log(WORLD__CONSOLE,"TCP connection timeout from %s:%d",inet_ntoa(in),GetPort());
|
||||
return false;
|
||||
@@ -307,7 +307,7 @@ void ConsoleList::KillAll() {
|
||||
void ConsoleList::SendConsoleWho(WorldTCPConnection* connection, const char* to, int16 admin, char** output, uint32* outsize, uint32* outlen) {
|
||||
LinkedListIterator<Console*> iterator(list);
|
||||
iterator.Reset();
|
||||
struct in_addr in;
|
||||
struct in_addr in;
|
||||
int x = 0;
|
||||
|
||||
while(iterator.MoreElements()) {
|
||||
@@ -855,3 +855,4 @@ void Console::SendPrompt() {
|
||||
if (tcpc->GetEcho())
|
||||
SendMessage(0, "%s> ", paccountname);
|
||||
}
|
||||
|
||||
|
||||
+12
-11
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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 CONSOLE_H
|
||||
#define CONSOLE_H
|
||||
@@ -106,3 +106,4 @@ private:
|
||||
LinkedList<Console*> list;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
+6
-6
@@ -1,5 +1,5 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2008 EQEMu Development Team (http://eqemulator.net)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2008 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
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
|
||||
@@ -9,11 +9,11 @@
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "lfplist.h"
|
||||
@@ -115,7 +115,7 @@ void GroupLFPList::Process() {
|
||||
Group = Iterator.GetData();
|
||||
int MemberCount = 0;
|
||||
if(Group) {
|
||||
GroupLFPMemberEntry* GroupMembers = Group->Members;
|
||||
GroupLFPMemberEntry* GroupMembers = Group->Members;
|
||||
if(!GroupMembers) {
|
||||
Iterator.Advance();
|
||||
continue;
|
||||
@@ -193,7 +193,7 @@ void GroupLFPList::UpdateGroup(ServerLFPUpdate_Struct *Update) {
|
||||
|
||||
Group = new GroupLFP(Update->LeaderID);
|
||||
|
||||
if(Group) {
|
||||
if(Group) {
|
||||
Group->SetDetails(Update);
|
||||
LFPGroupList.Append(Group);
|
||||
}
|
||||
|
||||
+5
-4
@@ -1,5 +1,5 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2008 EQEMu Development Team (http://eqemulator.net)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2008 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
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
|
||||
@@ -9,11 +9,11 @@
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef LFPENTRY_H
|
||||
@@ -64,3 +64,4 @@ private:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
+42
-42
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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/debug.h"
|
||||
|
||||
@@ -51,7 +51,7 @@ using namespace std;
|
||||
#define vsnprintf _vsnprintf
|
||||
#endif
|
||||
#define strncasecmp _strnicmp
|
||||
#define strcasecmp _stricmp
|
||||
#define strcasecmp _stricmp
|
||||
#include <conio.h>
|
||||
#else
|
||||
#include <pthread.h>
|
||||
@@ -62,11 +62,11 @@ using namespace std;
|
||||
#include <sys/shm.h>
|
||||
#ifndef FREEBSD
|
||||
union semun {
|
||||
int val;
|
||||
struct semid_ds *buf;
|
||||
ushort *array;
|
||||
struct seminfo *__buf;
|
||||
void *__pad;
|
||||
int val;
|
||||
struct semid_ds *buf;
|
||||
ushort *array;
|
||||
struct seminfo *__buf;
|
||||
void *__pad;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -123,8 +123,8 @@ extern ConsoleList console_list;
|
||||
void CatchSignal(int sig_num);
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
RegisterExecutablePlatform(ExePlatformWorld);
|
||||
set_exception_handler();
|
||||
RegisterExecutablePlatform(ExePlatformWorld);
|
||||
set_exception_handler();
|
||||
|
||||
// Load server configuration
|
||||
_log(WORLD__INIT, "Loading server configuration..");
|
||||
@@ -289,7 +289,7 @@ int main(int argc, char** argv) {
|
||||
database.ClearRaidDetails();
|
||||
_log(WORLD__INIT, "Loading items..");
|
||||
if (!database.LoadItems()) {
|
||||
_log(WORLD__INIT_ERR, "Error: Could not load item data. But ignoring");
|
||||
_log(WORLD__INIT_ERR, "Error: Could not load item data. But ignoring");
|
||||
}
|
||||
_log(WORLD__INIT, "Loading guilds..");
|
||||
guild_mgr.LoadGuilds();
|
||||
@@ -310,9 +310,9 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
}
|
||||
if(RuleB(World, ClearTempMerchantlist)){
|
||||
_log(WORLD__INIT, "Clearing temporary merchant lists..");
|
||||
_log(WORLD__INIT, "Clearing temporary merchant lists..");
|
||||
database.ClearMerchantTemp();
|
||||
}
|
||||
}
|
||||
_log(WORLD__INIT, "Loading EQ time of day..");
|
||||
if (!zoneserver_list.worldclock.loadFile(Config->EQTimeFile.c_str()))
|
||||
_log(WORLD__INIT_ERR, "Unable to load %s", Config->EQTimeFile.c_str());
|
||||
@@ -351,9 +351,9 @@ int main(int argc, char** argv) {
|
||||
Timer PurgeInstanceTimer(450000);
|
||||
PurgeInstanceTimer.Start(450000);
|
||||
|
||||
_log(WORLD__INIT, "Loading char create info...");
|
||||
database.LoadCharacterCreateAllocations();
|
||||
database.LoadCharacterCreateCombos();
|
||||
_log(WORLD__INIT, "Loading char create info...");
|
||||
database.LoadCharacterCreateAllocations();
|
||||
database.LoadCharacterCreateCombos();
|
||||
|
||||
char errbuf[TCPConnection_ErrorBufferSize];
|
||||
if (tcps.Open(Config->WorldTCPPort, errbuf)) {
|
||||
@@ -406,24 +406,24 @@ int main(int argc, char** argv) {
|
||||
//now that we know what patch they are running, start up their client object
|
||||
struct in_addr in;
|
||||
in.s_addr = eqsi->GetRemoteIP();
|
||||
if (RuleB(World, UseBannedIPsTable)){ //Lieka: Check to see if we have the responsibility for blocking IPs.
|
||||
if (RuleB(World, UseBannedIPsTable)){ //Lieka: Check to see if we have the responsibility for blocking IPs.
|
||||
_log(WORLD__CLIENT, "Checking inbound connection %s against BannedIPs table", inet_ntoa(in));
|
||||
if (!database.CheckBannedIPs(inet_ntoa(in))){ //Lieka: Check inbound IP against banned IP table.
|
||||
_log(WORLD__CLIENT, "Connection %s PASSED banned IPs check. Processing connection.", inet_ntoa(in));
|
||||
Client* client = new Client(eqsi);
|
||||
// @merth: client->zoneattempt=0;
|
||||
client_list.Add(client);
|
||||
} else {
|
||||
_log(WORLD__CLIENT, "Connection from %s FAILED banned IPs check. Closing connection.", inet_ntoa(in));
|
||||
eqsi->Close(); //Lieka: If the inbound IP is on the banned table, close the EQStream.
|
||||
}
|
||||
}
|
||||
if (!RuleB(World, UseBannedIPsTable)){
|
||||
_log(WORLD__CLIENT, "New connection from %s:%d, processing connection", inet_ntoa(in), ntohs(eqsi->GetRemotePort()));
|
||||
Client* client = new Client(eqsi);
|
||||
// @merth: client->zoneattempt=0;
|
||||
client_list.Add(client);
|
||||
}
|
||||
if (!database.CheckBannedIPs(inet_ntoa(in))){ //Lieka: Check inbound IP against banned IP table.
|
||||
_log(WORLD__CLIENT, "Connection %s PASSED banned IPs check. Processing connection.", inet_ntoa(in));
|
||||
Client* client = new Client(eqsi);
|
||||
// @merth: client->zoneattempt=0;
|
||||
client_list.Add(client);
|
||||
} else {
|
||||
_log(WORLD__CLIENT, "Connection from %s FAILED banned IPs check. Closing connection.", inet_ntoa(in));
|
||||
eqsi->Close(); //Lieka: If the inbound IP is on the banned table, close the EQStream.
|
||||
}
|
||||
}
|
||||
if (!RuleB(World, UseBannedIPsTable)){
|
||||
_log(WORLD__CLIENT, "New connection from %s:%d, processing connection", inet_ntoa(in), ntohs(eqsi->GetRemotePort()));
|
||||
Client* client = new Client(eqsi);
|
||||
// @merth: client->zoneattempt=0;
|
||||
client_list.Add(client);
|
||||
}
|
||||
}
|
||||
|
||||
client_list.Process();
|
||||
|
||||
+12
-12
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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 WIN32
|
||||
#include <sys/socket.h>
|
||||
@@ -83,6 +83,6 @@ private:
|
||||
char worldpassword[31];
|
||||
char worldaddress[255];
|
||||
char chataddress[255];
|
||||
uint8 DEFAULTSTATUS;
|
||||
uint8 DEFAULTSTATUS;
|
||||
|
||||
};
|
||||
|
||||
+11
-30
@@ -1,14 +1,14 @@
|
||||
/*
|
||||
* This file was generated automatically by xsubpp version 1.9508 from the
|
||||
* contents of tmp. Do not edit this file, edit tmp instead.
|
||||
*
|
||||
* ANY CHANGES MADE HERE WILL BE LOST!
|
||||
*
|
||||
*/
|
||||
* This file was generated automatically by xsubpp version 1.9508 from the
|
||||
* contents of tmp. Do not edit this file, edit tmp instead.
|
||||
*
|
||||
* ANY CHANGES MADE HERE WILL BE LOST!
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2004 EQEMu Development Team (http://eqemulator.net)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2004 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
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
|
||||
@@ -18,11 +18,11 @@
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
typedef const char Const_char;
|
||||
@@ -36,7 +36,7 @@ typedef const char Const_char;
|
||||
#undef seed
|
||||
#endif
|
||||
|
||||
#ifdef THIS /* this macro seems to leak out on some systems */
|
||||
#ifdef THIS /* this macro seems to leak out on some systems */
|
||||
#undef THIS
|
||||
#endif
|
||||
|
||||
@@ -433,23 +433,6 @@ XS(XS_EQLConfig_GetZoneDetails)
|
||||
sv_setpvn(*ele, cur->second.c_str(), cur->second.length());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
@@ -471,8 +454,6 @@ XS(boot_EQLConfig)
|
||||
|
||||
//add the strcpy stuff to get rid of const warnings....
|
||||
|
||||
|
||||
|
||||
XS_VERSION_BOOTCHECK ;
|
||||
|
||||
newXSproto(strcpy(buf, "GetName"), XS_EQLConfig_GetName, file, "$");
|
||||
|
||||
+56
-92
@@ -1,14 +1,14 @@
|
||||
/*
|
||||
* This file was generated automatically by xsubpp version 1.9508 from the
|
||||
* contents of tmp. Do not edit this file, edit tmp instead.
|
||||
*
|
||||
* ANY CHANGES MADE HERE WILL BE LOST!
|
||||
*
|
||||
*/
|
||||
* This file was generated automatically by xsubpp version 1.9508 from the
|
||||
* contents of tmp. Do not edit this file, edit tmp instead.
|
||||
*
|
||||
* ANY CHANGES MADE HERE WILL BE LOST!
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2004 EQEMu Development Team (http://eqemulator.net)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2004 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
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
|
||||
@@ -16,13 +16,13 @@
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
are required to give you total support for your newly bought product;
|
||||
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
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
typedef const char Const_char;
|
||||
@@ -36,7 +36,7 @@ typedef const char Const_char;
|
||||
#undef seed
|
||||
#endif
|
||||
|
||||
#ifdef THIS /* this macro seems to leak out on some systems */
|
||||
#ifdef THIS /* this macro seems to leak out on some systems */
|
||||
#undef THIS
|
||||
#endif
|
||||
|
||||
@@ -272,23 +272,6 @@ XS(XS_EQW_GetZoneDetails)
|
||||
sv_setpvn(*ele, cur->second.c_str(), cur->second.length());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
@@ -409,23 +392,6 @@ XS(XS_EQW_GetPlayerDetails)
|
||||
sv_setpvn(*ele, cur->second.c_str(), cur->second.length());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
@@ -864,7 +830,7 @@ XS(XS_EQW_ListBugs)
|
||||
Perl_croak(aTHX_ "Usage: EQW::ListBugs(THIS, id)");
|
||||
{
|
||||
EQW * THIS;
|
||||
uint32 id = (uint32)SvUV(ST(1));
|
||||
uint32 id = (uint32)SvUV(ST(1));
|
||||
vector<string> RETVAL;
|
||||
|
||||
|
||||
@@ -953,7 +919,7 @@ XS(XS_EQW_ResolveBug)
|
||||
Perl_croak(aTHX_ "Usage: EQW::ResolveBug(THIS, id)");
|
||||
{
|
||||
EQW * THIS;
|
||||
const char *id = (const char*)SvPV_nolen(ST(1));
|
||||
const char *id = (const char*)SvPV_nolen(ST(1));
|
||||
|
||||
if (sv_derived_from(ST(0), "EQW")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(0)));
|
||||
@@ -972,53 +938,53 @@ XS(XS_EQW_ResolveBug)
|
||||
XS(XS_EQW_SendMessage); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_EQW_SendMessage)
|
||||
{
|
||||
dXSARGS;
|
||||
if (items != 3)
|
||||
Perl_croak(aTHX_ "Usage: EQW::SendMessage(THIS, type, message)");
|
||||
{
|
||||
EQW * THIS;
|
||||
dXSTARG;
|
||||
uint32 msgtype = (uint32)SvUV(ST(1));
|
||||
char* msg = (char *)SvPV_nolen(ST(2));
|
||||
dXSARGS;
|
||||
if (items != 3)
|
||||
Perl_croak(aTHX_ "Usage: EQW::SendMessage(THIS, type, message)");
|
||||
{
|
||||
EQW * THIS;
|
||||
dXSTARG;
|
||||
uint32 msgtype = (uint32)SvUV(ST(1));
|
||||
char* msg = (char *)SvPV_nolen(ST(2));
|
||||
|
||||
if (sv_derived_from(ST(0), "EQW")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(0)));
|
||||
THIS = INT2PTR(EQW *,tmp);
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EQW");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if (sv_derived_from(ST(0), "EQW")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(0)));
|
||||
THIS = INT2PTR(EQW *,tmp);
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EQW");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
|
||||
THIS->SendMessage(msgtype, msg);
|
||||
}
|
||||
XSRETURN_EMPTY;
|
||||
THIS->SendMessage(msgtype, msg);
|
||||
}
|
||||
XSRETURN_EMPTY;
|
||||
}
|
||||
|
||||
XS(XS_EQW_WorldShutDown); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_EQW_WorldShutDown)
|
||||
{
|
||||
dXSARGS;
|
||||
if (items != 3)
|
||||
Perl_croak(aTHX_ "Usage: EQW::WorldShutDown(THIS, time, interval)");
|
||||
{
|
||||
EQW * THIS;
|
||||
dXSTARG;
|
||||
uint32 time = (uint32)SvUV(ST(1));
|
||||
uint32 interval = (uint32)SvUV(ST(2));
|
||||
dXSARGS;
|
||||
if (items != 3)
|
||||
Perl_croak(aTHX_ "Usage: EQW::WorldShutDown(THIS, time, interval)");
|
||||
{
|
||||
EQW * THIS;
|
||||
dXSTARG;
|
||||
uint32 time = (uint32)SvUV(ST(1));
|
||||
uint32 interval = (uint32)SvUV(ST(2));
|
||||
|
||||
if (sv_derived_from(ST(0), "EQW")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(0)));
|
||||
THIS = INT2PTR(EQW *,tmp);
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EQW");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
if (sv_derived_from(ST(0), "EQW")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(0)));
|
||||
THIS = INT2PTR(EQW *,tmp);
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type EQW");
|
||||
if(THIS == NULL)
|
||||
Perl_croak(aTHX_ "THIS is NULL, avoiding crash.");
|
||||
|
||||
THIS->WorldShutDown(time, interval);
|
||||
}
|
||||
XSRETURN_EMPTY;
|
||||
THIS->WorldShutDown(time, interval);
|
||||
}
|
||||
XSRETURN_EMPTY;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -1038,8 +1004,6 @@ XS(boot_EQW)
|
||||
|
||||
//add the strcpy stuff to get rid of const warnings....
|
||||
|
||||
|
||||
|
||||
XS_VERSION_BOOTCHECK ;
|
||||
|
||||
newXSproto(strcpy(buf, "GetConfig"), XS_EQW_GetConfig, file, "$$");
|
||||
@@ -1067,10 +1031,10 @@ XS(boot_EQW)
|
||||
newXSproto(strcpy(buf, "SetBankerFlag"), XS_EQW_SetBankerFlag, file, "$$$");
|
||||
newXSproto(strcpy(buf, "SetTributeFlag"), XS_EQW_SetTributeFlag, file, "$$$");
|
||||
newXSproto(strcpy(buf, "SetPublicNote"), XS_EQW_SetPublicNote, file, "$$$");
|
||||
newXSproto(strcpy(buf, "CountBugs"), XS_EQW_CountBugs, file, "$");
|
||||
newXSproto(strcpy(buf, "ListBugs"), XS_EQW_ListBugs, file, "$$");
|
||||
newXSproto(strcpy(buf, "CountBugs"), XS_EQW_CountBugs, file, "$");
|
||||
newXSproto(strcpy(buf, "ListBugs"), XS_EQW_ListBugs, file, "$$");
|
||||
newXSproto(strcpy(buf, "GetBugDetails"), XS_EQW_GetBugDetails, file, "$$");
|
||||
newXSproto(strcpy(buf, "ResolveBug"), XS_EQW_ResolveBug, file, "$$");
|
||||
newXSproto(strcpy(buf, "ResolveBug"), XS_EQW_ResolveBug, file, "$$");
|
||||
newXSproto(strcpy(buf, "SendMessage"), XS_EQW_SendMessage, file, "$$$");
|
||||
newXSproto(strcpy(buf, "WorldShutDown"), XS_EQW_WorldShutDown, file, "$$$");
|
||||
XSRETURN_YES;
|
||||
|
||||
+11
-30
@@ -1,14 +1,14 @@
|
||||
/*
|
||||
* This file was generated automatically by xsubpp version 1.9508 from the
|
||||
* contents of tmp. Do not edit this file, edit tmp instead.
|
||||
*
|
||||
* ANY CHANGES MADE HERE WILL BE LOST!
|
||||
*
|
||||
*/
|
||||
* This file was generated automatically by xsubpp version 1.9508 from the
|
||||
* contents of tmp. Do not edit this file, edit tmp instead.
|
||||
*
|
||||
* ANY CHANGES MADE HERE WILL BE LOST!
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2004 EQEMu Development Team (http://eqemulator.net)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2004 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
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
|
||||
@@ -18,11 +18,11 @@
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
typedef const char Const_char;
|
||||
@@ -36,7 +36,7 @@ typedef const char Const_char;
|
||||
#undef seed
|
||||
#endif
|
||||
|
||||
#ifdef THIS /* this macro seems to leak out on some systems */
|
||||
#ifdef THIS /* this macro seems to leak out on some systems */
|
||||
#undef THIS
|
||||
#endif
|
||||
|
||||
@@ -219,23 +219,6 @@ XS(XS_HTTPRequest_get_all)
|
||||
sv_setpvn(*ele, cur->second.c_str(), cur->second.length());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
@@ -330,8 +313,6 @@ XS(boot_HTTPRequest)
|
||||
|
||||
//add the strcpy stuff to get rid of const warnings....
|
||||
|
||||
|
||||
|
||||
XS_VERSION_BOOTCHECK ;
|
||||
|
||||
newXSproto(strcpy(buf, "get"), XS_HTTPRequest_get, file, "$$;$");
|
||||
|
||||
+3
-2
@@ -54,7 +54,7 @@ bool QueryServConnection::Process()
|
||||
authenticated = true;
|
||||
else
|
||||
{
|
||||
struct in_addr in;
|
||||
struct in_addr in;
|
||||
in.s_addr = GetIP();
|
||||
_log(QUERYSERV__ERROR, "QueryServ authorization failed.");
|
||||
ServerPacket* pack = new ServerPacket(ServerOP_ZAAuthFailed);
|
||||
@@ -66,7 +66,7 @@ bool QueryServConnection::Process()
|
||||
}
|
||||
else
|
||||
{
|
||||
struct in_addr in;
|
||||
struct in_addr in;
|
||||
in.s_addr = GetIP();
|
||||
_log(QUERYSERV__ERROR, "QueryServ authorization failed.");
|
||||
ServerPacket* pack = new ServerPacket(ServerOP_ZAAuthFailed);
|
||||
@@ -131,3 +131,4 @@ bool QueryServConnection::SendPacket(ServerPacket* pack)
|
||||
|
||||
return Stream->SendPacket(pack);
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -49,7 +49,7 @@ bool UCSConnection::Process()
|
||||
authenticated = true;
|
||||
else
|
||||
{
|
||||
struct in_addr in;
|
||||
struct in_addr in;
|
||||
in.s_addr = GetIP();
|
||||
_log(UCS__ERROR, "UCS authorization failed.");
|
||||
ServerPacket* pack = new ServerPacket(ServerOP_ZAAuthFailed);
|
||||
@@ -61,7 +61,7 @@ bool UCSConnection::Process()
|
||||
}
|
||||
else
|
||||
{
|
||||
struct in_addr in;
|
||||
struct in_addr in;
|
||||
in.s_addr = GetIP();
|
||||
_log(UCS__ERROR, "UCS authorization failed.");
|
||||
ServerPacket* pack = new ServerPacket(ServerOP_ZAAuthFailed);
|
||||
@@ -127,3 +127,4 @@ void UCSConnection::SendMessage(const char *From, const char *Message)
|
||||
SendPacket(pack);
|
||||
safe_delete(pack);
|
||||
}
|
||||
|
||||
|
||||
+11
-37
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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/debug.h"
|
||||
#include "wguild_mgr.h"
|
||||
@@ -144,29 +144,3 @@ void WorldGuildManager::ProcessZonePacket(ServerPacket *pack) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+78
-80
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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 "worlddb.h"
|
||||
@@ -46,7 +46,7 @@ void WorldDatabase::GetCharSelectInfo(uint32 account_id, CharacterSelect_Struct*
|
||||
strcpy(cs->name[i], "<none>");
|
||||
cs->zone[i] = 0;
|
||||
cs->level[i] = 0;
|
||||
cs->tutorial[i] = 0;
|
||||
cs->tutorial[i] = 0;
|
||||
cs->gohome[i] = 0;
|
||||
}
|
||||
|
||||
@@ -83,8 +83,8 @@ void WorldDatabase::GetCharSelectInfo(uint32 account_id, CharacterSelect_Struct*
|
||||
cs->face[char_num] = pp->face;
|
||||
cs->haircolor[char_num] = pp->haircolor;
|
||||
cs->beardcolor[char_num] = pp->beardcolor;
|
||||
cs->eyecolor2[char_num] = pp->eyecolor2;
|
||||
cs->eyecolor1[char_num] = pp->eyecolor1;
|
||||
cs->eyecolor2[char_num] = pp->eyecolor2;
|
||||
cs->eyecolor1[char_num] = pp->eyecolor1;
|
||||
cs->hairstyle[char_num] = pp->hairstyle;
|
||||
cs->beard[char_num] = pp->beard;
|
||||
cs->drakkin_heritage[char_num] = pp->drakkin_heritage;
|
||||
@@ -102,7 +102,7 @@ void WorldDatabase::GetCharSelectInfo(uint32 account_id, CharacterSelect_Struct*
|
||||
|
||||
|
||||
// This part creates home city entries for characters created before the home bind point was tracked.
|
||||
// Do it here because the player profile is already loaded and it's as good a spot as any. This whole block should
|
||||
// Do it here because the player profile is already loaded and it's as good a spot as any. This whole block should
|
||||
// probably be removed at some point, when most accounts are safely converted.
|
||||
if(pp->binds[4].zoneId == 0) {
|
||||
bool altered = false;
|
||||
@@ -177,7 +177,7 @@ void WorldDatabase::GetCharSelectInfo(uint32 account_id, CharacterSelect_Struct*
|
||||
// @merth: Haven't done bracer01/bracer02 yet.
|
||||
// Also: this needs a second look after items are a little more solid
|
||||
// NOTE: items don't have a color, players MAY have a tint, if the
|
||||
// use_tint part is set. otherwise use the regular color
|
||||
// use_tint part is set. otherwise use the regular color
|
||||
inv = new Inventory;
|
||||
if(GetInventory(account_id, cs->name[char_num], inv))
|
||||
{
|
||||
@@ -269,8 +269,8 @@ int WorldDatabase::MoveCharacterToBind(int CharID, uint8 bindnum) {
|
||||
if(!strcmp(BindZoneName, "UNKNWN")) return pp.zone_id;
|
||||
|
||||
if (!RunQuery(query, MakeAnyLenString(&query, "UPDATE character_ SET zonename = '%s',zoneid=%i,x=%f, y=%f, z=%f, instanceid=0 WHERE id='%i'",
|
||||
BindZoneName, pp.binds[bindnum].zoneId, pp.binds[bindnum].x, pp.binds[bindnum].y, pp.binds[bindnum].z,
|
||||
CharID), errbuf, 0,&affected_rows)) {
|
||||
BindZoneName, pp.binds[bindnum].zoneId, pp.binds[bindnum].x, pp.binds[bindnum].y, pp.binds[bindnum].z,
|
||||
CharID), errbuf, 0,&affected_rows)) {
|
||||
|
||||
return pp.zone_id;
|
||||
}
|
||||
@@ -500,9 +500,9 @@ bool WorldDatabase::GetStartZoneSoF(PlayerProfile_Struct* in_pp, CharCreate_Stru
|
||||
|
||||
void WorldDatabase::GetLauncherList(std::vector<std::string> &rl) {
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char* query = 0;
|
||||
char* query = 0;
|
||||
MYSQL_RES *result;
|
||||
MYSQL_ROW row;
|
||||
MYSQL_ROW row;
|
||||
|
||||
rl.clear();
|
||||
|
||||
@@ -534,7 +534,7 @@ void WorldDatabase::SetMailKey(int CharID, int IPAddress, int MailKey) {
|
||||
sprintf(MailKeyString, "%08X", MailKey);
|
||||
|
||||
if (!RunQuery(query, MakeAnyLenString(&query, "UPDATE character_ SET mailkey = '%s' WHERE id='%i'",
|
||||
MailKeyString, CharID), errbuf))
|
||||
MailKeyString, CharID), errbuf))
|
||||
|
||||
LogFile->write(EQEMuLog::Error, "WorldDatabase::SetMailKey(%i, %s) : %s", CharID, MailKeyString, errbuf);
|
||||
|
||||
@@ -545,9 +545,9 @@ void WorldDatabase::SetMailKey(int CharID, int IPAddress, int MailKey) {
|
||||
bool WorldDatabase::GetCharacterLevel(const char *name, int &level)
|
||||
{
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char* query = 0;
|
||||
char* query = 0;
|
||||
MYSQL_RES *result;
|
||||
MYSQL_ROW row;
|
||||
MYSQL_ROW row;
|
||||
|
||||
if(RunQuery(query, MakeAnyLenString(&query, "SELECT level FROM character_ WHERE name='%s'", name), errbuf, &result))
|
||||
{
|
||||
@@ -569,71 +569,69 @@ bool WorldDatabase::GetCharacterLevel(const char *name, int &level)
|
||||
}
|
||||
|
||||
bool WorldDatabase::LoadCharacterCreateAllocations() {
|
||||
character_create_allocations.clear();
|
||||
character_create_allocations.clear();
|
||||
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char* query = 0;
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char* query = 0;
|
||||
MYSQL_RES *result;
|
||||
MYSQL_ROW row;
|
||||
if(RunQuery(query, MakeAnyLenString(&query, "SELECT * FROM char_create_point_allocations order by id"), errbuf, &result)) {
|
||||
safe_delete_array(query);
|
||||
while(row = mysql_fetch_row(result)) {
|
||||
RaceClassAllocation allocate;
|
||||
int r = 0;
|
||||
allocate.Index = atoi(row[r++]);
|
||||
allocate.BaseStats[0] = atoi(row[r++]);
|
||||
allocate.BaseStats[3] = atoi(row[r++]);
|
||||
allocate.BaseStats[1] = atoi(row[r++]);
|
||||
allocate.BaseStats[2] = atoi(row[r++]);
|
||||
allocate.BaseStats[4] = atoi(row[r++]);
|
||||
allocate.BaseStats[5] = atoi(row[r++]);
|
||||
allocate.BaseStats[6] = atoi(row[r++]);
|
||||
allocate.DefaultPointAllocation[0] = atoi(row[r++]);
|
||||
allocate.DefaultPointAllocation[3] = atoi(row[r++]);
|
||||
allocate.DefaultPointAllocation[1] = atoi(row[r++]);
|
||||
allocate.DefaultPointAllocation[2] = atoi(row[r++]);
|
||||
allocate.DefaultPointAllocation[4] = atoi(row[r++]);
|
||||
allocate.DefaultPointAllocation[5] = atoi(row[r++]);
|
||||
allocate.DefaultPointAllocation[6] = atoi(row[r++]);
|
||||
character_create_allocations.push_back(allocate);
|
||||
}
|
||||
mysql_free_result(result);
|
||||
} else {
|
||||
safe_delete_array(query);
|
||||
return false;
|
||||
}
|
||||
MYSQL_ROW row;
|
||||
if(RunQuery(query, MakeAnyLenString(&query, "SELECT * FROM char_create_point_allocations order by id"), errbuf, &result)) {
|
||||
safe_delete_array(query);
|
||||
while(row = mysql_fetch_row(result)) {
|
||||
RaceClassAllocation allocate;
|
||||
int r = 0;
|
||||
allocate.Index = atoi(row[r++]);
|
||||
allocate.BaseStats[0] = atoi(row[r++]);
|
||||
allocate.BaseStats[3] = atoi(row[r++]);
|
||||
allocate.BaseStats[1] = atoi(row[r++]);
|
||||
allocate.BaseStats[2] = atoi(row[r++]);
|
||||
allocate.BaseStats[4] = atoi(row[r++]);
|
||||
allocate.BaseStats[5] = atoi(row[r++]);
|
||||
allocate.BaseStats[6] = atoi(row[r++]);
|
||||
allocate.DefaultPointAllocation[0] = atoi(row[r++]);
|
||||
allocate.DefaultPointAllocation[3] = atoi(row[r++]);
|
||||
allocate.DefaultPointAllocation[1] = atoi(row[r++]);
|
||||
allocate.DefaultPointAllocation[2] = atoi(row[r++]);
|
||||
allocate.DefaultPointAllocation[4] = atoi(row[r++]);
|
||||
allocate.DefaultPointAllocation[5] = atoi(row[r++]);
|
||||
allocate.DefaultPointAllocation[6] = atoi(row[r++]);
|
||||
character_create_allocations.push_back(allocate);
|
||||
}
|
||||
mysql_free_result(result);
|
||||
} else {
|
||||
safe_delete_array(query);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool WorldDatabase::LoadCharacterCreateCombos() {
|
||||
character_create_race_class_combos.clear();
|
||||
character_create_race_class_combos.clear();
|
||||
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char* query = 0;
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char* query = 0;
|
||||
MYSQL_RES *result;
|
||||
MYSQL_ROW row;
|
||||
if(RunQuery(query, MakeAnyLenString(&query, "select * from char_create_combinations order by race, class, deity, start_zone"), errbuf, &result)) {
|
||||
safe_delete_array(query);
|
||||
while(row = mysql_fetch_row(result)) {
|
||||
RaceClassCombos combo;
|
||||
int r = 0;
|
||||
combo.AllocationIndex = atoi(row[r++]);
|
||||
combo.Race = atoi(row[r++]);
|
||||
combo.Class = atoi(row[r++]);
|
||||
combo.Deity = atoi(row[r++]);
|
||||
combo.Zone = atoi(row[r++]);
|
||||
combo.ExpansionRequired = atoi(row[r++]);
|
||||
character_create_race_class_combos.push_back(combo);
|
||||
}
|
||||
mysql_free_result(result);
|
||||
} else {
|
||||
safe_delete_array(query);
|
||||
return false;
|
||||
}
|
||||
MYSQL_ROW row;
|
||||
if(RunQuery(query, MakeAnyLenString(&query, "select * from char_create_combinations order by race, class, deity, start_zone"), errbuf, &result)) {
|
||||
safe_delete_array(query);
|
||||
while(row = mysql_fetch_row(result)) {
|
||||
RaceClassCombos combo;
|
||||
int r = 0;
|
||||
combo.AllocationIndex = atoi(row[r++]);
|
||||
combo.Race = atoi(row[r++]);
|
||||
combo.Class = atoi(row[r++]);
|
||||
combo.Deity = atoi(row[r++]);
|
||||
combo.Zone = atoi(row[r++]);
|
||||
combo.ExpansionRequired = atoi(row[r++]);
|
||||
character_create_race_class_combos.push_back(combo);
|
||||
}
|
||||
mysql_free_result(result);
|
||||
} else {
|
||||
safe_delete_array(query);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
+13
-14
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2006 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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 WORLDDB_H_
|
||||
#define WORLDDB_H_
|
||||
@@ -38,13 +38,12 @@ public:
|
||||
void SetMailKey(int CharID, int IPAddress, int MailKey);
|
||||
bool GetCharacterLevel(const char *name, int &level);
|
||||
|
||||
bool LoadCharacterCreateAllocations();
|
||||
bool LoadCharacterCreateCombos();
|
||||
bool LoadCharacterCreateAllocations();
|
||||
bool LoadCharacterCreateCombos();
|
||||
protected:
|
||||
|
||||
};
|
||||
|
||||
extern WorldDatabase database;
|
||||
|
||||
|
||||
#endif /*WORLDDB_H_*/
|
||||
|
||||
+25
-26
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2005 EQEMu Development Team (http://eqemulator.net)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2005 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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/debug.h"
|
||||
#include "zonelist.h"
|
||||
@@ -87,7 +87,7 @@ void ZSList::Process() {
|
||||
CatchSignal(2);
|
||||
}
|
||||
if(reminder && reminder->Check()){
|
||||
SendEmoteMessage(0,0,0,15,"<SYSTEMWIDE MESSAGE>:SYSTEM MSG:World coming down, everyone log out now. World will shut down in %i seconds...",shutdowntimer->GetRemainingTime()/1000);
|
||||
SendEmoteMessage(0,0,0,15,"<SYSTEMWIDE MESSAGE>:SYSTEM MSG:World coming down, everyone log out now. World will shut down in %i seconds...",shutdowntimer->GetRemainingTime()/1000);
|
||||
}
|
||||
LinkedListIterator<ZoneServer*> iterator(list);
|
||||
|
||||
@@ -95,7 +95,7 @@ void ZSList::Process() {
|
||||
while(iterator.MoreElements()) {
|
||||
if (!iterator.GetData()->Process()) {
|
||||
ZoneServer* zs = iterator.GetData();
|
||||
struct in_addr in;
|
||||
struct in_addr in;
|
||||
in.s_addr = zs->GetIP();
|
||||
_log(WORLD__ZONELIST,"Removing zoneserver #%d at %s:%d",zs->GetID(),zs->GetCAddress(),zs->GetCPort());
|
||||
zs->LSShutDownUpdate(zs->GetZoneID());
|
||||
@@ -204,7 +204,7 @@ ZoneServer* ZSList::FindByZoneID(uint32 ZoneID) {
|
||||
while(iterator.MoreElements())
|
||||
{
|
||||
ZoneServer* tmp = iterator.GetData();
|
||||
if (tmp->GetZoneID() == ZoneID && tmp->GetInstanceID() == 0) {
|
||||
if (tmp->GetZoneID() == ZoneID && tmp->GetInstanceID() == 0) {
|
||||
return tmp;
|
||||
}
|
||||
iterator.Advance();
|
||||
@@ -282,7 +282,7 @@ void ZSList::ListLockedZones(const char* to, WorldTCPConnection* connection) {
|
||||
|
||||
void ZSList::SendZoneStatus(const char* to, int16 admin, WorldTCPConnection* connection) {
|
||||
LinkedListIterator<ZoneServer*> iterator(list);
|
||||
struct in_addr in;
|
||||
struct in_addr in;
|
||||
|
||||
iterator.Reset();
|
||||
char locked[4];
|
||||
@@ -713,12 +713,11 @@ void ZSList::GetZoneIDList(vector<uint32> &zones) {
|
||||
zones.push_back(zs->GetID());
|
||||
iterator.Advance();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void ZSList::WorldShutDown(uint32 time, uint32 interval)
|
||||
{
|
||||
if( time > 0 ) {
|
||||
if( time > 0 ) {
|
||||
SendEmoteMessage(0,0,0,15,"<SYSTEMWIDE MESSAGE>:SYSTEM MSG:World coming down in %i seconds, everyone log out before this time.",time);
|
||||
|
||||
time *= 1000;
|
||||
@@ -730,15 +729,15 @@ void ZSList::WorldShutDown(uint32 time, uint32 interval)
|
||||
reminder->SetAtTrigger(interval);
|
||||
shutdowntimer->Start();
|
||||
reminder->Start();
|
||||
}
|
||||
else {
|
||||
SendEmoteMessage(0,0,0,15,"<SYSTEMWIDE MESSAGE>:SYSTEM MSG:World coming down, everyone log out now.");
|
||||
ServerPacket* pack = new ServerPacket;
|
||||
pack->opcode = ServerOP_ShutdownAll;
|
||||
pack->size=0;
|
||||
SendPacket(pack);
|
||||
safe_delete(pack);
|
||||
}
|
||||
else {
|
||||
SendEmoteMessage(0,0,0,15,"<SYSTEMWIDE MESSAGE>:SYSTEM MSG:World coming down, everyone log out now.");
|
||||
ServerPacket* pack = new ServerPacket;
|
||||
pack->opcode = ServerOP_ShutdownAll;
|
||||
pack->size=0;
|
||||
SendPacket(pack);
|
||||
safe_delete(pack);
|
||||
Process();
|
||||
CatchSignal(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-13
@@ -52,7 +52,7 @@ public:
|
||||
Timer* reminder;
|
||||
void NextGroupIDs(uint32 &start, uint32 &end);
|
||||
void SendLSZones();
|
||||
uint16 GetAvailableZonePort();
|
||||
uint16 GetAvailableZonePort();
|
||||
|
||||
int GetZoneCount();
|
||||
void GetZoneIDList(std::vector<uint32> &zones);
|
||||
@@ -68,16 +68,5 @@ protected:
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /*ZONELIST_H_*/
|
||||
|
||||
|
||||
+1044
-1045
File diff suppressed because it is too large
Load Diff
+15
-15
@@ -1,19 +1,19 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.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; version 2 of the License.
|
||||
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; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
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
|
||||
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 ZONESERVER_H
|
||||
#define ZONESERVER_H
|
||||
@@ -30,14 +30,14 @@ class ServerPacket;
|
||||
class ZoneServer : public WorldTCPConnection {
|
||||
public:
|
||||
ZoneServer(EmuTCPConnection* itcpc);
|
||||
~ZoneServer();
|
||||
~ZoneServer();
|
||||
virtual inline bool IsZoneServer() { return true; }
|
||||
|
||||
bool Process();
|
||||
bool SendPacket(ServerPacket* pack) { return tcpc->SendPacket(pack); }
|
||||
void SendEmoteMessage(const char* to, uint32 to_guilddbid, int16 to_minstatus, uint32 type, const char* message, ...);
|
||||
void SendEmoteMessageRaw(const char* to, uint32 to_guilddbid, int16 to_minstatus, uint32 type, const char* message);
|
||||
bool SetZone(uint32 iZoneID, uint32 iInstanceID = 0, bool iStaticZone = false);
|
||||
bool SetZone(uint32 iZoneID, uint32 iInstanceID = 0, bool iStaticZone = false);
|
||||
void TriggerBootup(uint32 iZoneID = 0, uint32 iInstanceID = 0, const char* iAdminName = 0, bool iMakeStatic = false);
|
||||
void Disconnect() { tcpc->Disconnect(); }
|
||||
void IncommingClient(Client* client);
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
inline bool IsStaticZone() const{ return staticzone; }
|
||||
inline uint32 NumPlayers() const { return pNumPlayers; }
|
||||
inline void AddPlayer() { pNumPlayers++; }
|
||||
inline void RemovePlayer() { pNumPlayers--; }
|
||||
inline void RemovePlayer() { pNumPlayers--; }
|
||||
inline const char * GetLaunchName() const { return(launcher_name.c_str()); }
|
||||
inline const char * GetLaunchedName() const { return(launched_name.c_str()); }
|
||||
|
||||
@@ -89,5 +89,5 @@ private:
|
||||
std::string launched_name; //the name of the zone we launched.
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user