Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'applications/kosmos/bundles/org.eclipse.ecf.presence.bot.kosmos/src/org/eclipse/ecf/internal/presence/bot/kosmos')
-rw-r--r--applications/kosmos/bundles/org.eclipse.ecf.presence.bot.kosmos/src/org/eclipse/ecf/internal/presence/bot/kosmos/ChatRoomMessageHandler.java48
1 files changed, 28 insertions, 20 deletions
diff --git a/applications/kosmos/bundles/org.eclipse.ecf.presence.bot.kosmos/src/org/eclipse/ecf/internal/presence/bot/kosmos/ChatRoomMessageHandler.java b/applications/kosmos/bundles/org.eclipse.ecf.presence.bot.kosmos/src/org/eclipse/ecf/internal/presence/bot/kosmos/ChatRoomMessageHandler.java
index 9e73c8d14..bd5efcb61 100644
--- a/applications/kosmos/bundles/org.eclipse.ecf.presence.bot.kosmos/src/org/eclipse/ecf/internal/presence/bot/kosmos/ChatRoomMessageHandler.java
+++ b/applications/kosmos/bundles/org.eclipse.ecf.presence.bot.kosmos/src/org/eclipse/ecf/internal/presence/bot/kosmos/ChatRoomMessageHandler.java
@@ -782,26 +782,34 @@ public class ChatRoomMessageHandler implements IChatRoomMessageHandler {
}
String msg = message.getMessage();
- String upperCase = msg.toUpperCase();
- if (upperCase.startsWith("KOS-MOS:") || upperCase.startsWith("KOS-MOS,")) {
- msg = upperCase.substring(8).trim();
- switch (msg.charAt(0)) {
- case '~':
- case '!':
- handleMessage(fromID, message.getChatRoomID(), msg
- .substring(1).trim());
- break;
- }
- } else {
- String[] split = msg.split("\\s"); //$NON-NLS-1$
- for (int i = 0; i < split.length; i++) {
- if (split[i].length() > 0) {
- switch (split[i].charAt(0)) {
- case '~':
- case '!':
- handleMessage(fromID, message
- .getChatRoomID(), split[i].substring(1).trim());
- break;
+ switch (msg.charAt(0)) {
+ case '~':
+ case '!':
+ handleMessage(fromID, message.getChatRoomID(), msg
+ .substring(1).trim());
+ break;
+ default:
+ String upperCase = msg.toUpperCase();
+ if (upperCase.startsWith("KOS-MOS:") || upperCase.startsWith("KOS-MOS,")) {
+ msg = upperCase.substring(8).trim();
+ switch (msg.charAt(0)) {
+ case '~':
+ case '!':
+ handleMessage(fromID, message.getChatRoomID(), msg
+ .substring(1).trim());
+ break;
+ }
+ } else {
+ String[] split = msg.split("\\s"); //$NON-NLS-1$
+ for (int i = 0; i < split.length; i++) {
+ if (split[i].length() > 0) {
+ switch (split[i].charAt(0)) {
+ case '~':
+ case '!':
+ handleMessage(fromID, message
+ .getChatRoomID(), split[i].substring(1).trim());
+ break;
+ }
}
}
}

Back to the top