Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2007-09-07 01:44:34 -0400
committerslewis2007-09-07 01:44:34 -0400
commiteeb8f86ffac9633336d76cafecd9b5304346c5b0 (patch)
tree4e548159e630564f088e9bac1491cf9211cdffda
parented63862f6a7951fe95c1092e99f10b928f1226f2 (diff)
downloadorg.eclipse.ecf-eeb8f86ffac9633336d76cafecd9b5304346c5b0.tar.gz
org.eclipse.ecf-eeb8f86ffac9633336d76cafecd9b5304346c5b0.tar.xz
org.eclipse.ecf-eeb8f86ffac9633336d76cafecd9b5304346c5b0.zip
Additions to address bug 197332
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.irc/src/org/eclipse/ecf/internal/provider/irc/container/IRCChannelContainer.java17
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.irc/src/org/eclipse/ecf/internal/provider/irc/container/IRCRootContainer.java13
2 files changed, 30 insertions, 0 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.irc/src/org/eclipse/ecf/internal/provider/irc/container/IRCChannelContainer.java b/providers/bundles/org.eclipse.ecf.provider.irc/src/org/eclipse/ecf/internal/provider/irc/container/IRCChannelContainer.java
index 3c2b59232..1ed4706a5 100644
--- a/providers/bundles/org.eclipse.ecf.provider.irc/src/org/eclipse/ecf/internal/provider/irc/container/IRCChannelContainer.java
+++ b/providers/bundles/org.eclipse.ecf.provider.irc/src/org/eclipse/ecf/internal/provider/irc/container/IRCChannelContainer.java
@@ -43,6 +43,8 @@ public class IRCChannelContainer extends IRCAbstractContainer implements IChatMe
protected Vector channelParticipants = new Vector();
+ protected IChatRoomAdminSender adminSender = null;
+
protected IChatRoomMessageSender sender = new IChatRoomMessageSender() {
public void sendMessage(String message) throws ECFException {
rootContainer.doSendChannelMessage(targetID.getName(), ircUser.toString(), message);
@@ -301,4 +303,19 @@ public class IRCChannelContainer extends IRCAbstractContainer implements IChatMe
return (ID[]) channelParticipants.toArray(new ID[channelParticipants.size()]);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.ecf.presence.chatroom.IChatRoomContainer#getChatRoomAdminSender()
+ */
+ public IChatRoomAdminSender getChatRoomAdminSender() {
+ synchronized (this) {
+ if (adminSender == null) {
+ adminSender = new IChatRoomAdminSender() {
+ public void sendSubjectChange(String newsubject) throws ECFException {
+ rootContainer.doSendSubjectChangeMessage(targetID.getName(), newsubject);
+ }
+ };
+ }
+ }
+ return adminSender;
+ }
}
diff --git a/providers/bundles/org.eclipse.ecf.provider.irc/src/org/eclipse/ecf/internal/provider/irc/container/IRCRootContainer.java b/providers/bundles/org.eclipse.ecf.provider.irc/src/org/eclipse/ecf/internal/provider/irc/container/IRCRootContainer.java
index eaf51f3b4..608d9ac8b 100644
--- a/providers/bundles/org.eclipse.ecf.provider.irc/src/org/eclipse/ecf/internal/provider/irc/container/IRCRootContainer.java
+++ b/providers/bundles/org.eclipse.ecf.provider.irc/src/org/eclipse/ecf/internal/provider/irc/container/IRCRootContainer.java
@@ -825,6 +825,12 @@ public class IRCRootContainer extends IRCAbstractContainer implements IContainer
}
}
+ protected void doSendSubjectChangeMessage(String channelName, String topic) throws ECFException {
+ if (connection == null)
+ throw new ECFException(Messages.IRCRootContainer_Exception_Unexplained_Disconnect);
+ connection.doTopic(channelName, topic);
+ }
+
protected void addChannel(String channel, IRCChannelContainer container) {
channels.put(channel, container);
}
@@ -942,4 +948,11 @@ public class IRCRootContainer extends IRCAbstractContainer implements IContainer
return new ID[0];
}
+ /* (non-Javadoc)
+ * @see org.eclipse.ecf.presence.chatroom.IChatRoomContainer#getChatRoomAdminSender()
+ */
+ public IChatRoomAdminSender getChatRoomAdminSender() {
+ return null;
+ }
+
}

Back to the top