-- Join channels

module Handlers.JoinChannel
( handler
) where

import Network.Socket
import Request
  
defaultChannel = "#qwerasdf"

joinChannel :: EventHandler
joinChannel _ botState = do
  putStrLn "Setting channel"
  send socket (formatRequest (Nothing, "JOIN", [defaultChannel]))
  return (botState {botChannels = [defaultChannel]})
  where socket = botSocket botState
        nick = botNick botState

handler = joinChannel

