mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 18:36:31 +01:00
Core/Channels: Do not allow creation of channels starting with digits
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
#include "ChannelMgr.h"
|
||||
#include "Player.h"
|
||||
|
||||
#include <cctype>
|
||||
|
||||
void WorldSession::HandleJoinChannel(WorldPacket& recvPacket)
|
||||
{
|
||||
uint32 channelId;
|
||||
@@ -45,6 +47,9 @@ void WorldSession::HandleJoinChannel(WorldPacket& recvPacket)
|
||||
if (channelName.empty())
|
||||
return;
|
||||
|
||||
if (isdigit(channelName[0]))
|
||||
return;
|
||||
|
||||
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeam()))
|
||||
{
|
||||
cMgr->setTeam(GetPlayer()->GetTeam());
|
||||
|
||||
Reference in New Issue
Block a user