'greentext' filter

--HG--
branch : nmdc-ircfrontend
This commit is contained in:
. 2016-05-08 13:27:37 +12:00
parent cac56a450a
commit f51bd29e07
2 changed files with 11 additions and 8 deletions

View File

@ -1,17 +1,12 @@
PRE-RELEASE
===========
- client descriptions (CTCP USERINFO)
WISHLIST WISHLIST
======== ========
- "implying" colours
- send client keepalives (PING) /and/ ensure we get a reply (PONG) - send client keepalives (PING) /and/ ensure we get a reply (PONG)
- automatic markdown bold/italic formatting
- client version sync (CTCP VERSION) - client version sync (CTCP VERSION)
- support changing nick (via reconnecting) - support changing nick (via reconnecting)

View File

@ -187,7 +187,15 @@ func reformatOutgoingMessageBody(body string) string {
} }
func reformatIncomingMessageBody(body string) string { func reformatIncomingMessageBody(body string) string {
return body
// "Greentext" filter
// TODO markdown filters
if len(body) > 0 && body[0] == '>' {
return "\x033" + strings.Replace(body, "implying", "\x02implying\x02", -1)
} else {
return body
}
} }
func (s *Server) upstreamWorker() { func (s *Server) upstreamWorker() {