-Robot   = require('hubot').robot()
-Adapter = require('hubot').adapter()
+Robot   = require('hubot').Robot
+Adapter = require('hubot').Adapter
+TextMessage = require('hubot').TextMessage
 
 Irc     = require 'irc'
 
 class IrcBot extends Adapter
-  constructor: (@robot) ->
-    super @robot
-
-    @robot.notice = (user, strings...) ->
-      @adapter.notice user, strings...
-
-    @robot.Response = IrcResponse
-
   send: (user, strings...) ->
     for str in strings
       if not str?

  part: (channel) ->
    @bot.part channel, () ->
      console.log('left %s', channel)

  command: (command, strings...) ->
    @bot.send command, strings...


    self.emit "connected"

class IrcResponse extends Response
  notice: (strings...) ->
    @robot.adapter.notice @message.user, strings...

