Created
January 10, 2013 20:39
-
-
Save ebith/4505583 to your computer and use it in GitHub Desktop.
hubot-ircでmsg.noticeが使えるように戻すパッチ。v0.1.4用
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/irc.coffee b/src/irc.coffee | |
index 1cd6be3..dbfb495 100644 | |
--- a/src/irc.coffee | |
+++ b/src/irc.coffee | |
@@ -5,6 +5,12 @@ | |
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? | |
@@ -176,5 +182,9 @@ class IrcBot extends Adapter | |
self.emit "connected" | |
+class IrcResponse extends Response | |
+ notice: (strings...) -> | |
+ @robot.adapter.notice @message.user, strings... | |
+ | |
exports.use = (robot) -> | |
new IrcBot robot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment