mirror of
https://github.com/moparisthebest/Yaaic
synced 2024-11-26 02:42:16 -05:00
Handle "external" actions (/me) in queries
This commit is contained in:
parent
09cb4af8f3
commit
2f97adaf30
@ -85,12 +85,18 @@ public class IRCConnection extends PircBot
|
|||||||
protected void onAction(String sender, String login, String hostname, String target, String action)
|
protected void onAction(String sender, String login, String hostname, String target, String action)
|
||||||
{
|
{
|
||||||
debug("Action", target + " " + sender + " " + action);
|
debug("Action", target + " " + sender + " " + action);
|
||||||
|
|
||||||
// Strip mIRC colors and formatting
|
// Strip mIRC colors and formatting
|
||||||
action = Colors.removeFormattingAndColors(action);
|
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 message = new Message(sender + " " + action);
|
||||||
message.setIcon(R.drawable.action);
|
message.setIcon(R.drawable.action);
|
||||||
|
|
||||||
server.getConversation(target).addMessage(message);
|
server.getConversation(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