diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-04-13 02:04:55 +0200 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-04-13 02:04:55 +0200 |
commit | 7b59872d86160099968d0f8cdafc2853b074d39b (patch) | |
tree | 59e3d7ec91c305bcabf4daea5f754ab15cbc787b /irc_send.c | |
parent | 89c11e735164b7212d27bb64ff1a00ac50b9c746 (diff) |
Support for simple VERSION/PING CTCPs to root.
Diffstat (limited to 'irc_send.c')
-rw-r--r-- | irc_send.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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", |