Index: spam-report.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/spam-report.el,v retrieving revision 6.4 diff -c -r6.4 spam-report.el *** spam-report.el 7 Aug 2003 05:02:03 -0000 6.4 --- spam-report.el 10 Sep 2003 06:46:22 -0000 *************** *** 31,36 **** --- 31,39 ---- (require 'gnus) (require 'gnus-sum) + (eval-and-compile + (autoload 'mm-url-insert "mm-url")) + (defgroup spam-report nil "Spam reporting configuration.") *************** *** 54,59 **** --- 57,72 ---- :type 'boolean :group 'spam-report) + (defcustom spam-report-url-ping-function + 'spam-report-url-ping-plain + "Function to use for url ping spam reporting." + :type '(choice + (const :tag "Connect directly" + spam-report-url-ping-plain) + (const :tag "Using the external program specified in `mm-url-program'" + spam-report-url-ping-mm-url)) + :group 'spam-report) + (defun spam-report-gmane (article) "Report an article as spam through Gmane" (interactive "nEnter the article number: ") *************** *** 78,86 **** (gnus-message 10 "Could not find X-Report-Spam in article %d..." article)))))) - (defun spam-report-url-ping (host report) ! "Ping a host through HTTP, addressing a specific GET resource" (let ((tcp-connection)) (with-temp-buffer (or (setq tcp-connection --- 91,104 ---- (gnus-message 10 "Could not find X-Report-Spam in article %d..." article)))))) (defun spam-report-url-ping (host report) ! "Ping a host through HTTP, addressing a specific GET resource using ! the method specified in `spam-report-url-ping-function' for actually ! doing this." ! (funcall spam-report-url-ping-function host report)) ! ! (defun spam-report-url-ping-plain (host report) ! "Ping a host through HTTP, addressing a specific GET resource." (let ((tcp-connection)) (with-temp-buffer (or (setq tcp-connection *************** *** 94,99 **** --- 112,125 ---- (process-send-string tcp-connection (format "GET %s HTTP/1.1\nHost: %s\n\n" report host))))) + + (defun spam-report-url-ping-mm-url (host report) + "Ping a host through HTTP, addressing a specific GET resource. Use + the external program specified in `mm-url-program' to connect to + server." + (with-temp-buffer + (let ((url (concat "http://" host "/" report))) + (mm-url-insert url t)))) (provide 'spam-report)