nandub/hubot-irc — pull request #98 by 5thWall (2013-11-13 06:09:06+00:00)
Title: Pass user to Leave and Enter Message constructors

If you try to call the `join` or `part` messages they throw an error because the constructors for `EnterMessage` and `LeaveMessage` are both expecting a `@user` (inherited from `Message` class). In more recent versions of hubot, the Message constructor is expecting the `@user` parameter to have a `.room` property.

This code attempts to get a user with the same name as your hubot and passes it to the constructors.