1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-08-13 16:53:50 -04:00

Handle "external" actions (/me) in queries

This commit is contained in:
Sebastian Kaspari 2010-03-10 21:40:49 +01:00
parent 09cb4af8f3
commit 2f97adaf30

View File

@ -85,12 +85,18 @@ public class IRCConnection extends PircBot
protected void onAction(String sender, String login, String hostname, String target, String action)
{
debug("Action", target + " " + sender + " " + action);
// Strip mIRC colors and formatting
action = Colors.removeFormattingAndColors(action);
if (target.equals(this.getNick())) {
// We are the target - this is an action in a query
target = sender;
}
Message message = new Message(sender + " " + action);
message.setIcon(R.drawable.action);
server.getConversation(target).addMessage(message);
Intent intent = new Intent(Broadcast.CHANNEL_MESSAGE);