diff options
Diffstat (limited to 'lib/rbot/ircbot.rb')
-rw-r--r-- | lib/rbot/ircbot.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index c87b909b..a95301dd 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -513,11 +513,19 @@ class IrcBot } } @client[:nicktaken] = proc { |data| - nickchg "#{data[:nick]}_" + new = "#{data[:nick]}_" + nickchg new + # If we're setting our nick at connection because our choice was taken, + # we have to fix our nick manually, because there will be no NICK message + # yo inform us that our nick has been changed. + if data[:target] == '*' + debug "setting my connection nick to #{new}" + nick = new + end @plugins.delegate "nicktaken", data[:nick] } @client[:badnick] = proc {|data| - warning "bad nick (#{data[:nick]})" + arning "bad nick (#{data[:nick]})" } @client[:ping] = proc {|data| sendq "PONG #{data[:pingid]}" |