532 |
(list 1) |
(list 1) |
533 |
"") |
"") |
534 |
|
|
535 |
|
(defcustom fs-web-page-title-p nil |
536 |
|
"Change it to t to enable the erbot to look up the title of urls |
537 |
|
posted in a channel. When string, will be matched against target.") |
538 |
|
|
539 |
(defcustom fs-m8b-p nil |
(defcustom fs-m8b-p nil |
540 |
"Change it to t for the magic 8-ball... define m8b then of |
"Change it to t for the magic 8-ball... define m8b then of |
693 |
(when (equal 0 (string-match "," restmsg)) |
(when (equal 0 (string-match "," restmsg)) |
694 |
(setq restmsg (substring restmsg 1))) |
(setq restmsg (substring restmsg 1))) |
695 |
(setq msg (concat erbot-nick ": " restmsg)))) |
(setq msg (concat erbot-nick ": " restmsg)))) |
696 |
|
|
697 |
|
|
698 |
;; now we split strings.. |
;; now we split strings.. |
699 |
(setq msg (split-string msg)) |
(setq msg (split-string msg)) |
700 |
|
|
807 |
)) |
)) |
808 |
)) |
)) |
809 |
) |
) |
810 |
|
|
811 |
|
;; Sat Jan 8 12:40:46 EST 2005 (petekaz) |
812 |
|
;; We need to make sure this is the last thing we check |
813 |
|
;; because we don't want to hijack another valid command |
814 |
|
;; with our parsing. I.e. if a user adds a term with an |
815 |
|
;; url included in its note, we don't process that. |
816 |
|
(when (and leave-alone-p |
817 |
|
fs-web-page-title-p |
818 |
|
(if (stringp fs-web-page-title-p) |
819 |
|
(and (stringp tgt) |
820 |
|
(string-match fs-web-page-title-p tgt)) |
821 |
|
t)) |
822 |
|
(let* ((case-fold-search t) |
823 |
|
(url (some (lambda (e) |
824 |
|
(when (string-match "^http://[^ ]+$" e) |
825 |
|
e)) |
826 |
|
msg))) |
827 |
|
(when url |
828 |
|
(setq leave-alone-p nil) |
829 |
|
(setq msg (list "(" "web-page-title" (format "%S" url) ")"))))) |
830 |
|
|
831 |
;; (cond |
;; (cond |
832 |
;; ((equal (length msg) 1) |
;; ((equal (length msg) 1) |