Core/Channels: Do not allow creation of channels starting with digits

This commit is contained in:
DDuarte
2014-07-29 14:59:17 +01:00
parent e8a261e3cc
commit 09a10f2872

View File

@@ -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());