BuildPlayerChat alternative

Hello I have this

if (GetTeam() == pPlayer->GetTeam())
BuildPlayerChat(&data, msgtype, message, LANG_UNIVERSAL);
else if (msgtype != CHAT_MSG_EMOTE)
BuildPlayerChat(&data, msgtype, message, pPlayer->GetTeam() == ALLIANCE ? LANG_ORCISH : LANG_COMMON);

How can I reapair it? I saw BuildPlayerChat doesnt exist is there any alternatives?

http://emudevs.com/showthread.php/2159-CFBG-Rev-27-BuildPlayerChat-Error?p=14581&viewfull=1#post14581