Fix invalid-RPL_TOPICWHOTIME error
This commit is contained in:
parent
856e5e8f6b
commit
4d30250a33
|
@ -56,7 +56,7 @@
|
||||||
;; Hook function for irc:loop; handles all IRC commands
|
;; Hook function for irc:loop; handles all IRC commands
|
||||||
(define (make-irc-command-callback conn)
|
(define (make-irc-command-callback conn)
|
||||||
(let ([root-dir (hash-table-ref conn 'directory)])
|
(let ([root-dir (hash-table-ref conn 'directory)])
|
||||||
(lambda (conn cmd params #!optional sender)
|
(lambda (conn cmd params #!optional sender tags)
|
||||||
(cond
|
(cond
|
||||||
[(and (string=? cmd "PRIVMSG")
|
[(and (string=? cmd "PRIVMSG")
|
||||||
(string? sender)
|
(string? sender)
|
||||||
|
@ -94,7 +94,7 @@
|
||||||
;; Hook function for irc:loop; handles all IRC errors and replies
|
;; Hook function for irc:loop; handles all IRC errors and replies
|
||||||
(define (make-irc-reply-callback conn)
|
(define (make-irc-reply-callback conn)
|
||||||
(let ([root-dir (hash-table-ref conn 'directory)])
|
(let ([root-dir (hash-table-ref conn 'directory)])
|
||||||
(lambda (conn reply params #!optional sender)
|
(lambda (conn reply params #!optional sender tags)
|
||||||
(let ([channel (second params)])
|
(let ([channel (second params)])
|
||||||
(cond
|
(cond
|
||||||
;; If topic set, output to a channel's .topic file
|
;; If topic set, output to a channel's .topic file
|
||||||
|
@ -105,10 +105,12 @@
|
||||||
|
|
||||||
[(and (eq? reply RPL_TOPICWHOTIME)
|
[(and (eq? reply RPL_TOPICWHOTIME)
|
||||||
(irc:channel? (second params)))
|
(irc:channel? (second params)))
|
||||||
(chatdir:channel-metadata-set! root-dir channel
|
(chatdir:channel-metadata-set!
|
||||||
"topic" #f
|
root-dir channel "topic" #f
|
||||||
|
(if (last params)
|
||||||
`((user.chat.sender . ,(third params))
|
`((user.chat.sender . ,(third params))
|
||||||
(user.chat.date . ,(last params))))]
|
(user.chat.date . ,(last params)))
|
||||||
|
`((user.chat.sender . ,(third params)))))]
|
||||||
|
|
||||||
;; We've got to add users, when they join the room!
|
;; We've got to add users, when they join the room!
|
||||||
[(or (and (irc:capability? conn 'userhost-in-names)
|
[(or (and (irc:capability? conn 'userhost-in-names)
|
||||||
|
|
Reference in New Issue