                                 options.token = token
                                 @renderRoom res, options, req.host
 
+    # Retrieve the bug report entered by the user.
+    # Send a mail if the nodemailer object find a sendmail in the server.
+    # The bug report is stock into the collection/table bug.
     reportBug       : (req, res) =>
         @transport.sendMail({
             from    : "Voicious bugs<no-reply@voicious.com>"

{Translator}= require './trans'

class _Room
    constructor : () ->
        @transport = nodemailer.createTransport('Sendmail');
        @token  = Token

    renderRoom : (res, options, host) =>
        options.trans = Translator.getTrans(host, 'room')
        res.render 'room', options

    roomPage : (req, res, next) =>
        Request.get "#{Config.Restapi.Url}/room/#{req.params.roomid}", (e, r, body) =>
            if e? or r.statusCode > 200

            else
                res.send 200

    # Create the new room and redirect the user inside.
    newRoom : (req, res, param) =>
        Request.post {
            json    : param
