void Character::BotLang(std::string message, bool echo) { message = util::text_cap(message, static_cast<int>(this->world->config["ChatMaxWidth"]) - util::text_width(util::ucfirst(this->name) + " ")); PacketBuilder b(PACKET_TALK, PACKET_PLAYER); b.AddShort(0); b.AddString(message); UTIL_PTR_LIST_FOREACH(this->map->characters, Character, ch) { if ((!echo && *ch == this) || !this->InRange(*ch)) { continue; } ch->player->clientSendBuilder(b); } }