+ nntp_gen_send(sock, "%s", buf);
+ ok = nntp_ok(sock, argbuf);
+ if (ok == NN_AUTHREQ && sock->userid && sock->passwd) {
+ nntp_gen_send(sock, "AUTHINFO USER %s", sock->userid);
+ ok = nntp_ok(sock, NULL);
+ if (ok == NN_AUTHCONT) {
+ nntp_gen_send(sock, "AUTHINFO PASS %s", sock->passwd);
+ ok = nntp_ok(sock, NULL);
+ }
+ if (ok != NN_SUCCESS)
+ return ok;
+ nntp_gen_send(sock, "%s", buf);
+ ok = nntp_ok(sock, argbuf);
+ }
+ return ok;
+}