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

highlight message (red) if current nickname is used

This commit is contained in:
Sebastian Kaspari 2010-03-20 19:36:41 +01:00
parent b94f7cc789
commit 9b6f97844a

View File

@ -161,6 +161,11 @@ public class IRCConnection extends PircBot
Message message = new Message(sender + " " + action);
message.setIcon(R.drawable.action);
if (action.contains(getNick())) {
// highlight
message.setColor(Message.COLOR_RED);
}
if (target.equals(this.getNick())) {
// We are the target - this is an action in a query
Conversation conversation = server.getConversation(sender);
@ -336,6 +341,12 @@ public class IRCConnection extends PircBot
text = Colors.removeFormattingAndColors(text);
Message message = new Message("<" + sender + "> " + text);
if (text.contains(getNick())) {
// highlight
message.setColor(Message.COLOR_RED);
}
server.getConversation(target).addMessage(message);
Intent intent = new Intent(Broadcast.CONVERSATION_MESSAGE);
@ -473,6 +484,10 @@ public class IRCConnection extends PircBot
Message message = new Message("<" + sender + "> " + text);
if (text.contains(getNick())) {
message.setColor(Message.COLOR_RED);
}
Conversation conversation = server.getConversation(sender);
if (conversation == null) {