Skip to content

Commit

Permalink
Fix for deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
audaxion authored and jgable committed May 17, 2013
1 parent 0159129 commit b18e613
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/irc.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,13 @@ class IrcBot extends Adapter

self.receive new LeaveMessage(null)

getUserFromName: (name) ->
return @robot.brain.userForName(name) if @robot.brain?.userForName?

return @userForName name

createUser: (channel, from) ->
user = @userForName from
user = @getUserFromName from
unless user?
id = new Date().getTime().toString()
user = @userForId id
Expand Down

0 comments on commit b18e613

Please sign in to comment.