demos: irc-bot: Refactor message handling using new handle-message.
[8sync.git] / doc / 8sync.texi
index 67eba86d284a1b1fdb855300ae826e4bf9c565d1..8dea9f3f63819dc0bd5a528b23eee8465e31e61d 100644 (file)
@@ -441,7 +441,8 @@ How about an actor that start sleeping, and keeps sleeping?
 (define-class <sleeper> (<actor>)
   (actions #:allocation #:each-subclass
            #:init-thunk (build-actions
-                         (*init* sleeper-loop))))
+                         (*init* sleeper-loop)))
+  (sleep-secs #:init-value 1 #:getter sleeper-sleep-secs))
 
 (define (sleeper-loop actor message)
   (while (actor-alive? actor)
@@ -1017,8 +1018,7 @@ Edit the respond section to see what channel it's really sending
 things to:
 
 @example
-(define-method (handle-line (irc-bot <my-irc-bot>) message
-                            speaker channel line emote?)
+(define-method (handle-message (irc-bot <my-irc-bot>) message)
   ;; [... snip ...]
   (define (respond respond-line)
     (<- (actor-id irc-bot) 'send-line (pk 'channel channel)
@@ -1047,8 +1047,7 @@ to looks like our own username that we respond back to the sender.
 (We can remove the pk now that we know what's going on.)
 
 @example
-(define-method (handle-line (irc-bot <my-irc-bot>) message
-                            speaker channel line emote?)
+(define-method (handle-line (irc-bot <my-irc-bot>) message)
   ;; [... snip ...]
   (define (respond respond-line)
     (<- (actor-id irc-bot) 'send-line