Permalink
Browse files

append on constructor

  • Loading branch information...
kmnk committed Mar 20, 2012
1 parent df2a032 commit 68c35fe0c0a17b57064d1e61b5cfb9dfdb1541ec
Showing with 8 additions and 5 deletions.
  1. +8 −5 src/irc.coffee
View
@@ -4,6 +4,14 @@ Adapter = require('hubot').adapter()
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?
@@ -124,10 +132,5 @@ class IrcResponse extends Robot.Response
@robot.adapter.notice @message.user, strings...
exports.use = (robot) ->
robot.notice = (user, strings...) ->
@adapter.notice user, strings...
robot.Response = IrcResponse
new IrcBot robot

0 comments on commit 68c35fe

Please sign in to comment.