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

This commit is contained in:
DDuarte committed 2014-07-29 15:03:25 +01:00
1 parent e8a261e3cc
commit 09a10f2872
1 file changed
+5
@@ -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());