1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-22 17:02:21 -05:00

Send unknown commands to the server

This commit is contained in:
Sebastian Kaspari 2010-03-18 00:14:29 +01:00
parent 1b2461f8fe
commit ffaba5e25d

View File

@ -151,15 +151,22 @@ public class CommandParser
}
} else {
// Unknown command
if (conversation != null) {
Message message = new Message("Unknown command: " + type);
message.setColor(Message.COLOR_RED);
conversation.addMessage(message);
Intent intent = new Intent(Broadcast.CONVERSATION_MESSAGE);
intent.putExtra(Broadcast.EXTRA_SERVER, server.getId());
intent.putExtra(Broadcast.EXTRA_CONVERSATION, conversation.getName());
service.sendBroadcast(intent);
if (params.length > 1) {
// Send command to server
service.getConnection(server.getId()).sendRawLineViaQueue(
params[0].toUpperCase() + " " + BaseHandler.mergeParams(params)
);
} else {
if (conversation != null) {
Message message = new Message("Unknown command: " + type);
message.setColor(Message.COLOR_RED);
conversation.addMessage(message);
Intent intent = new Intent(Broadcast.CONVERSATION_MESSAGE);
intent.putExtra(Broadcast.EXTRA_SERVER, server.getId());
intent.putExtra(Broadcast.EXTRA_CONVERSATION, conversation.getName());
service.sendBroadcast(intent);
}
}
}
}