respondToJoin (SJoin (SUser nick _ _) ch@(RChannel _)) = do
    ownNick <- getGlobal' botNick
    if nick /= ownNick then return ()
    else do modGlobal currChanList (++[fromR ch])
            putLogInfo ("Joined " ++ show ch)
            currChans <- getGlobal currChanList
            autojoin <- getGlobal' autoJoinList
            when (fromR ch `elem` autojoin && null (autojoin \\ currChans)) $
               signalEvent Ready

-- | If it's the bot that's parted, update the current channels list.
respondToJoin (SJoin (SUser nick _ _) ch@(RChannel _)) = do
    ownNick <- getGlobal' botNick
    if nick /= ownNick then return ()
    else do modGlobal currChanList (++[fromR ch])
            putLogInfo ("Joined " ++ show ch)
            currChans <- getGlobal currChanList
            autojoin <- getGlobal' autoJoinList
            when (fromR ch `elem` autojoin && null (autojoin \\ currChans)) $
               signalEvent Ready

-- | If it's the bot that's parted, update the current channels list.
respondToJoin (SJoin (SUser nick _ _) ch@(RChannel _)) = do
    ownNick <- getGlobal' botNick
    if nick /= ownNick then return ()
    else do modGlobal currChanList (++[fromR ch])
            putLogInfo ("Joined " ++ show ch)
            currChans <- getGlobal currChanList
            autojoin <- getGlobal' autoJoinList
            when (fromR ch `elem` autojoin && null (autojoin \\ currChans)) $
               signalEvent Ready

-- | If it's the bot that's parted, update the current channels list.