From 902427ed32a0476bfa1d2419c111d2f370d7b4be Mon Sep 17 00:00:00 2001 From: Julian Marcos <54623995+Juliaria08@users.noreply.github.com> Date: Tue, 12 Apr 2022 11:04:58 +0200 Subject: [PATCH] Send "PASS" command before registration Send the "PASS" command to the socket if me.password exists. --- lib/iirc/bot.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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