mirror of
https://github.com/moparisthebest/Yaaic
synced 2024-11-29 12:22:21 -05:00
Added colors to some IRC events
This commit is contained in:
parent
b5c248e5c7
commit
082bc6f5bd
@ -110,6 +110,7 @@ public class IRCConnection extends PircBot
|
|||||||
|
|
||||||
Message message = new Message(sourceNick + " deoped " + recipient);
|
Message message = new Message(sourceNick + " deoped " + recipient);
|
||||||
message.setIcon(R.drawable.op);
|
message.setIcon(R.drawable.op);
|
||||||
|
message.setColor(Message.COLOR_BLUE);
|
||||||
server.getChannel(target).addMessage(message);
|
server.getChannel(target).addMessage(message);
|
||||||
|
|
||||||
Intent intent = new Intent(Broadcast.CHANNEL_MESSAGE);
|
Intent intent = new Intent(Broadcast.CHANNEL_MESSAGE);
|
||||||
@ -127,6 +128,7 @@ public class IRCConnection extends PircBot
|
|||||||
debug("DeVoice", target + " " + recipient + "(" + sourceNick + ")");
|
debug("DeVoice", target + " " + recipient + "(" + sourceNick + ")");
|
||||||
|
|
||||||
Message message = new Message(sourceNick + " devoiced " + recipient);
|
Message message = new Message(sourceNick + " devoiced " + recipient);
|
||||||
|
message.setColor(Message.COLOR_BLUE);
|
||||||
message.setIcon(R.drawable.voice);
|
message.setIcon(R.drawable.voice);
|
||||||
server.getChannel(target).addMessage(message);
|
server.getChannel(target).addMessage(message);
|
||||||
|
|
||||||
@ -172,6 +174,7 @@ public class IRCConnection extends PircBot
|
|||||||
} else {
|
} else {
|
||||||
Message message = new Message(sender + " joined");
|
Message message = new Message(sender + " joined");
|
||||||
message.setIcon(R.drawable.join);
|
message.setIcon(R.drawable.join);
|
||||||
|
message.setColor(Message.COLOR_GREEN);
|
||||||
server.getChannel(target).addMessage(message);
|
server.getChannel(target).addMessage(message);
|
||||||
|
|
||||||
Intent intent = new Intent(Broadcast.CHANNEL_MESSAGE);
|
Intent intent = new Intent(Broadcast.CHANNEL_MESSAGE);
|
||||||
@ -199,6 +202,7 @@ public class IRCConnection extends PircBot
|
|||||||
service.sendBroadcast(intent);
|
service.sendBroadcast(intent);
|
||||||
} else {
|
} else {
|
||||||
Message message = new Message(kickerNick + " kicked " + recipientNick);
|
Message message = new Message(kickerNick + " kicked " + recipientNick);
|
||||||
|
message.setColor(Message.COLOR_GREEN);
|
||||||
server.getChannel(target).addMessage(message);
|
server.getChannel(target).addMessage(message);
|
||||||
|
|
||||||
Intent intent = new Intent(Broadcast.CHANNEL_MESSAGE);
|
Intent intent = new Intent(Broadcast.CHANNEL_MESSAGE);
|
||||||
@ -275,6 +279,7 @@ public class IRCConnection extends PircBot
|
|||||||
debug("Op", target + " " + recipient + "(" + sourceNick + ")");
|
debug("Op", target + " " + recipient + "(" + sourceNick + ")");
|
||||||
|
|
||||||
Message message = new Message(sourceNick + " oped " + recipient);
|
Message message = new Message(sourceNick + " oped " + recipient);
|
||||||
|
message.setColor(Message.COLOR_BLUE);
|
||||||
message.setIcon(R.drawable.op);
|
message.setIcon(R.drawable.op);
|
||||||
server.getChannel(target).addMessage(message);
|
server.getChannel(target).addMessage(message);
|
||||||
|
|
||||||
@ -302,6 +307,7 @@ public class IRCConnection extends PircBot
|
|||||||
service.sendBroadcast(intent);
|
service.sendBroadcast(intent);
|
||||||
} else {
|
} else {
|
||||||
Message message = new Message(sender + " parted");
|
Message message = new Message(sender + " parted");
|
||||||
|
message.setColor(Message.COLOR_GREEN);
|
||||||
message.setIcon(R.drawable.part);
|
message.setIcon(R.drawable.part);
|
||||||
server.getChannel(target).addMessage(message);
|
server.getChannel(target).addMessage(message);
|
||||||
|
|
||||||
@ -342,13 +348,16 @@ public class IRCConnection extends PircBot
|
|||||||
|
|
||||||
if (changed) {
|
if (changed) {
|
||||||
Message message = new Message(setBy + " sets topic: " + topic);
|
Message message = new Message(setBy + " sets topic: " + topic);
|
||||||
|
message.setColor(Message.COLOR_YELLOW);
|
||||||
server.getChannel(target).addMessage(message);
|
server.getChannel(target).addMessage(message);
|
||||||
} else {
|
} else {
|
||||||
Message message = new Message("Topic: " + topic);
|
Message message = new Message("Topic: " + topic);
|
||||||
|
message.setColor(Message.COLOR_YELLOW);
|
||||||
server.getChannel(target).addMessage(message);
|
server.getChannel(target).addMessage(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
Intent intent = new Intent(Broadcast.CHANNEL_MESSAGE);
|
Intent intent = new Intent(Broadcast.CHANNEL_MESSAGE);
|
||||||
|
;
|
||||||
intent.putExtra(Broadcast.EXTRA_SERVER, server.getId());
|
intent.putExtra(Broadcast.EXTRA_SERVER, server.getId());
|
||||||
intent.putExtra(Broadcast.EXTRA_CHANNEL, target);
|
intent.putExtra(Broadcast.EXTRA_CHANNEL, target);
|
||||||
service.sendBroadcast(intent);
|
service.sendBroadcast(intent);
|
||||||
@ -375,6 +384,7 @@ public class IRCConnection extends PircBot
|
|||||||
|
|
||||||
Message message = new Message(sourceNick + " voiced " + recipient);
|
Message message = new Message(sourceNick + " voiced " + recipient);
|
||||||
message.setIcon(R.drawable.voice);
|
message.setIcon(R.drawable.voice);
|
||||||
|
message.setColor(Message.COLOR_BLUE);
|
||||||
server.getChannel(target).addMessage(message);
|
server.getChannel(target).addMessage(message);
|
||||||
|
|
||||||
Intent intent = new Intent(Broadcast.CHANNEL_MESSAGE);
|
Intent intent = new Intent(Broadcast.CHANNEL_MESSAGE);
|
||||||
|
Loading…
Reference in New Issue
Block a user