mirror of
https://github.com/moparisthebest/Yaaic
synced 2024-11-22 17:02:21 -05:00
Disable posting non-commands on the ServerInfo view
This commit is contained in:
parent
66d3b2682b
commit
46f5d1d008
@ -364,10 +364,17 @@ public class ConversationActivity extends Activity implements ServiceConnection,
|
||||
|
||||
if (conversation != null) {
|
||||
if (!text.trim().startsWith("/")) {
|
||||
if (conversation.getType() != Conversation.TYPE_SERVER) {
|
||||
String nickname = this.binder.getService().getConnection(serverId).getNick();
|
||||
conversation.addMessage(new Message("<" + nickname + "> " + text));
|
||||
onConversationMessage(conversation.getName());
|
||||
this.binder.getService().getConnection(serverId).sendMessage(conversation.getName(), text);
|
||||
} else {
|
||||
Message message = new Message("You can only chat from within a channel or a query");
|
||||
message.setColor(Message.COLOR_YELLOW);
|
||||
message.setIcon(R.drawable.warning);
|
||||
conversation.addMessage(message);
|
||||
}
|
||||
onConversationMessage(conversation.getName());
|
||||
} else {
|
||||
CommandParser.getInstance().parse(text, server, conversation, binder.getService());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user