X-Git-Url: https://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fnntp.el;h=d54b4a406dc421b68d807acf26c54ff26badc156;hb=1a96d7bf660263f25557962103bc0ec2495d1d07;hp=a47f9f64c48146b079af698ebf473e0ca319eb20;hpb=aecfe0f6a67ecdff7bd69f1748c9558e573dc813;p=gnus diff --git a/lisp/nntp.el b/lisp/nntp.el index a47f9f64c..d54b4a406 100644 --- a/lisp/nntp.el +++ b/lisp/nntp.el @@ -50,6 +50,9 @@ to allow posting from the server. Note that this is only necessary to do on servers that use strict access control.") (add-hook 'nntp-server-opened-hook 'nntp-send-mode-reader) +(defvoo nntp-authinfo-function 'nntp-send-authinfo + "Function used to send AUTHINFO to the server.") + (defvoo nntp-server-action-alist '(("nntpd 1\\.5\\.11t" (remove-hook 'nntp-server-opened-hook 'nntp-send-mode-reader))) @@ -586,9 +589,12 @@ It will prompt for a password." (if (and (= beg (point-min)) (memq (char-after beg) '(?4 ?5))) ;; Report back error messages. - (progn - (nntp-snarf-error-message) - (funcall nntp-process-callback nil)) + (save-excursion + (goto-char beg) + (if (looking-at "480") + (funcall nntp-authinfo-function) + (nntp-snarf-error-message) + (funcall nntp-process-callback nil))) (goto-char end) (when (and (> (point) nntp-process-start-point) (re-search-backward nntp-process-wait-for @@ -654,7 +660,11 @@ It will prompt for a password." (save-excursion (set-buffer (process-buffer process)) (goto-char (point-min)) - (while (not (looking-at "[2345]")) + (while (or (not (memq (following-char) '(?2 ?3 ?4 ?5))) + (looking-at "480")) + (when (looking-at "480") + (erase-buffer) + (funcall nntp-authinfo-function)) (nntp-accept-process-output process) (goto-char (point-min))) (prog1