 
 # Opens a websocket connection and receives data as long as the connection remains open
 # TODO: add in the ping function (seems to be every 5 minutes)
-openSock = (channelId) ->
+openSock = () ->
 	broadcastStart = false
 	channelSocket = JSON.stringify
 		"event":

				commentId = message.replace ".", ""
				console.log "IRC => postAddCommentHeart: ", user, commentId,
					message, channelId, info.mixlrUserLogin, info.mixlrAuthSession
				postAddCommentHeart commentId, info
			else
				console.log "IRC => postComm: ", user, message, channelId,
					info.mixlrUserLogin, info.mixlrAuthSession
				postComm message, channelId, info

sendHTTP = (httpHeader, data) ->
	httpReq = http.request httpHeader, (res) ->


userList = {}
ignoreList = []
ircBot = {}

useFirebase = true

# Creates the IRC client with given params
ircInitBot = () ->
	ircBot = new irc.Client ircServer, ircNick,
		password: null,
		userName: ircNick,
		realName: ircNick,
		port: 6667,
		debug: false,
		showErrors: false,
		autoRejoin: true,
		autoConnect: true,
		channels: [ircChannel],
		retryCount: null,
		retryDelay: 2000,
		secure: false,
		selfSigned: false,
		certExpired: false,
		floodProtection: true,
		floodProtectionDelay: 200,
		sasl: false,
		stripColors: false,
		channelPrefixes: "&#",
		messageSplit: 512

	ircBot.addListener 'message', (from, to, message) ->
		console.log '%s => %s: %s', from, to, message
		return if from is ircBot.nick
		for user, info of userList
			console.log user, info
			continue unless from == user
			if message.toLowerCase() is "sup " + ircBot.nick
				ircBot.say to, "OH YOU KNOW JUST ENSLAVING THE HUMAN RACE"
