void canalopers(const char *source, const char *fmt, ...)
{
    va_list args;
    char buf[BUFSIZE];
        
    va_start(args, fmt);
    snprintf(buf, sizeof(buf), "PRIVMSG #%s :%s", CanalOpers, fmt);
    vsend_cmd(source, buf, args);
}            
/* Send a NOTICE from the given source to the given nick. */
void notice(const char *source, const char *dest, const char *fmt, ...)
{
    va_list args;
    char buf[BUFSIZE];

    va_start(args, fmt);
    snprintf(buf, sizeof(buf), "NOTICE %s :%s", dest, fmt);
    vsend_cmd(source, buf, args);
}
/* Send a PRIVMSG from the given source to the given nick. */
void privmsg(const char *source, const char *dest, const char *fmt, ...)
{
    va_list args;
    char buf[BUFSIZE];

    va_start(args, fmt);
    snprintf(buf, sizeof(buf), "PRIVMSG %s :%s", dest, fmt);
    vsend_cmd(source, buf, args);
}
Exemple #4
0
/**
 * Send a command to the server.  The two forms here are like
 * printf()/vprintf() and friends.
 * @param source Orgin of the Message (some times NULL)
 * @param fmt Format of the Message
 * @param ... any number of parameters
 * @return void
 */
void send_cmd(const char *source, const char *fmt, ...)
{
    va_list args;

    if (fmt) {
        va_start(args, fmt);
        vsend_cmd(source, fmt, args);
        va_end(args);
    }
}