Add nick regain formatter
This commit is contained in:
parent
4c7eb79ae0
commit
132ebae3fd
1 changed files with 14 additions and 0 deletions
|
@ -187,6 +187,20 @@ key. A key :intro is added to the plist and then passed on to
|
|||
'wrap-prefix (circe-serenity--fill-string)))
|
||||
(circe-serenity--define-formatter 'circe-serenity-server-topic-formatter 'circe-format-server-topic)
|
||||
|
||||
(defun circe-serenity-server-nick-regain-formatter (&rest keywords)
|
||||
"Format a message of user regaining their nick.
|
||||
KEYWORDS should be a plist with at least a :new-nick and
|
||||
:old-nick key. A key :intro is added to the plist and then
|
||||
passed on to `lui-format'."
|
||||
(propertize
|
||||
(lui-format
|
||||
(format "{intro:%ds} {old-nick} is known again as {new-nick}"
|
||||
circe-serenity-longest-nick)
|
||||
(plist-put keywords :intro "***"))
|
||||
'wrap-prefix (circe-serenity--fill-string)))
|
||||
(circe-serenity--define-formatter 'circe-serenity-server-nick-regain-formatter
|
||||
'circe-format-server-nick-regain)
|
||||
|
||||
;;;###autoload
|
||||
(defun enable-circe-serenity ()
|
||||
"Enable Serenity for Circe."
|
||||
|
|
Loading…
Reference in a new issue