From ce41cf9cd5b7d9091b9aec243b96ff463f753160 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 10 Jun 2019 00:29:24 -0500 Subject: [PATCH] Load mail_opcodes.conf dynamically --- ucs/clientlist.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ucs/clientlist.cpp b/ucs/clientlist.cpp index ab058438c..e65638563 100644 --- a/ucs/clientlist.cpp +++ b/ucs/clientlist.cpp @@ -22,6 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #include "../common/eqemu_logsys.h" #include "../common/misc_functions.h" +#include "ucsconfig.h" #include "clientlist.h" #include "database.h" #include "chatchannel.h" @@ -479,7 +480,10 @@ Clientlist::Clientlist(int ChatPort) { ChatOpMgr = new RegularOpcodeManager; - if (!ChatOpMgr->LoadOpcodes(Config->MailOpCodesFile)) + const ucsconfig *Config = ucsconfig::get(); + + Log(Logs::General, Logs::UCS_Server, "Loading '%s'", Config->MailOpCodesFile.c_str()); + if (!ChatOpMgr->LoadOpcodes(Config->MailOpCodesFile.c_str())) exit(1); chatsf->OnNewConnection([this](std::shared_ptr stream) {