From 7b59872d86160099968d0f8cdafc2853b074d39b Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Tue, 13 Apr 2010 02:04:55 +0200 Subject: Support for simple VERSION/PING CTCPs to root. --- irc_send.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'irc_send.c') diff --git a/irc_send.c b/irc_send.c index ce4c86fe..57d15ade 100644 --- a/irc_send.c +++ b/irc_send.c @@ -302,6 +302,19 @@ void irc_send_msg_raw( irc_user_t *iu, const char *type, const char *dst, const iu->nick, iu->user, iu->host, type, dst, msg ); } +void irc_send_msg_f( irc_user_t *iu, const char *type, const char *dst, const char *format, ... ) +{ + char text[IRC_MAX_LINE]; + va_list params; + + va_start( params, format ); + g_vsnprintf( text, IRC_MAX_LINE, format, params ); + va_end( params ); + + irc_write( iu->irc, ":%s!%s@%s %s %s :%s", + iu->nick, iu->user, iu->host, type, dst, text ); +} + void irc_send_nick( irc_user_t *iu, const char *new ) { irc_write( iu->irc, ":%s!%s@%s NICK %s", -- cgit v1.2.3