From c26966072b3215c7ce0b7ce8c7f88a703f43ed9c Mon Sep 17 00:00:00 2001 From: kingcody Date: Fri, 14 Jun 2013 05:03:18 -0400 Subject: [PATCH] Fix for the depreciation of userForId() --- src/irc.coffee | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/irc.coffee b/src/irc.coffee index 6e10bbd..0ed681a 100644 --- a/src/irc.coffee +++ b/src/irc.coffee @@ -60,11 +60,16 @@ class IrcBot extends Adapter return @userForName name + getUserFromId: (id) -> + return @robot.brain.userForId(id) if @robot.brain?.userForId? + + return @userForId id + createUser: (channel, from) -> user = @getUserFromName from unless user? id = new Date().getTime().toString() - user = @userForId id + user = @getUserForId id user.name = from if channel.match(/^[&#]/)