Replaced '== false' with negation.

fix-message-formatting
Danny van Heumen 12 years ago
parent c6387528f5
commit d94d32244c

@ -1031,7 +1031,7 @@ 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("#") == false;
return !this.chatRoomName.startsWith("#");
}
/**
@ -1289,7 +1289,7 @@ public void setMembersWhiteList(List<String> members)
public void updateSubject(String subject)
{
if (this.chatSubject.equals(subject) == false)
if (!this.chatSubject.equals(subject))
{
this.chatSubject = subject;
ChatRoomPropertyChangeEvent topicChangeEvent =

@ -304,7 +304,7 @@ public void setUserNickname(String nick)
*/
public void setSubject(ChatRoomIrcImpl chatroom, String subject)
{
if (isConnected() == false)
if (!isConnected())
throw new IllegalStateException(
"Please connect to an IRC server first.");
if (chatroom == null)
@ -389,7 +389,7 @@ public void join(ChatRoomIrcImpl chatroom) throws OperationFailedException
public void join(final ChatRoomIrcImpl chatroom, final String password)
throws OperationFailedException
{
if (isConnected() == false)
if (!isConnected())
throw new IllegalStateException(
"Please connect to an IRC server first");
if (chatroom == null)
@ -430,8 +430,8 @@ public void onSuccess(IRCChannel channel)
{
try
{
if (channel.getName().equals(
actualChatRoom.getIdentifier()) == false)
if (!channel.getName().equals(
actualChatRoom.getIdentifier()))
{
// If the channel name is not the
// original chat room name, then we have
@ -601,12 +601,12 @@ public void onFailure(Exception e)
*/
public void leave(ChatRoomIrcImpl chatroom)
{
if (chatroom.isPrivate() == false)
{
// You only actually join non-private chat rooms, so only these ones
// need to be left.
leave(chatroom.getIdentifier());
}
if (chatroom.isPrivate())
return;
// You only actually join non-private chat rooms, so only these ones
// need to be left.
leave(chatroom.getIdentifier());
}
/**
@ -653,6 +653,7 @@ public void invite(String memberId, ChatRoomIrcImpl chatroom)
/**
* Send a command to the IRC server.
*
* @param chatroom the chat room
* @param command the command message
*/
@ -850,7 +851,7 @@ private ChatRoomListener(ChatRoomIrcImpl chatroom)
@Override
public void onTopicChange(TopicMessage msg)
{
if (isThisChatRoom(msg.getChannelName()) == false)
if (!isThisChatRoom(msg.getChannelName()))
return;
this.chatroom.updateSubject(msg.getTopic().getValue());
@ -862,7 +863,7 @@ public void onTopicChange(TopicMessage msg)
@Override
public void onChannelMode(ChannelModeMessage msg)
{
if (isThisChatRoom(msg.getChannelName()) == false)
if (!isThisChatRoom(msg.getChannelName()))
return;
processModeMessage(msg);
@ -874,7 +875,7 @@ public void onChannelMode(ChannelModeMessage msg)
@Override
public void onChannelJoin(ChanJoinMessage msg)
{
if (isThisChatRoom(msg.getChannelName()) == false)
if (!isThisChatRoom(msg.getChannelName()))
return;
if (isMe(msg.getSource()))
@ -898,7 +899,7 @@ public void onChannelJoin(ChanJoinMessage msg)
@Override
public void onChannelPart(ChanPartMessage msg)
{
if (isThisChatRoom(msg.getChannelName()) == false)
if (!isThisChatRoom(msg.getChannelName()))
return;
if (isMe(msg.getSource()))
@ -936,7 +937,7 @@ public void onChannelPart(ChanPartMessage msg)
@Override
public void onChannelKick(ChannelKick msg)
{
if (isThisChatRoom(msg.getChannelName()) == false)
if (!isThisChatRoom(msg.getChannelName()))
return;
String kickedUser = msg.getKickedNickname();
@ -1016,7 +1017,7 @@ public void onNickChange(NickMessage msg)
@Override
public void onChannelMessage(ChannelPrivMsg msg)
{
if (isThisChatRoom(msg.getChannelName()) == false)
if (!isThisChatRoom(msg.getChannelName()))
return;
// TODO handle special formatting/color control codes in message

Loading…
Cancel
Save