From fc7dfec2b9ed3a2857b89cc07abee99c1c6c6d56 Mon Sep 17 00:00:00 2001 From: Gawain Lynch Date: Tue, 7 Oct 2014 21:29:22 +0100 Subject: [PATCH] Add a formatted ACTION --- irc.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/irc.go b/irc.go index 306b061..a9094af 100644 --- a/irc.go +++ b/irc.go @@ -226,6 +226,11 @@ func (irc *Connection) Action(target, message string) { irc.pwrite <- fmt.Sprintf("PRIVMSG %s :\001ACTION %s\001\r\n", target, message) } +// Send formatted (action) message to a target (channel or nickname). +func (irc *Connection) Actionf(target, format string, a ...interface{}) { + irc.Action(target, fmt.Sprintf(format, a...)) +} + // Send (private) message to a target (channel or nickname). // RFC 1459 details: https://tools.ietf.org/html/rfc1459#section-4.4.1 func (irc *Connection) Privmsg(target, message string) {