 type        = process.env.HUBOT_IRC_TYPE
 debug       = process.env.HUBOT_HTTP_IRC_DEBUG
 api_key     = process.env.HUBOT_HTTP_IRC_API_KEY
-allow       = process.env.HUBOT_HTTP_IRC_ALLOW
-deny        = process.env.HUBOT_HTTP_IRC_DENY
+allow       = process.env.HUBOT_HTTP_IRC_ALLOW || null
+deny        = process.env.HUBOT_HTTP_IRC_DENY  || null
 allow_flag  = false
 
 send_message = (res, room, msg, query) ->
-  # console.log "room: #{room}"
-  # console.log "msg: #{message}"
   unless room
     console.log "#{prefix}: There is no room to say."
-    res.writeHead 200, {'Content-Type': 'text/plain'}
+    res.writeHead 400, {'Content-Type': 'text/plain'}
     res.end 'Error: There is no room to say.'
+    return
 
   # console.log "query: %j", query
 

    @sm.send ["#{room}"], msg, query
  else
    @sm.send ["#{room}"], msg
  res.writeHead 200, {'Content-Type': 'text/plain'}
  res.end 'OK'



  if req.headers['X-Forwarded-For']
    remote_ip = req.headers['X-Forwarded-For']

  return false if deny is null
  return false if allow is null

  deny_ips  = deny.split(',')
  allow_ips = allow.split(',')
