1 |
;;; erbc.el --- Erbot user-interface commands. |
;;; erbc.el --- Erbot user-interface commands. |
2 |
;; Time-stamp: <2005-01-08 12:52:26 deego> |
;; Time-stamp: <2005-01-23 23:07:24 deego> |
3 |
;; Copyright (C) 2002 D. Goel |
;; Copyright (C) 2002 D. Goel |
4 |
;; Emacs Lisp Archive entry |
;; Emacs Lisp Archive entry |
5 |
;; Filename: erbc.el |
;; Filename: erbc.el |
1271 |
|
|
1272 |
(defalias 'fs-fuck 'fs-love) |
(defalias 'fs-fuck 'fs-love) |
1273 |
|
|
1274 |
|
(defvar fs-flame-target nil) |
1275 |
|
|
1276 |
|
|
1277 |
|
|
1278 |
|
(defun fsi-eval-maybe (str &optional nick) |
1279 |
|
(unless nick (setq nick fs-nick)) |
1280 |
|
(let ((aa (when (stringp str) |
1281 |
|
(ignore-errors (read str))))) |
1282 |
|
(cond |
1283 |
|
((consp aa) (fsi-eval aa)) |
1284 |
|
(t (format "%s: %s" nick str))))) |
1285 |
|
|
1286 |
|
|
1287 |
|
|
1288 |
(defun fs-flame (&rest args) |
(defun fs-flame (&rest args) |
1289 |
"Doesn't really flame right now.. |
"" |
1290 |
Optional argument ARGS ." |
(let ((fs-flame-target |
|
(let ((target |
|
1291 |
(if (first args) |
(if (first args) |
1292 |
(format "%s" (first args)) |
(format "%s" (first args)) |
1293 |
erbot-end-user-nick)) |
erbot-end-user-nick)) |
1294 |
(flames (ignore-errors (fs-notes "flames")))) |
(flames (ignore-errors (fs-notes "flames")))) |
1295 |
(if (string= (format "%s" target) "me") |
(if (string= (format "%s" fs-flame-target) "me") |
1296 |
(setq target erbot-end-user-nick)) |
(setq fs-flame-target erbot-end-user-nick)) |
1297 |
;; Check for flame.el support |
;; Check for flame.el support |
1298 |
(cond |
(cond |
1299 |
((and (consp flames) (> (length flames) 0)) |
((and (consp flames) (> (length flames) 0)) |
1300 |
(concat target ": " (fs-random-choose flames))) |
(fsi-eval-maybe (fs-random-choose flames) fs-flame-target)) |
1301 |
(t (fs-flame-mild target))))) |
(t (fs-flame-mild fs-flame-target))))) |
1302 |
|
|
1303 |
|
|
1304 |
|
|
1305 |
|
|