Net::NNTP.start(news-europe.giganews.com,119,USER,PASSWORD) do |nntp|
...
end
Throws error "502 already authenticated" when logging in for the first time.
My Workaround:
class Net::NNTP
# added the line
# return if stat == "502 already authenticated\n"
# for compatibilty with giganews.
def auth_original(user, secret)
stat = critical {
check_response(get_response("AUTHINFO USER %s", user), true)
check_response(get_response("AUTHINFO PASS %s", secret), true)
}
return if stat == "502 already authenticated\n"
raise NNTPAuthenticationError, stat unless /\A2../ === stat
end
end
Now it works fine, but I think this solution is not ideal |