 # Hubot dependencies
 {Robot, Adapter, TextMessage, EnterMessage, LeaveMessage, Response} = require 'hubot'
+
+# Custom Response class that adds a sendPrivate method
+class IrcResponse extends Response
+  sendPrivate: (strings...) ->
+    @robot.adapter.sendPrivate @envelope, strings...
 
 # Irc library
 Irc = require 'irc'


    for str in strings
      @bot.say target, str

  topic: (envelope, strings...) ->
    data = strings.join " / "


    client_options['channels'] = options.rooms unless options.nickpass

    # Override the response to provide a sendPrivate method
    @robot.Response = IrcResponse

    @robot.name = options.nick
    bot = new Irc.Client options.server, options.nick, client_options

