use of org.eclipse.ecf.presence.im.IChatMessageEvent in project ecf by eclipse.
the class IMBot method handleMessageEvent.
public void handleMessageEvent(IIMMessageEvent event) {
if (event instanceof IChatMessageEvent) {
IChatMessageEvent imEvent = (IChatMessageEvent) event;
IChatMessage message = imEvent.getChatMessage();
List commands = bot.getCommands();
for (int i = 0; i < commands.size(); i++) {
IIMMessageHandlerEntry entry = (IIMMessageHandlerEntry) commands.get(i);
entry.handleIMMessage(message);
}
}
}
Aggregations