ChatChannel* channel = NULL;
if((channel = g_chat.getChannel(player, CHANNEL_DEFAULT)))
{
s << "Guild member " << player->getName() << " was killed by " << killers << ".";
if(score)
s << " The new score is " << war.frags[war.type == WAR_GUILD] << ":"
<< war.frags[war.type] << " frags (limit " << war.limit << ").";
channel->talk("", SPEAK_CHANNEL_RA, s.str());
}
s.str("");
if((channel = g_chat.getChannel(list[0].getKillerCreature()->getPlayer(), CHANNEL_DEFAULT)))
{
s << "Opponent " << player->getName() << " was killed by " << killers << ".";
if(score)
s << " The new score is " << war.frags[war.type] << ":"
<< war.frags[war.type == WAR_GUILD] << " frags (limit " << war.limit << ").";
channel->talk("", SPEAK_CHANNEL_RA, s.str());
}
Database* db = Database::getInstance();
DBQuery query;
query << "INSERT INTO `guild_kills` (`guild_id`, `war_id`, `death_id`) VALUES ("
<< war.ids[war.type] << ", " << war.war << ", " << deathId << ");";
db->query(query.str());
}
#endif