Compare commits

..

1 Commits

Author SHA1 Message Date
Georges Dupéron
dabf4da547 Added “recipient” field, so that pasterack notifies the intended recipient on IRC. 2016-06-17 13:23:29 +02:00

View File

@ -408,6 +408,12 @@
(span " Alert "
,(mk-link racket-irc-url "#racket") "; your nick: ")
(input ([type "text"] [name "nick"] [size "10"]
[style ,(~~ "background-color:#FFFFF0"
"border:inset thin"
"font-size:105%"
"font-family:'PT Sans',sans-serif")]))
(span "; recipient's nick: ")
(input ([type "text"] [name "recipient"] [size "10"]
[style ,(~~ "background-color:#FFFFF0"
"border:inset thin"
"font-size:105%"
@ -499,7 +505,11 @@
'views 0))
(when (exists-binding? 'irc bs)
(define nick (extract-binding/single 'nick bs))
(irc-paste (++ (if (string=? "" nick) "" (++ nick " pasted: "))
(define recipient (if (exists-binding? 'recipient bs)
(extract-binding/single 'recipient bs)
""))
(irc-paste (++ (if (string=? "" recipient) "" (++ recipient ": "))
(if (string=? "" nick) "" (++ nick " pasted: "))
(if (string=? "" paste-name) "" (++ paste-name ", "))
paste-url)))
(fprintf log-port "~a\t~a\t~a\t~a\n"