 	#
 	# Returns nothing
 	play: (envelope, strings...) ->
+		console.log 'ROCKETCHATADAPTER -> play'.blue
 
 	# Public: Raw method for invoking the bot to run. Extend this.
 	#
 	# Returns nothing.
 	run: ->
-		console.log 'run'
+		console.log 'ROCKETCHATADAPTER -> run'.blue
+		@robot.emit 'connected'
+		@robot.brain.mergeData {}
+		# @robot.brain.emit 'loaded'
 
 	# Public: Raw method for shutting the bot down. Extend this.
 	#
 	# Returns nothing.
 	close: ->
+		console.log 'ROCKETCHATADAPTER -> close'.blue
 
 class RocketBotReceiver
 	constructor: (message) ->
+		console.log message
 		if message.u.username isnt RocketBot.name
 			RocketBotUser = new Hubot.User(message.u.username, room: message.rid)
 			RocketBotTextMessage = new Hubot.TextMessage(RocketBotUser, message.msg, message._id)


	# Priv: our extension -- send a PM to user
	priv: (envelope, strings...) ->
		sendHelper @robot, envelope, strings, (string) ->
			console.log "priv #{envelope.room}: #{string} (#{envelope.user.id})" if DEBUG
			Meteor.call "sendMessage",

path = Npm.require('path')

# Start a hubot, connected to our chat room.
# 'use strict'

# Log messages?
DEBUG = true
