Merge conflicts

This commit is contained in:
KimLS
2013-05-15 13:22:46 -07:00
616 changed files with 38180 additions and 38954 deletions
+21 -20
View File
@@ -1,20 +1,20 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
SET(ucs_sources
chatchannel.cpp
clientlist.cpp
database.cpp
ucs.cpp
ucsconfig.cpp
worldserver.cpp
chatchannel.cpp
clientlist.cpp
database.cpp
ucs.cpp
ucsconfig.cpp
worldserver.cpp
)
SET(ucs_headers
chatchannel.h
clientlist.h
database.h
ucsconfig.h
worldserver.h
chatchannel.h
clientlist.h
database.h
ucsconfig.h
worldserver.h
)
ADD_EXECUTABLE(ucs ${ucs_sources} ${ucs_headers})
@@ -24,24 +24,25 @@ ADD_DEFINITIONS(-DUCS)
TARGET_LINK_LIBRARIES(ucs Common debug ${MySQL_LIBRARY_DEBUG} optimized ${MySQL_LIBRARY_RELEASE} ${ZLIB_LIBRARY})
IF(MSVC)
SET_TARGET_PROPERTIES(ucs PROPERTIES LINK_FLAGS_RELEASE "/OPT:REF /OPT:ICF")
TARGET_LINK_LIBRARIES(ucs "Ws2_32.lib")
SET_TARGET_PROPERTIES(ucs PROPERTIES LINK_FLAGS_RELEASE "/OPT:REF /OPT:ICF")
TARGET_LINK_LIBRARIES(ucs "Ws2_32.lib")
ENDIF(MSVC)
IF(MINGW)
TARGET_LINK_LIBRARIES(ucs "WS2_32")
TARGET_LINK_LIBRARIES(ucs "WS2_32")
ENDIF(MINGW)
IF(UNIX)
IF(NOT FREEBSD)
TARGET_LINK_LIBRARIES(ucs "dl")
ENDIF(NOT FREEBSD)
TARGET_LINK_LIBRARIES(ucs "z")
TARGET_LINK_LIBRARIES(ucs "m")
TARGET_LINK_LIBRARIES(ucs "rt")
TARGET_LINK_LIBRARIES(ucs "pthread")
ADD_DEFINITIONS(-fPIC)
TARGET_LINK_LIBRARIES(ucs "z")
TARGET_LINK_LIBRARIES(ucs "m")
TARGET_LINK_LIBRARIES(ucs "rt")
TARGET_LINK_LIBRARIES(ucs "pthread")
ADD_DEFINITIONS(-fPIC)
ENDIF(UNIX)
SET(EXECUTABLE_OUTPUT_PATH ../Bin)
+12 -13
View File
@@ -1,6 +1,4 @@
/*
EQEMu: Everquest Server Emulator
/* 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
@@ -11,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
*/
@@ -28,7 +26,7 @@
extern Database database;
extern uint32 ChatMessagesSent;
ChatChannel::ChatChannel(string inName, string inOwner, string inPassword, bool inPermanent, int inMinimumStatus) :
ChatChannel::ChatChannel(string inName, string inOwner, string inPassword, bool inPermanent, int inMinimumStatus) :
DeleteTimer(0) {
Name = inName;
@@ -43,8 +41,8 @@ ChatChannel::ChatChannel(string inName, string inOwner, string inPassword, bool
Moderated = false;
_log(UCS__TRACE, "New ChatChannel created: Name: [%s], Owner: [%s], Password: [%s], MinStatus: %i",
Name.c_str(), Owner.c_str(), Password.c_str(), MinimumStatus);
_log(UCS__TRACE, "New ChatChannel created: Name: [%s], Owner: [%s], Password: [%s], MinStatus: %i",
Name.c_str(), Owner.c_str(), Password.c_str(), MinimumStatus);
}
@@ -301,7 +299,7 @@ bool ChatChannel::RemoveClient(Client *c) {
return false;
_log(UCS__TRACE, "Starting delete timer for empty password protected channel %s", Name.c_str());
DeleteTimer.Start(RuleI(Channels, DeleteTimer) * 60000);
}
@@ -399,7 +397,7 @@ void ChatChannel::SendMessageToChannel(string Message, Client* Sender) {
if(ChannelClient)
{
_log(UCS__TRACE, "Sending message to %s from %s",
ChannelClient->GetName().c_str(), Sender->GetName().c_str());
ChannelClient->GetName().c_str(), Sender->GetName().c_str());
ChannelClient->SendChannelMessage(Name, Message, Sender);
}
@@ -455,7 +453,7 @@ ChatChannel *ChatChannelList::AddClientToChannel(string ChannelName, Client *c)
if(!c) return nullptr;
if((ChannelName.length() > 0) && (isdigit(ChannelName[0]))) {
c->GeneralChannelMessage("The channel name can not begin with a number.");
return nullptr;
@@ -465,7 +463,7 @@ ChatChannel *ChatChannelList::AddClientToChannel(string ChannelName, Client *c)
string::size_type Colon = ChannelName.find_first_of(":");
if(Colon == string::npos)
if(Colon == string::npos)
NormalisedName = CapitaliseName(ChannelName);
else {
NormalisedName = CapitaliseName(ChannelName.substr(0, Colon));
@@ -509,7 +507,7 @@ ChatChannel *ChatChannelList::AddClientToChannel(string ChannelName, Client *c)
}
if(RequiredChannel->CheckPassword(Password) || RequiredChannel->IsOwner(c->GetName()) || RequiredChannel->IsModerator(c->GetName()) ||
c->IsChannelAdmin()) {
c->IsChannelAdmin()) {
RequiredChannel->AddClient(c);
@@ -704,3 +702,4 @@ string CapitaliseName(string inString) {
return NormalisedName;
}
+59 -60
View File
@@ -1,6 +1,4 @@
/*
EQEMu: Everquest Server Emulator
/* 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
@@ -11,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
*/
@@ -83,8 +81,8 @@ vector<string> ParseRecipients(string RecipientString) {
// This method parses the Recipient List in the mailto command, which can look like this example:
//
// "Baalinor <SOE.EQ.BTG2.Baalinor>,
// -Friends <SOE.EQ.BTG2.Playedtest SOE.EQ.BTG2.Dyetest>,
// "Baalinor <SOE.EQ.BTG2.Baalinor>,
// -Friends <SOE.EQ.BTG2.Playedtest SOE.EQ.BTG2.Dyetest>,
// Guild <SOE.EQ.BTG2.Dsfvxcbcx SOE.EQ.BTG2.Necronor>, SOE.EQ.BTG2.luccerathe, SOE.EQ.BTG2.codsas
//
// First, it splits it up at commas, so it looks like this:
@@ -180,7 +178,7 @@ vector<string> ParseRecipients(string RecipientString) {
break;
}
RecipientList.push_back(Secret + Recips.substr(CurrentPos,
RecipientList.push_back(Secret + Recips.substr(CurrentPos,
Space - CurrentPos));
CurrentPos = Space + 1;
}
@@ -191,9 +189,9 @@ vector<string> ParseRecipients(string RecipientString) {
}
}
(*Iterator) = Secret + (*Iterator);
Iterator++;
}
@@ -209,10 +207,10 @@ vector<string> ParseRecipients(string RecipientString) {
LastPeriod = (*Iterator).find_last_of(".");
if(LastPeriod != string::npos) {
if(LastPeriod != string::npos) {
(*Iterator) = (*Iterator).substr(LastPeriod + 1);
for(unsigned int i = 0; i < (*Iterator).length(); i++) {
if(i == 0)
@@ -240,7 +238,7 @@ vector<string> ParseRecipients(string RecipientString) {
static void ProcessMailTo(Client *c, string MailMessage) {
_log(UCS__TRACE, "MAILTO: From %s, %s", c->MailBoxName().c_str(), MailMessage.c_str());
vector<string> Recipients;
string::size_type FirstQuote = MailMessage.find_first_of("\"", 0);
@@ -309,7 +307,7 @@ static void ProcessMailTo(Client *c, string MailMessage) {
if(!database.SendMail(Recipients[i], c->MailBoxName(), Subject, Body, RecipientsString)) {
_log(UCS__ERROR, "Failed in SendMail(%s, %s, %s, %s)", Recipients[i].c_str(),
c->MailBoxName().c_str(), Subject.c_str(), RecipientsString.c_str());
c->MailBoxName().c_str(), Subject.c_str(), RecipientsString.c_str());
int PacketLength = 10 + Recipients[i].length() + Subject.length();
@@ -335,7 +333,7 @@ static void ProcessMailTo(Client *c, string MailMessage) {
Success = false;
}
}
if(Success) {
// Success
EQApplicationPacket *outapp = new EQApplicationPacket(OP_MailDeliveryStatus, 10);
@@ -494,7 +492,7 @@ Clientlist::Clientlist(int ChatPort) {
Client::Client(EQStream *eqs) {
ClientStream = eqs;
ClientStream = eqs;
CurrentMailBox = 0;
@@ -561,17 +559,17 @@ void Clientlist::CheckForStaleConnections(Client *c) {
for(Iterator = ClientChatConnections.begin(); Iterator != ClientChatConnections.end(); Iterator++) {
if(((*Iterator) != c) && ((c->GetName() == (*Iterator)->GetName())
&& (c->GetConnectionType() == (*Iterator)->GetConnectionType()))) {
&& (c->GetConnectionType() == (*Iterator)->GetConnectionType()))) {
_log(UCS__CLIENT, "Removing old connection for %s", c->GetName().c_str());
struct in_addr in;
struct in_addr in;
in.s_addr = (*Iterator)->ClientStream->GetRemoteIP();
_log(UCS__CLIENT, "Client connection from %s:%d closed.", inet_ntoa(in),
ntohs((*Iterator)->ClientStream->GetRemotePort()));
ntohs((*Iterator)->ClientStream->GetRemotePort()));
safe_delete((*Iterator));
Iterator = ClientChatConnections.erase(Iterator);
@@ -585,7 +583,7 @@ void Clientlist::Process() {
while((eqs = chatsf->Pop())) {
struct in_addr in;
struct in_addr in;
in.s_addr = eqs->GetRemoteIP();
@@ -605,13 +603,13 @@ void Clientlist::Process() {
(*Iterator)->AccountUpdate();
if((*Iterator)->ClientStream->CheckClosed()) {
struct in_addr in;
struct in_addr in;
in.s_addr = (*Iterator)->ClientStream->GetRemoteIP();
_log(UCS__CLIENT, "Client connection from %s:%d closed.", inet_ntoa(in),
ntohs((*Iterator)->ClientStream->GetRemotePort()));
ntohs((*Iterator)->ClientStream->GetRemotePort()));
safe_delete((*Iterator));
Iterator = ClientChatConnections.erase(Iterator);
@@ -627,7 +625,7 @@ void Clientlist::Process() {
bool KeyValid = true;
while( KeyValid && !(*Iterator)->GetForceDisconnect() &&
(app = (EQApplicationPacket *)(*Iterator)->ClientStream->PopPacket())) {
(app = (EQApplicationPacket *)(*Iterator)->ClientStream->PopPacket())) {
_pkt(UCS__PACKETS, app);
@@ -698,7 +696,7 @@ void Clientlist::Process() {
case OP_Mail: {
string CommandString = (const char*)app->pBuffer;
ProcessOPMailCommand((*Iterator), CommandString);
break;
@@ -715,13 +713,13 @@ void Clientlist::Process() {
}
if(!KeyValid || (*Iterator)->GetForceDisconnect()) {
struct in_addr in;
struct in_addr in;
in.s_addr = (*Iterator)->ClientStream->GetRemoteIP();
_log(UCS__TRACE, "Force disconnecting client: %s:%d, KeyValid=%i, GetForceDisconnect()=%i",
inet_ntoa(in), ntohs((*Iterator)->ClientStream->GetRemotePort()),
KeyValid, (*Iterator)->GetForceDisconnect());
inet_ntoa(in), ntohs((*Iterator)->ClientStream->GetRemotePort()),
KeyValid, (*Iterator)->GetForceDisconnect());
(*Iterator)->ClientStream->Close();
@@ -762,7 +760,7 @@ void Clientlist::ProcessOPMailCommand(Client *c, string CommandString)
string::size_type Space = CommandString.find_first_of(" ");
if(Space != string::npos) {
if(Space != string::npos) {
Command = CommandString.substr(0, Space);
@@ -793,7 +791,7 @@ void Clientlist::ProcessOPMailCommand(Client *c, string CommandString)
case CommandListAll:
ChannelList->SendAllChannels(c);
break;
case CommandList:
c->ProcessChannelList(Parameters);
break;
@@ -870,12 +868,12 @@ void Clientlist::ProcessOPMailCommand(Client *c, string CommandString)
case CommandSelectMailBox:
{
string::size_type NumStart = Parameters.find_first_of("0123456789");
c->ChangeMailBox(atoi(Parameters.substr(NumStart).c_str()));
c->ChangeMailBox(atoi(Parameters.substr(NumStart).c_str()));
break;
}
case CommandSetMailForwarding:
break;
case CommandBuddy:
RemoveApostrophes(Parameters);
ProcessCommandBuddy(c, Parameters);
@@ -924,7 +922,7 @@ void Client::SendMailBoxes() {
int PacketLength = 10;
string s;
for(int i = 0; i < Count; i++) {
s += GetMailPrefix() + Characters[i].Name;
@@ -1028,7 +1026,7 @@ void Client::JoinChannels(string ChannelNameList) {
if(NumberOfChannels == MAX_JOINED_CHANNELS) {
GeneralChannelMessage("You have joined the maximum number of channels. /leave one before trying to join another.");
break;
}
@@ -1238,7 +1236,7 @@ void Client::ProcessChannelList(string Input) {
ChatChannel *RequiredChannel = ChannelList->FindChannel(ChannelName);
if(RequiredChannel)
if(RequiredChannel)
RequiredChannel->SendChannelMembers(this);
else
GeneralChannelMessage("Channel " + Input + " not found.");
@@ -1289,7 +1287,7 @@ void Client::SendChannelList() {
safe_delete(outapp);
}
void Client::SendChannelMessage(string Message)
void Client::SendChannelMessage(string Message)
{
string::size_type MessageStart = Message.find_first_of(" ");
@@ -1311,7 +1309,7 @@ void Client::SendChannelMessage(string Message)
if(ChannelName.compare("Newplayers") != 0)
{
if(GetKarma() < RuleI(Chat, KarmaGlobalChatLimit))
if(GetKarma() < RuleI(Chat, KarmaGlobalChatLimit))
{
CharacterEntry *char_ent = nullptr;
for(int x = 0; x < Characters.size(); ++x)
@@ -1348,11 +1346,11 @@ void Client::SendChannelMessage(string Message)
}
}
int AllowedMessages = RuleI(Chat, MinimumMessagesPerInterval) + GetKarma();
AllowedMessages = AllowedMessages > RuleI(Chat, MaximumMessagesPerInterval) ? RuleI(Chat, MaximumMessagesPerInterval) : AllowedMessages;
AllowedMessages = AllowedMessages > RuleI(Chat, MaximumMessagesPerInterval) ? RuleI(Chat, MaximumMessagesPerInterval) : AllowedMessages;
if(RuleI(Chat, MinStatusToBypassAntiSpam) <= Status)
AllowedMessages = 10000;
AttemptedMessages++;
if(AttemptedMessages > AllowedMessages)
{
@@ -1363,7 +1361,7 @@ void Client::SendChannelMessage(string Message)
if(GlobalChatLimiterTimer)
{
char TimeLeft[256];
sprintf(TimeLeft, "You are currently rate limited, you cannot send more messages for %i seconds.",
sprintf(TimeLeft, "You are currently rate limited, you cannot send more messages for %i seconds.",
(GlobalChatLimiterTimer->GetRemainingTime() / 1000));
GeneralChannelMessage(TimeLeft);
}
@@ -1424,7 +1422,7 @@ void Client::SendChannelMessageByNumber(string Message) {
if(RequiredChannel->GetName().compare("Newplayers") != 0)
{
if(GetKarma() < RuleI(Chat, KarmaGlobalChatLimit))
if(GetKarma() < RuleI(Chat, KarmaGlobalChatLimit))
{
CharacterEntry *char_ent = nullptr;
for(int x = 0; x < Characters.size(); ++x)
@@ -1446,8 +1444,8 @@ void Client::SendChannelMessageByNumber(string Message) {
}
}
_log(UCS__TRACE, "%s tells %s, [%s]", GetName().c_str(), RequiredChannel->GetName().c_str(),
Message.substr(MessageStart + 1).c_str());
_log(UCS__TRACE, "%s tells %s, [%s]", GetName().c_str(), RequiredChannel->GetName().c_str(),
Message.substr(MessageStart + 1).c_str());
if(RuleB(Chat, EnableAntiSpam))
{
@@ -1463,7 +1461,7 @@ void Client::SendChannelMessageByNumber(string Message) {
}
}
int AllowedMessages = RuleI(Chat, MinimumMessagesPerInterval) + GetKarma();
AllowedMessages = AllowedMessages > RuleI(Chat, MaximumMessagesPerInterval) ? RuleI(Chat, MaximumMessagesPerInterval) : AllowedMessages;
AllowedMessages = AllowedMessages > RuleI(Chat, MaximumMessagesPerInterval) ? RuleI(Chat, MaximumMessagesPerInterval) : AllowedMessages;
if(RuleI(Chat, MinStatusToBypassAntiSpam) <= Status)
AllowedMessages = 10000;
@@ -1477,7 +1475,7 @@ void Client::SendChannelMessageByNumber(string Message) {
if(GlobalChatLimiterTimer)
{
char TimeLeft[256];
sprintf(TimeLeft, "You are currently rate limited, you cannot send more messages for %i seconds.",
sprintf(TimeLeft, "You are currently rate limited, you cannot send more messages for %i seconds.",
(GlobalChatLimiterTimer->GetRemainingTime() / 1000));
GeneralChannelMessage(TimeLeft);
}
@@ -1544,7 +1542,7 @@ void Client::ToggleAnnounce(string State)
string Message = "Announcing now ";
if(Announce)
if(Announce)
Message += "on";
else
Message += "off";
@@ -1746,7 +1744,7 @@ void Client::SetChannelOwner(string CommandString) {
void Client::OPList(string CommandString) {
string::size_type ChannelStart = CommandString.find_first_not_of(" ");
if(ChannelStart == string::npos) {
string Message = "Incorrect syntax: /chat oplist <channel>";
GeneralChannelMessage(Message);
@@ -1969,7 +1967,7 @@ void Client::ChannelGrantModerator(string CommandString) {
}
else {
RequiredChannel->AddModerator(Moderator);
if(RequiredClient)
RequiredClient->GeneralChannelMessage(GetName() + " has made you a moderator of channel " + ChannelName);
@@ -2056,7 +2054,7 @@ void Client::ChannelGrantVoice(string CommandString) {
}
else {
RequiredChannel->AddVoice(Voicee);
if(RequiredClient)
RequiredClient->GeneralChannelMessage(GetName() + " has given you voice in channel " + ChannelName);
@@ -2139,7 +2137,7 @@ void Client::ChannelKick(string CommandString) {
return;
}
if(RequiredChannel->IsModerator(Kickee)) {
if(RequiredChannel->IsModerator(Kickee)) {
RequiredChannel->RemoveModerator(Kickee);
@@ -2256,7 +2254,7 @@ Client *Clientlist::IsCharacterOnline(string CharacterName) {
// If the mail is destined for the primary mailbox for this character, or the one they have selected
//
if((MailBoxNumber == 0) || (MailBoxNumber == (*Iterator)->GetMailBoxNumber()))
if((MailBoxNumber == 0) || (MailBoxNumber == (*Iterator)->GetMailBoxNumber()))
return (*Iterator);
}
@@ -2280,7 +2278,7 @@ void Client::SendNotification(int MailBoxNumber, string Subject, string From, in
char sMessageID[100];
char Sequence[100];
sprintf(TimeStamp, "%i", (int)time(nullptr));
sprintf(sMessageID, "%i", MessageID);
@@ -2296,8 +2294,8 @@ void Client::SendNotification(int MailBoxNumber, string Subject, string From, in
VARSTRUCT_ENCODE_INTSTRING(PacketBuffer, MailBoxNumber);
VARSTRUCT_ENCODE_STRING(PacketBuffer, sMessageID);
VARSTRUCT_ENCODE_STRING(PacketBuffer, TimeStamp);
VARSTRUCT_ENCODE_STRING(PacketBuffer, "1");
VARSTRUCT_ENCODE_STRING(PacketBuffer, From.c_str());
VARSTRUCT_ENCODE_STRING(PacketBuffer, "1");
VARSTRUCT_ENCODE_STRING(PacketBuffer, From.c_str());
VARSTRUCT_ENCODE_STRING(PacketBuffer, Subject.c_str());
_pkt(UCS__PACKETS, outapp);
@@ -2314,13 +2312,13 @@ void Client::ChangeMailBox(int NewMailBox) {
SetMailBox(NewMailBox);
_log(UCS__TRACE, "New mailbox is %s", MailBoxName().c_str());
EQApplicationPacket *outapp = new EQApplicationPacket(OP_MailboxChange, 2);
char *buf = (char *)outapp->pBuffer;
VARSTRUCT_ENCODE_INTSTRING(buf, NewMailBox);
_pkt(UCS__PACKETS, outapp);
QueuePacket(outapp);
@@ -2388,13 +2386,13 @@ string Client::MailBoxName() {
if((Characters.size() == 0) || (CurrentMailBox > (Characters.size() - 1)))
{
_log(UCS__ERROR, "MailBoxName() called with CurrentMailBox set to %i and Characters.size() is %i",
CurrentMailBox, Characters.size());
CurrentMailBox, Characters.size());
return "";
}
_log(UCS__TRACE, "MailBoxName() called with CurrentMailBox set to %i and Characters.size() is %i",
CurrentMailBox, Characters.size());
CurrentMailBox, Characters.size());
return Characters[CurrentMailBox].Name;
@@ -2407,3 +2405,4 @@ int Client::GetCharID() {
return Characters[0].CharID;
}
+40 -40
View File
@@ -1,6 +1,4 @@
/*
EQEMu: Everquest Server Emulator
/* 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
@@ -11,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
*/
@@ -32,48 +30,50 @@
#define MAX_JOINED_CHANNELS 10
enum { CommandJoin = 0, CommandLeaveAll, CommandLeave, CommandListAll, CommandList, CommandSet, CommandAnnounce, CommandSetOwner,
CommandOPList, CommandInvite, CommandGrant, CommandModerate, CommandVoice, CommandKick,
CommandPassword, CommandToggleInvites, CommandAFK, CommandUptime,
CommandGetHeaders, CommandGetBody, CommandMailTo, CommandSetMessageStatus, CommandSelectMailBox,
CommandSetMailForwarding, CommandBuddy, CommandIgnorePlayer,
CommandEndOfList };
enum {
CommandJoin = 0, CommandLeaveAll, CommandLeave, CommandListAll, CommandList, CommandSet, CommandAnnounce, CommandSetOwner,
CommandOPList, CommandInvite, CommandGrant, CommandModerate, CommandVoice, CommandKick,
CommandPassword, CommandToggleInvites, CommandAFK, CommandUptime,
CommandGetHeaders, CommandGetBody, CommandMailTo, CommandSetMessageStatus, CommandSelectMailBox,
CommandSetMailForwarding, CommandBuddy, CommandIgnorePlayer,
CommandEndOfList
};
struct CommandEntry {
const char *CommandString;
int CommandCode;
int CommandCode;
};
typedef enum { ConnectionTypeUnknown, ConnectionTypeCombined, ConnectionTypeMail, ConnectionTypeChat } ConnectionType;
static const CommandEntry Commands[] = {
{ "join", CommandJoin },
{ "leaveall", CommandLeaveAll },
{ "leave", CommandLeave },
{ "listall", CommandListAll },
{ "list", CommandList },
{ "set", CommandSet },
{ "announce", CommandAnnounce },
{ "setowner", CommandSetOwner },
{ "oplist", CommandOPList },
{ "invite", CommandInvite },
{ "grant", CommandGrant },
{ "moderate", CommandModerate },
{ "voice", CommandVoice },
{ "kick", CommandKick },
{ "password", CommandPassword },
{ "toggleinvites", CommandToggleInvites },
{ "afk", CommandAFK },
{ "uptime", CommandUptime },
{ "getheaders", CommandGetHeaders },
{ "getbody", CommandGetBody },
{ "mailto", CommandMailTo },
{ "setmessagestatus", CommandSetMessageStatus },
{ "selectmailbox", CommandSelectMailBox },
{ "setmailforwarding", CommandSetMailForwarding },
{ "buddy", CommandBuddy },
{ "ignoreplayer", CommandIgnorePlayer },
{ "", CommandEndOfList } };
static const CommandEntry Commands[] = {
{ "join", CommandJoin },
{ "leaveall", CommandLeaveAll },
{ "leave", CommandLeave },
{ "listall", CommandListAll },
{ "list", CommandList },
{ "set", CommandSet },
{ "announce", CommandAnnounce },
{ "setowner", CommandSetOwner },
{ "oplist", CommandOPList },
{ "invite", CommandInvite },
{ "grant", CommandGrant },
{ "moderate", CommandModerate },
{ "voice", CommandVoice },
{ "kick", CommandKick },
{ "password", CommandPassword },
{ "toggleinvites", CommandToggleInvites },
{ "afk", CommandAFK },
{ "uptime", CommandUptime },
{ "getheaders", CommandGetHeaders },
{ "getbody", CommandGetBody },
{ "mailto", CommandMailTo },
{ "setmessagestatus", CommandSetMessageStatus },
{ "selectmailbox", CommandSelectMailBox },
{ "setmailforwarding", CommandSetMailForwarding },
{ "buddy", CommandBuddy },
{ "ignoreplayer", CommandIgnorePlayer },
{ "", CommandEndOfList } };
struct CharacterEntry {
int CharID;
+39 -40
View File
@@ -1,6 +1,4 @@
/*
EQEMu: Everquest Server Emulator
/* 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
@@ -11,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
*/
@@ -112,7 +110,7 @@ void Database::GetAccountStatus(Client *c) {
MYSQL_ROW row;
if (!RunQuery(query,MakeAnyLenString(&query, "select `status`, `hideme`, `karma`, `revoked` from `account` where `id`='%i' limit 1",
c->GetAccountID()),errbuf,&result)){
c->GetAccountID()),errbuf,&result)){
_log(UCS__ERROR, "Unable to get account status for character %s, error %s", c->GetName().c_str(), errbuf);
@@ -153,7 +151,7 @@ int Database::FindAccount(const char *CharacterName, Client *c) {
c->ClearCharacters();
if (!RunQuery(query,MakeAnyLenString(&query, "select `id`, `account_id`, `level` from `character_` where `name`='%s' limit 1",
CharacterName),errbuf,&result))
CharacterName),errbuf,&result))
{
_log(UCS__ERROR, "FindAccount query failed: %s", query);
safe_delete_array(query);
@@ -161,7 +159,7 @@ int Database::FindAccount(const char *CharacterName, Client *c) {
}
safe_delete_array(query);
if (mysql_num_rows(result) != 1)
if (mysql_num_rows(result) != 1)
{
_log(UCS__ERROR, "Bad result from query");
mysql_free_result(result);
@@ -176,14 +174,14 @@ int Database::FindAccount(const char *CharacterName, Client *c) {
_log(UCS__TRACE, "Account ID for %s is %i", CharacterName, AccountID);
if (!RunQuery(query,MakeAnyLenString(&query, "select `id`, `name`, `level` from `character_` where `account_id`=%i and `name` !='%s'",
AccountID, CharacterName),errbuf,&result))
AccountID, CharacterName),errbuf,&result))
{
safe_delete_array(query);
return AccountID;
}
safe_delete_array(query);
for(unsigned int i = 0; i < mysql_num_rows(result); i++)
for(unsigned int i = 0; i < mysql_num_rows(result); i++)
{
row = mysql_fetch_row(result);
c->AddCharacter(atoi(row[0]), row[1], atoi(row[2]));
@@ -200,7 +198,7 @@ bool Database::VerifyMailKey(string CharacterName, int IPAddress, string MailKey
MYSQL_ROW row;
if (!RunQuery(query,MakeAnyLenString(&query, "select `mailkey` from `character_` where `name`='%s' limit 1",
CharacterName.c_str()),errbuf,&result)){
CharacterName.c_str()),errbuf,&result)){
safe_delete_array(query);
@@ -214,7 +212,7 @@ bool Database::VerifyMailKey(string CharacterName, int IPAddress, string MailKey
row = mysql_fetch_row(result);
// The key is the client's IP address (expressed as 8 hex digits) and an 8 hex digit random string generated
// by world.
// by world.
//
char CombinedKey[17];
@@ -222,7 +220,7 @@ bool Database::VerifyMailKey(string CharacterName, int IPAddress, string MailKey
sprintf(CombinedKey, "%08X%s", IPAddress, MailKey.c_str());
else
sprintf(CombinedKey, "%s", MailKey.c_str());
_log(UCS__TRACE, "DB key is [%s], Client key is [%s]", row[0], CombinedKey);
bool Valid = !strcmp(row[0], CombinedKey);
@@ -243,7 +241,7 @@ int Database::FindCharacter(const char *CharacterName) {
char *SafeCharName = RemoveApostrophes(CharacterName);
if (!RunQuery(query,MakeAnyLenString(&query, "select `id` from `character_` where `name`='%s' limit 1",
SafeCharName),errbuf,&result)){
SafeCharName),errbuf,&result)){
_log(UCS__ERROR, "FindCharacter failed. %s %s", query, errbuf);
@@ -350,7 +348,7 @@ void Database::SetChannelPassword(string ChannelName, string Password) {
char *query = 0;
if(!RunQuery(query, MakeAnyLenString(&query, "UPDATE `chatchannels` set `password`='%s' where `name`='%s'", Password.c_str(),
ChannelName.c_str()), errbuf)) {
ChannelName.c_str()), errbuf)) {
_log(UCS__ERROR, "Error updating password in database: %s, %s", query, errbuf);
@@ -367,7 +365,7 @@ void Database::SetChannelOwner(string ChannelName, string Owner) {
char *query = 0;
if(!RunQuery(query, MakeAnyLenString(&query, "UPDATE `chatchannels` set `owner`='%s' where `name`='%s'", Owner.c_str(),
ChannelName.c_str()), errbuf)) {
ChannelName.c_str()), errbuf)) {
_log(UCS__ERROR, "Error updating Owner in database: %s, %s", query, errbuf);
@@ -393,7 +391,7 @@ void Database::SendHeaders(Client *c) {
MYSQL_ROW row;
if (!RunQuery(query,MakeAnyLenString(&query, "select `msgid`,`timestamp`,`from`,`subject`, `status` from `mail` "
"where `charid`=%i", CharacterID),errbuf,&result)){
"where `charid`=%i", CharacterID),errbuf,&result)){
safe_delete_array(query);
@@ -407,7 +405,7 @@ void Database::SendHeaders(Client *c) {
my_ulonglong NumRows = mysql_num_rows(result);
int HeaderCountPacketLength = 0;
sprintf(Buf, "%i", c->GetMailBoxNumber());
HeaderCountPacketLength += (strlen(Buf) + 1);
@@ -497,7 +495,7 @@ void Database::SendBody(Client *c, int MessageNumber) {
MYSQL_ROW row;
if (!RunQuery(query,MakeAnyLenString(&query, "select `msgid`, `body`, `to` from `mail` "
"where `charid`=%i and `msgid`=%i", CharacterID, MessageNumber), errbuf, &result)){
"where `charid`=%i and `msgid`=%i", CharacterID, MessageNumber), errbuf, &result)){
safe_delete_array(query);
return ;
@@ -552,7 +550,7 @@ bool Database::SendMail(string Recipient, string From, string Subject, string Bo
//printf("Database::SendMail(%s, %s, %s)\n", Recipient.c_str(), From.c_str(), Subject.c_str());
string::size_type LastPeriod = Recipient.find_last_of(".");
if(LastPeriod == string::npos)
CharacterName = Recipient;
else
@@ -560,7 +558,7 @@ bool Database::SendMail(string Recipient, string From, string Subject, string Bo
CharacterName[0] = toupper(CharacterName[0]);
for(unsigned int i = 1; i < CharacterName.length(); i++)
for(unsigned int i = 1; i < CharacterName.length(); i++)
CharacterName[i] = tolower(CharacterName[i]);
CharacterID = FindCharacter(CharacterName.c_str());
@@ -579,14 +577,14 @@ bool Database::SendMail(string Recipient, string From, string Subject, string Bo
DoEscapeString(EscBody, Body.c_str(), Body.length());
const char *MailQuery="INSERT INTO `mail` (`charid`, `timestamp`, `from`, `subject`, `body`, `to`, `status`) "
"VALUES ('%i', %i, '%s', '%s', '%s', '%s', %i)";
"VALUES ('%i', %i, '%s', '%s', '%s', '%s', %i)";
uint32 LastMsgID;
int Now = time(nullptr); // time returns a 64 bit int on Windows at least, which vsnprintf doesn't like.
if(!RunQuery(query, MakeAnyLenString(&query, MailQuery, CharacterID, Now, From.c_str(), EscSubject, EscBody,
RecipientsString.c_str(), 1), errbuf, 0, 0, &LastMsgID)) {
if(!RunQuery(query, MakeAnyLenString(&query, MailQuery, CharacterID, Now, From.c_str(), EscSubject, EscBody,
RecipientsString.c_str(), 1), errbuf, 0, 0, &LastMsgID)) {
_log(UCS__ERROR, "SendMail: Query %s failed with error %s", query, errbuf);
@@ -601,7 +599,7 @@ bool Database::SendMail(string Recipient, string From, string Subject, string Bo
safe_delete_array(EscSubject);
safe_delete_array(EscBody);
safe_delete_array(query);
safe_delete_array(query);
Client *c = CL->IsCharacterOnline(CharacterName);
@@ -610,7 +608,7 @@ bool Database::SendMail(string Recipient, string From, string Subject, string Bo
c->SendNotification(c->GetMailBoxNumber(CharacterName), Subject, FQN, LastMsgID);
}
MailMessagesSent++;
return true;
@@ -624,7 +622,7 @@ void Database::SetMessageStatus(int MessageNumber, int Status) {
char *query = 0;
if(Status == 0)
RunQuery(query, MakeAnyLenString(&query, "delete from `mail` where `msgid`=%i", MessageNumber), errbuf);
RunQuery(query, MakeAnyLenString(&query, "delete from `mail` where `msgid`=%i", MessageNumber), errbuf);
else if (!RunQuery(query, MakeAnyLenString(&query, "update `mail` set `status`=%i where `msgid`=%i", Status, MessageNumber), errbuf)) {
_log(UCS__ERROR, "Error updating status %s, %s", query, errbuf);
@@ -660,9 +658,9 @@ void Database::ExpireMail() {
// Expire Trash
if(RuleI(Mail, ExpireTrash) >= 0) {
if(RunQuery(query, MakeAnyLenString(&query, "delete from `mail` where `status`=4 and `timestamp` < %i",
time(nullptr) - RuleI(Mail, ExpireTrash)), errbuf, 0, &AffectedRows)) {
_log(UCS__INIT, "Expired %i trash messages.", AffectedRows);
if(RunQuery(query, MakeAnyLenString(&query, "delete from `mail` where `status`=4 and `timestamp` < %i",
time(nullptr) - RuleI(Mail, ExpireTrash)), errbuf, 0, &AffectedRows)) {
_log(UCS__INIT, "Expired %i trash messages.", AffectedRows);
}
else {
_log(UCS__ERROR, "Error expiring trash messages, %s %s", query, errbuf);
@@ -671,9 +669,9 @@ void Database::ExpireMail() {
}
// Expire Read
if(RuleI(Mail, ExpireRead) >= 0) {
if(RunQuery(query, MakeAnyLenString(&query, "delete from `mail` where `status`=3 and `timestamp` < %i",
time(nullptr) - RuleI(Mail, ExpireRead)), errbuf, 0, &AffectedRows)) {
_log(UCS__INIT, "Expired %i read messages.", AffectedRows);
if(RunQuery(query, MakeAnyLenString(&query, "delete from `mail` where `status`=3 and `timestamp` < %i",
time(nullptr) - RuleI(Mail, ExpireRead)), errbuf, 0, &AffectedRows)) {
_log(UCS__INIT, "Expired %i read messages.", AffectedRows);
}
else {
_log(UCS__ERROR, "Error expiring read messages, %s %s", query, errbuf);
@@ -682,9 +680,9 @@ void Database::ExpireMail() {
}
// Expire Unread
if(RuleI(Mail, ExpireUnread) >= 0) {
if(RunQuery(query, MakeAnyLenString(&query, "delete from `mail` where `status`=1 and `timestamp` < %i",
time(nullptr) - RuleI(Mail, ExpireUnread)), errbuf, 0, &AffectedRows)) {
_log(UCS__INIT, "Expired %i unread messages.", AffectedRows);
if(RunQuery(query, MakeAnyLenString(&query, "delete from `mail` where `status`=1 and `timestamp` < %i",
time(nullptr) - RuleI(Mail, ExpireUnread)), errbuf, 0, &AffectedRows)) {
_log(UCS__INIT, "Expired %i unread messages.", AffectedRows);
}
else {
_log(UCS__ERROR, "Error expiring unread messages, %s %s", query, errbuf);
@@ -705,9 +703,9 @@ void Database::AddFriendOrIgnore(int CharID, int Type, string Name) {
_log(UCS__ERROR, "Error adding friend/ignore, query was %s : %s", query, errbuf);
else
_log(UCS__TRACE, "Wrote Friend/Ignore entry for charid %i, type %i, name %s to database.",
CharID, Type, Name.c_str());
CharID, Type, Name.c_str());
safe_delete_array(query);
}
@@ -722,9 +720,9 @@ void Database::RemoveFriendOrIgnore(int CharID, int Type, string Name) {
_log(UCS__ERROR, "Error removing friend/ignore, query was %s", query);
else
_log(UCS__TRACE, "Removed Friend/Ignore entry for charid %i, type %i, name %s from database.",
CharID, Type, Name.c_str());
CharID, Type, Name.c_str());
safe_delete_array(query);
}
@@ -768,3 +766,4 @@ void Database::GetFriendsAndIgnore(int CharID, vector<string> &Friends, vector<s
return;
}
+6 -7
View File
@@ -1,6 +1,4 @@
/*
EQEMu: Everquest Server Emulator
/* 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
@@ -11,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
*/
@@ -61,13 +59,14 @@ public:
void AddFriendOrIgnore(int CharID, int Type, string Name);
void RemoveFriendOrIgnore(int CharID, int Type, string Name);
void GetFriendsAndIgnore(int CharID, vector<string> &Friends, vector<string> &Ignorees);
protected:
void HandleMysqlError(uint32 errnum);
private:
void DBInitVars();
};
#endif
+15 -17
View File
@@ -1,6 +1,4 @@
/*
EQEMu: Everquest Server Emulator
/* 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
@@ -11,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
*/
@@ -39,7 +37,7 @@ volatile bool RunLoops = true;
uint32 MailMessagesSent = 0;
uint32 ChatMessagesSent = 0;
TimeoutManager timeout_manager;
TimeoutManager timeout_manager;
Clientlist *CL;
@@ -69,8 +67,8 @@ string GetMailPrefix() {
}
int main() {
RegisterExecutablePlatform(ExePlatformUCS);
set_exception_handler();
RegisterExecutablePlatform(ExePlatformUCS);
set_exception_handler();
// Check every minute for unused channels we can delete
//
@@ -134,7 +132,7 @@ int main() {
CL = new Clientlist(Config->ChatPort);
ChannelList = new ChatChannelList();
database.LoadChatChannels();
if (signal(SIGINT, CatchSignal) == SIG_ERR) {
@@ -178,13 +176,13 @@ int main() {
void UpdateWindowTitle(char* iNewTitle) {
#ifdef _WINDOWS
char tmp[500];
if (iNewTitle) {
snprintf(tmp, sizeof(tmp), "UCS: %s", iNewTitle);
}
else {
snprintf(tmp, sizeof(tmp), "UCS");
}
SetConsoleTitle(tmp);
char tmp[500];
if (iNewTitle) {
snprintf(tmp, sizeof(tmp), "UCS: %s", iNewTitle);
}
else {
snprintf(tmp, sizeof(tmp), "UCS");
}
SetConsoleTitle(tmp);
#endif
}
+4 -5
View File
@@ -1,6 +1,4 @@
/*
EQEMu: Everquest Server Emulator
/* 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
@@ -11,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
*/
@@ -27,3 +25,4 @@ ucsconfig *ucsconfig::_chat_config = nullptr;
string ucsconfig::GetByName(const string &var_name) const {
return(EQEmuConfig::GetByName(var_name));
}
+5 -6
View File
@@ -1,6 +1,4 @@
/*
EQEMu: Everquest Server Emulator
/* 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
@@ -11,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
*/
@@ -36,7 +34,7 @@ public:
// Produce a const singleton
static const ucsconfig *get() {
if (_chat_config == nullptr)
if (_chat_config == nullptr)
LoadConfig();
return(_chat_config);
}
@@ -54,3 +52,4 @@ public:
};
#endif
+24 -24
View File
@@ -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 distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
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
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
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "../common/debug.h"
#include <iostream>
@@ -59,7 +59,7 @@ void WorldServer::OnConnected()
void WorldServer::Process()
{
WorldConnection::Process();
if (!Connected())
return;
@@ -115,16 +115,16 @@ void WorldServer::Process()
break;
}
case ServerOP_UCSMailMessage:
{
ServerMailMessageHeader_Struct *mail = (ServerMailMessageHeader_Struct*)pack->pBuffer;
database.SendMail(string("SOE.EQ.") + Config->ShortName + string(".") + string(mail->to),
string(mail->from),
mail->subject,
mail->message,
string());
break;
}
case ServerOP_UCSMailMessage:
{
ServerMailMessageHeader_Struct *mail = (ServerMailMessageHeader_Struct*)pack->pBuffer;
database.SendMail(string("SOE.EQ.") + Config->ShortName + string(".") + string(mail->to),
string(mail->from),
mail->subject,
mail->message,
string());
break;
}
}
}
+12 -12
View File
@@ -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 WORLDSERVER_H
#define WORLDSERVER_H
@@ -27,7 +27,7 @@ public:
WorldServer();
virtual ~WorldServer();
virtual void Process();
private:
virtual void OnConnected();
};