AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
CalendarHandler.cpp File Reference
#include "ArenaTeamMgr.h"
#include "CalendarMgr.h"
#include "DatabaseEnv.h"
#include "DisableMgr.h"
#include "GameEventMgr.h"
#include "GameTime.h"
#include "GuildMgr.h"
#include "InstanceSaveMgr.h"
#include "Log.h"
#include "ObjectAccessor.h"
#include "Opcodes.h"
#include "Player.h"
#include "SocialMgr.h"
#include "WorldSession.h"
#include <utf8.h>

Go to the source code of this file.

Functions

bool validUtf8String (WorldPacket &recvData, std::string &s, std::string action, ObjectGuid playerGUID)
 

Function Documentation

◆ validUtf8String()

bool validUtf8String ( WorldPacket recvData,
std::string &  s,
std::string  action,
ObjectGuid  playerGUID 
)
228{
229 if (!utf8::is_valid(s.begin(), s.end()))
230 {
231 LOG_INFO("network.opcode", "CalendarHandler: Player ({}) attempt to {} an event with invalid name or description (packet modification)",
232 playerGUID.ToString(), action);
233 recvData.rfinish();
234 return false;
235 }
236 return true;
237}
#define LOG_INFO(filterType__,...)
Definition: Log.h:165
std::string ToString() const
Definition: ObjectGuid.cpp:47
void rfinish()
Definition: ByteBuffer.h:325

References LOG_INFO, ByteBuffer::rfinish(), and ObjectGuid::ToString().

Referenced by WorldSession::HandleCalendarAddEvent(), and WorldSession::HandleCalendarUpdateEvent().