diff --git a/lib/iirc/bot.rb b/lib/iirc/bot.rb index b9b914e..1c80e5d 100644 --- a/lib/iirc/bot.rb +++ b/lib/iirc/bot.rb @@ -29,6 +29,7 @@ def initialize(socket=nil, user={}) def register! ensure_registration_info! + self << "PASS :#{me.password}" if me.password self << "USER #{me.username} 0 0 :#{me.realname}" self << "NICK #{me.nick}" end @@ -39,4 +40,4 @@ def register! raise ArgumentError.new('no nick given') unless me.nick && !me.nick.empty? end end -end \ No newline at end of file +end