justinweiss / robut

A simple plugin-enabled HipChat bot
171 stars 48 forks source link

@robut never responds? #28

Closed ngzax closed 12 years ago

ngzax commented 12 years ago

ruby 1.9.3-p194. I have installed robut using "gem install robut" and am using the config (minus pw) shown below.

My robut successfully logs in (I can see it online in the client as another user) and I can see it reading all the messages, but it never replies. Thoughts?

require 'robut/plugin/calc' 
require 'robut/storage/yaml_store'  
require 'robut/plugin/ping' 

Robut::Plugin.plugins << Robut::Plugin::Calc  
Robut::Plugin.plugins << Robut::Plugin::Ping

Robut::Connection.configure do |config|   
  config.jid = '***@chat.hipchat.com/bot'   
  config.password = '*********'   
  config.nick = '***'
  config.room = '***@conf.hipchat.com'    

  # Example of the YamlStore which uses a yaml file for persistence   
  Robut::Storage::YamlStore.file = "~/.robut_store"   
  config.store = Robut::Storage::YamlStore    

  # Add a logger if you want to debug the connection   
  config.logger = Logger.new(STDOUT) 

end

TIA!

justinweiss commented 12 years ago

I'd guess this is probably related to #27. The sent_to_me? function in plugins uses this code to figure out if the message is directed to robut:

connection.config.nick.split.first

This used to be the same as how HipChat used at-nicks, but they changed it, and it looks like I missed the last update on the pull request to get the two in sync. I'll try to get that merged - for now, you should just be able to use the first name of the nick instead of the full name in mentions. Let me know if that works!

ngzax commented 12 years ago

That worked! Thanks!

Daryl

On Sep 7, 2012, at 11:54 AM, Justin Weiss wrote:

I'd guess this is probably related to #27. The sent_to_me? function in plugins uses this code to figure out if the message is directed to robut:

connection.config.nick.split.first

This used to be the same as how HipChat used at-nicks, but they changed it, and it looks like I missed the last update on the pull request to get the two in sync. I'll try to get that merged - for now, you should just be able to use the first name of the nick instead of the full name in mentions. Let me know if that works!

— Reply to this email directly or view it on GitHub.

justinweiss commented 12 years ago

Cool! I'll see if I can get that patch applied, so other people don't run into the same problem :-)

On Sep 7, 2012, at 9:18 AM, Daryl Richter notifications@github.com wrote:

That worked! Thanks!

Daryl

On Sep 7, 2012, at 11:54 AM, Justin Weiss wrote:

I'd guess this is probably related to #27. The sent_to_me? function in plugins uses this code to figure out if the message is directed to robut:

connection.config.nick.split.first

This used to be the same as how HipChat used at-nicks, but they changed it, and it looks like I missed the last update on the pull request to get the two in sync. I'll try to get that merged - for now, you should just be able to use the first name of the nick instead of the full name in mentions. Let me know if that works!

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub.

justinweiss commented 12 years ago

The pull request has been merged -- you should be able to use the standard HipChat mention names now.

ngzax commented 12 years ago

Thanks! I'll try it out and let you know.

Daryl

On Sep 24, 2012, at 2:04 PM, Justin Weiss wrote:

The pull request has been merged -- you should be able to use the standard HipChat mention names now.

— Reply to this email directly or view it on GitHub.

ngzax commented 12 years ago

I have confirmed this as fixed. Thanks!