Changeset 21509 in project


Ignore:
Timestamp:
11/17/10 15:08:15 (10 years ago)
Author:
Moritz Heidkamp
Message:

vandusen: allow name-prefixed commands in channels only

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/vandusen/trunk/vandusen.scm

    r21101 r21509  
    145145
    146146  (let ((matcher `(: ,($ 'nick) ":" (+ whitespace) ,matcher)))
    147     (irc:add-message-handler! connection (make-handler matcher)
     147    (irc:add-message-handler! connection (let ((handle (make-handler matcher)))
     148                                           (lambda (m)
     149                                             (and (eq? (string-ref (car (irc:message-parameters m)) 0) #\#)
     150                                                  (handle m))))
    148151                              command: "PRIVMSG"
    149152                              body: (match-body matcher))))
Note: See TracChangeset for help on using the changeset viewer.