aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/java')
-rw-r--r--src/net/java/sip/communicator/impl/protocol/irc/ChannelManager.java2
-rw-r--r--src/net/java/sip/communicator/impl/protocol/irc/MessageIrcImpl.java39
-rw-r--r--src/net/java/sip/communicator/impl/protocol/irc/MessageManager.java2
-rw-r--r--src/net/java/sip/communicator/impl/protocol/irc/Utils.java12
4 files changed, 5 insertions, 50 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/irc/ChannelManager.java b/src/net/java/sip/communicator/impl/protocol/irc/ChannelManager.java
index f8a6a58..95b54d5 100644
--- a/src/net/java/sip/communicator/impl/protocol/irc/ChannelManager.java
+++ b/src/net/java/sip/communicator/impl/protocol/irc/ChannelManager.java
@@ -1142,7 +1142,7 @@ public class ChannelManager
this.chatroom, userNick, msg.getSource().getIdent(), msg
.getSource().getHostname(), ChatRoomMemberRole.MEMBER);
MessageIrcImpl message =
- MessageIrcImpl.newActionFromIRC(member, msg.getText());
+ MessageIrcImpl.newActionFromIRC(msg.getText());
this.chatroom.fireMessageReceivedEvent(message, member, new Date(),
ChatRoomMessageReceivedEvent.CONVERSATION_MESSAGE_RECEIVED);
}
diff --git a/src/net/java/sip/communicator/impl/protocol/irc/MessageIrcImpl.java b/src/net/java/sip/communicator/impl/protocol/irc/MessageIrcImpl.java
index 90a70ff..8a405aa 100644
--- a/src/net/java/sip/communicator/impl/protocol/irc/MessageIrcImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/irc/MessageIrcImpl.java
@@ -99,49 +99,16 @@ public class MessageIrcImpl
}
/**
- * Create a new instance from an IRC text and parse the IRC message. (See
- * {@link #newMessageFromIRC(String)}.)
- *
- * @param user the originating user
- * @param message the IRC action message
- * @return returns a new message instance
- */
- public static MessageIrcImpl newActionFromIRC(
- final ChatRoomMemberIrcImpl user, final String message)
- {
- return newActionFromIRC(user.getContactAddress(), message);
- }
-
- /**
- * Create a new instance from an IRC text and parse the IRC message. (See
- * {@link #newMessageFromIRC(String)}.)
- *
- * @param user the originating user
- * @param message the IRC action message
- * @return returns a new message instance
- */
- public static MessageIrcImpl newActionFromIRC(final Contact user,
- final String message)
- {
- return newActionFromIRC(user.getAddress(), message);
- }
-
- /**
* Construct the new action message.
*
- * @param user the originating user
* @param message the IRC action message
* @return returns a new message instance
*/
- private static MessageIrcImpl newActionFromIRC(final String user,
- final String message)
+ public static MessageIrcImpl newActionFromIRC(final String message)
{
String text = Utils.parseIrcMessage(message);
- // TODO consider returning message starting with "/me " and let Jitsi do
- // the /me formatting.
- text = Utils.styleAsAction(text, user);
- return new MessageIrcImpl(text, HTML_MIME_TYPE, DEFAULT_MIME_ENCODING,
- null);
+ return new MessageIrcImpl("/me " + text, HTML_MIME_TYPE,
+ DEFAULT_MIME_ENCODING, null);
}
/**
diff --git a/src/net/java/sip/communicator/impl/protocol/irc/MessageManager.java b/src/net/java/sip/communicator/impl/protocol/irc/MessageManager.java
index f759eb8..249aab8 100644
--- a/src/net/java/sip/communicator/impl/protocol/irc/MessageManager.java
+++ b/src/net/java/sip/communicator/impl/protocol/irc/MessageManager.java
@@ -424,7 +424,7 @@ public class MessageManager
MessageManager.this.provider.getPersistentPresence()
.findContactByID(user);
final MessageIrcImpl message =
- MessageIrcImpl.newActionFromIRC(from, msg.getText());
+ MessageIrcImpl.newActionFromIRC(msg.getText());
MessageManager.this.provider.getBasicInstantMessaging()
.fireMessageReceived(message, from);
}
diff --git a/src/net/java/sip/communicator/impl/protocol/irc/Utils.java b/src/net/java/sip/communicator/impl/protocol/irc/Utils.java
index 05f86b7..d749a90 100644
--- a/src/net/java/sip/communicator/impl/protocol/irc/Utils.java
+++ b/src/net/java/sip/communicator/impl/protocol/irc/Utils.java
@@ -212,18 +212,6 @@ public final class Utils
}
/**
- * Format message as HTML-formatted action.
- *
- * @param message original IRC message
- * @param user user nick name
- * @return returns HTML-formatted action
- */
- public static String styleAsAction(final String message, final String user)
- {
- return "<b>*" + user + "</b> " + message;
- }
-
- /**
* Format message as HTML-formatted away message.
*
* @param text away message