Author: ehuelsmann Date: Sat Aug 18 14:28:46 2012 New Revision: 216
Log: Add an ACTION convenience method.
Patch submitted by Daniel Lowe.
Modified: trunk/command.lisp
Modified: trunk/command.lisp ============================================================================== --- trunk/command.lisp Sat Aug 18 14:22:58 2012 (r215) +++ trunk/command.lisp Sat Aug 18 14:28:46 2012 (r216) @@ -57,6 +57,7 @@ (defgeneric wallops (connection message)) (defgeneric userhost (connection nickname)) (defgeneric ison (connection user)) +(defgeneric action (connection target message)) (defgeneric ctcp (connection target message)) (defgeneric ctcp-reply (connection target message)) (defgeneric ctcp-chat-initiate (connection nickname &key passive) @@ -390,6 +391,16 @@ (defmethod ctcp-reply ((connection connection) target message) (send-irc-message connection :notice target (make-ctcp-message message)))
+(defmethod action ((connection connection) (target string) (message string)) + (ctcp connection target (concatenate 'string "ACTION " message))) + +(defmethod action ((connection connection) (user user) (message string)) + (action connection (nickname user) message)) + +(defmethod action ((connection connection) (channel channel) (message string)) + (action connection (name channel) message)) + + ;; Intermezzo: Manage outstanding offers
(defvar *passive-offer-sequence-token* 0)