Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have bot respond to its nick when automatically renamed on connect #155

Open
bobsilverberg opened this issue Oct 14, 2015 · 1 comment
Open

Comments

@bobsilverberg
Copy link

We have found that sometimes, when the bot is cycled, it reconnects to the room before its old nick is released, and therefore reconnects with a different, deduplicated nick. E.g., instead of connecting with my_robot, it uses my_robot1, which is automatically generated by the irc server.

When that happens the robot will not respond to its new nick, e.g., my_robot1, but only the nick it was expecting, e.g., my_robot. This makes it difficult and confusing for users to interact with.

This seems like something that would need to be dealt with via the irc adapter, hence I am opening this issue.

@davehunt
Copy link

It looks like we could use bot.nick after connecting to set the robot name. Something like:

@robot.name = options.nick
bot = new Irc.Client options.server, options.nick, client_options

bot.addListener 'registered', (message) ->
  # The 'registered' event is fired when you are connected to the server
  @robot.name = bot.nick
  if options.connectCommand?
    strings = options.connectCommand.split " "
    self.command strings.shift(), strings...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants