         @self = null
         @channels = {}
         @users = {}
-
+        @teams = {}
 
         @ws = null
         @_messageID = 0

pingInterval = 60000

User = require './user.coffee'

class Client extends EventEmitter
    constructor: (@host, @group, @email, @password, @options={wssPort: 443}) ->

        else
            @logger.error 'Failed to load profiles from server.'
            @emit 'error', { msg: 'failed to load profiles'}
    
    _onChannels: (data, headers) =>
        if data
            @channels = data.members
            @logger.debug 'Found '+Object.keys(@channels).length+' channels.'
            @channel_details = data.channels
        else
            @logger.error 'Failed to get subscribed channels list from server.'
            @emit 'error', { msg: 'failed to get channel list'}

    connect: ->
        @logger.info 'Connecting...'
