if (event instanceof IChatRoomMessageEvent) {
IChatRoomMessageEvent roomEvent = (IChatRoomMessageEvent) event;
IChatRoomMessage message = roomEvent.getChatRoomMessage();
List commands = bot.getCommands();
for (int i = 0; i < commands.size(); i++) {
IChatRoomMessageHandlerEntry entry = (IChatRoomMessageHandlerEntry) commands
.get(i);
entry.handleRoomMessage(message);
}
}
}