From 082bc6f5bda5d1996657c5f8b6672458108898eb Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Sat, 6 Mar 2010 20:58:53 +0100 Subject: [PATCH] Added colors to some IRC events --- src/org/yaaic/irc/IRCConnection.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/org/yaaic/irc/IRCConnection.java b/src/org/yaaic/irc/IRCConnection.java index f2dfa85..6782ba5 100644 --- a/src/org/yaaic/irc/IRCConnection.java +++ b/src/org/yaaic/irc/IRCConnection.java @@ -110,6 +110,7 @@ public class IRCConnection extends PircBot Message message = new Message(sourceNick + " deoped " + recipient); message.setIcon(R.drawable.op); + message.setColor(Message.COLOR_BLUE); server.getChannel(target).addMessage(message); Intent intent = new Intent(Broadcast.CHANNEL_MESSAGE); @@ -127,6 +128,7 @@ public class IRCConnection extends PircBot debug("DeVoice", target + " " + recipient + "(" + sourceNick + ")"); Message message = new Message(sourceNick + " devoiced " + recipient); + message.setColor(Message.COLOR_BLUE); message.setIcon(R.drawable.voice); server.getChannel(target).addMessage(message); @@ -172,6 +174,7 @@ public class IRCConnection extends PircBot } else { Message message = new Message(sender + " joined"); message.setIcon(R.drawable.join); + message.setColor(Message.COLOR_GREEN); server.getChannel(target).addMessage(message); Intent intent = new Intent(Broadcast.CHANNEL_MESSAGE); @@ -199,6 +202,7 @@ public class IRCConnection extends PircBot service.sendBroadcast(intent); } else { Message message = new Message(kickerNick + " kicked " + recipientNick); + message.setColor(Message.COLOR_GREEN); server.getChannel(target).addMessage(message); Intent intent = new Intent(Broadcast.CHANNEL_MESSAGE); @@ -275,6 +279,7 @@ public class IRCConnection extends PircBot debug("Op", target + " " + recipient + "(" + sourceNick + ")"); Message message = new Message(sourceNick + " oped " + recipient); + message.setColor(Message.COLOR_BLUE); message.setIcon(R.drawable.op); server.getChannel(target).addMessage(message); @@ -302,6 +307,7 @@ public class IRCConnection extends PircBot service.sendBroadcast(intent); } else { Message message = new Message(sender + " parted"); + message.setColor(Message.COLOR_GREEN); message.setIcon(R.drawable.part); server.getChannel(target).addMessage(message); @@ -342,13 +348,16 @@ public class IRCConnection extends PircBot if (changed) { Message message = new Message(setBy + " sets topic: " + topic); + message.setColor(Message.COLOR_YELLOW); server.getChannel(target).addMessage(message); } else { Message message = new Message("Topic: " + topic); + message.setColor(Message.COLOR_YELLOW); server.getChannel(target).addMessage(message); } Intent intent = new Intent(Broadcast.CHANNEL_MESSAGE); +; intent.putExtra(Broadcast.EXTRA_SERVER, server.getId()); intent.putExtra(Broadcast.EXTRA_CHANNEL, target); service.sendBroadcast(intent); @@ -375,6 +384,7 @@ public class IRCConnection extends PircBot Message message = new Message(sourceNick + " voiced " + recipient); message.setIcon(R.drawable.voice); + message.setColor(Message.COLOR_BLUE); server.getChannel(target).addMessage(message); Intent intent = new Intent(Broadcast.CHANNEL_MESSAGE);