public boolean handleCommand(L2PcInstance activeChar, String command) {
String cmd = command.substring(4);
String params = "";
if (cmd.contains(" ")) {
params = cmd.substring(cmd.indexOf(" ") + 1);
cmd = cmd.substring(0, cmd.indexOf(" "));
}
IBBSHandler handler = this.getHandler(cmd);
if (handler != null) {
String result = handler.handleCommand(activeChar, cmd, params);
if (result == null) {
[B][COLOR=rgb(226, 80, 65)] activeChar.sendPacket(new HideBoard());[/COLOR][/B]
return true;
} else {
if (result.endsWith(".htm")) {
result = HtmCache.getInstance().getHtm("data/html/CommunityBoard/" + result, activeChar);
if (result == null) {
activeChar.sendPacket(new HideBoard());
return true;
}
}
Pattern p = Pattern.compile("bypass +-h");
Matcher m = p.matcher(result);
if (m.find()) {
result = m.replaceAll("bypass");
}
separateAndSend(result, activeChar);
return true;
}
} else {
return false;
}
}