ChatHandler in handling > channel > handler .
PHP Code:
public static final void GeneralChat(final String text, final byte unk, final MapleClient c, final MapleCharacter chr) {
if (text.length() > 0 && chr != null && chr.getMap() != null && !CommandProcessor.processCommand(c, text, chr.getBattle() == null ? CommandType.NORMAL : CommandType.POKEMON)) {
if (!chr.isIntern() && text.length() >= 80) {
return;
}
if (chr.getCanTalk() || chr.isStaff()) {
//Note: This patch is needed to prevent chat packet from being broadcast to people who might be packet sniffing.
if (chr.isHidden()) {
if (chr.isIntern() && !chr.isSuperGM() && unk == 0) {
chr.getMap().broadcastGMMessage(chr, CField.getChatText(chr.getId(), text, false, (byte) 1), true);
if (unk == 0) {
chr.getMap().broadcastGMMessage(chr, CWvsContext.serverNotice(2, chr.getName() + " : " + text), true);
}
} else {
chr.getMap().broadcastGMMessage(chr, CField.getChatText(chr.getId(), text, c.getPlayer().isSuperGM(), unk), true);
}
} else {
chr.getCheatTracker().checkMsg();
if (chr.isIntern() && !chr.isSuperGM() && unk == 0) {
chr.getMap().broadcastMessage(CField.getChatText(chr.getId(), text, false, (byte) 1), c.getPlayer().getTruePosition());
if (unk == 0) {
chr.getMap().broadcastMessage(CWvsContext.serverNotice(2, chr.getName() + " : " + text), c.getPlayer().getTruePosition());
}
} else {
chr.getMap().broadcastMessage(CField.getChatText(chr.getId(), text, c.getPlayer().isSuperGM(), unk), c.getPlayer().getTruePosition());
}
}
if (text.equalsIgnoreCase(c.getChannelServer().getServerName() + " rocks")) {
chr.finishAchievement(11);
}
} else {
c.getSession().write(CWvsContext.serverNotice(6, "You have been muted and are therefore unable to talk."));
}
}
}