Expose announced channel types characters.

fix-message-formatting
Danny van Heumen 12 years ago
parent 484810dcc6
commit 60f6023bf4

@ -1067,11 +1067,8 @@ public void fireLocalUserRoleChangedEvent(
*/
public boolean isPrivate()
{
// TODO Since we cannot change the chat room name/identifier maybe we
// should compute this upon construction and save the result, instead of
// doing a string operation every time the method is called.
return !this.chatRoomName.startsWith("#")
&& !this.chatRoomName.startsWith("&");
return !this.parentProvider.getIrcStack().getChannelTypes()
.contains(this.chatRoomName.charAt(0));
}
/**

@ -318,6 +318,18 @@ public void dispose()
{
disconnect();
}
/**
* Get a set of channel type indicators.
*
* @return returns set of channel type indicators.
*/
public Set<Character> getChannelTypes()
{
if (!isConnected())
throw new IllegalStateException("not connected to IRC server");
return this.connectionState.getServerOptions().getChanTypes();
}
/**
* Get the nick name of the user.

Loading…
Cancel
Save