diff --git a/[gameplay]/joinquit/joinquit.lua b/[gameplay]/joinquit/joinquit.lua index f88409c53..11b7605f3 100644 --- a/[gameplay]/joinquit/joinquit.lua +++ b/[gameplay]/joinquit/joinquit.lua @@ -47,21 +47,21 @@ end addEventHandler("onPlayerJoin", root, joinMessage) function nickChangeMessage(oldNick, newNick) -    if wasEventCancelled() then -        return -    end + if wasEventCancelled() then + return + end -    if isPlayerMuted(source) then -        cancelEvent() -        outputChatBox("You cannot change your nickname whilst muted!", source, 255, 0, 0) -        return -    end + if isPlayerMuted(source) then + cancelEvent() + outputChatBox("You cannot change your nickname whilst muted!", source, 255, 0, 0) + return +end -    if (showColorCodes) then -        outputChatBox(getDefaultColor().."* "..getHexFriendlyNick(source, oldNick)..getDefaultColor().." is now known as "..getHexFriendlyNick(source, newNick), root, 255, 100, 100, true) -    else -        outputChatBox("* "..oldNick.." is now known as "..newNick, root, 255, 100, 100) -    end + if (showColorCodes) then + outputChatBox(getDefaultColor().."* "..getHexFriendlyNick(source, oldNick)..getDefaultColor().." is now known as "..getHexFriendlyNick(source, newNick), root, 255, 100, 100, true) + else + outputChatBox("* "..oldNick.." is now known as "..newNick, root, 255, 100, 100) + end end addEventHandler("onPlayerChangeNick", root, nickChangeMessage) @@ -72,4 +72,4 @@ function leftMessage(reason) outputChatBox("* "..getPlayerName(source).." has left the game ["..reason.."]", root, 255, 100, 100) end end -addEventHandler("onPlayerQuit", root, leftMessage) +addEventHandler("onPlayerQuit", root, leftMessage) \ No newline at end of file