ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/send.c
(Generate patch)

Comparing ircd-hybrid-7.2/src/send.c (file contents):
Revision 189 by db, Sun Oct 23 21:35:38 2005 UTC vs.
Revision 285 by adx, Sat Dec 3 10:57:47 2005 UTC

# Line 473 | Line 473 | sendto_channel_butone(struct Client *one
473                        struct Channel *chptr, const char *command,
474                        const char *pattern, ...)
475   {
476 <  va_list args;
476 >  va_list alocal, aremote, auid;
477    char local_buf[IRCD_BUFSIZE];
478    char remote_buf[IRCD_BUFSIZE];
479    char uid_buf[IRCD_BUFSIZE];
# Line 494 | Line 494 | sendto_channel_butone(struct Client *one
494    uid_len = ircsprintf(uid_buf, ":%s %s %s ",
495                         ID(from), command, chptr->chname);
496  
497 <  va_start(args, pattern);
497 >  va_start(alocal, pattern);
498 >  va_start(aremote, pattern);
499 >  va_start(auid, pattern);
500    local_len += send_format(&local_buf[local_len], IRCD_BUFSIZE - local_len,
501 <                           pattern, args);
501 >                           pattern, alocal);
502    remote_len += send_format(&remote_buf[remote_len], IRCD_BUFSIZE - remote_len,
503 <                            pattern, args);
503 >                            pattern, aremote);
504    uid_len += send_format(&uid_buf[uid_len], IRCD_BUFSIZE - uid_len, pattern,
505 <                         args);
506 <  va_end(args);
505 >                         auid);
506 >  va_end(auid);
507 >  va_end(aremote);
508 >  va_end(alocal);
509  
510    ++current_serial;
511  
# Line 861 | Line 865 | void
865   sendto_match_butone(struct Client *one, struct Client *from, char *mask,
866                      int what, const char *pattern, ...)
867   {
868 <  va_list args;
868 >  va_list alocal, aremote;
869    struct Client *client_p;
870    dlink_node *ptr, *ptr_next;
871    char local_buf[IRCD_BUFSIZE], remote_buf[IRCD_BUFSIZE];
# Line 869 | Line 873 | sendto_match_butone(struct Client *one,
873                               from->username, from->host);
874    int remote_len = ircsprintf(remote_buf, ":%s ", from->name);
875  
876 <  va_start(args, pattern);
876 >  va_start(alocal, pattern);
877 >  va_start(aremote, pattern);
878    local_len += send_format(&local_buf[local_len], IRCD_BUFSIZE - local_len,
879 <                           pattern, args);
879 >                           pattern, alocal);
880    remote_len += send_format(&remote_buf[remote_len], IRCD_BUFSIZE - remote_len,
881 <                            pattern, args);
882 <  va_end(args);
881 >                            pattern, aremote);
882 >  va_end(aremote);
883 >  va_end(alocal);
884  
885    /* scan the local clients */
886    DLINK_FOREACH(ptr, local_client_list.head)
# Line 1188 | Line 1194 | kill_client_ll_serv_butone(struct Client
1194    char buf_uid[IRCD_BUFSIZE], buf_nick[IRCD_BUFSIZE];
1195    int len_uid = 0, len_nick;
1196  
1191  va_start(args, pattern);
1197    if (HasID(source_p) && (me.id[0] != '\0'))
1198    {
1199      have_uid = 1;
1200 +    va_start(args, pattern);
1201      len_uid = ircsprintf(buf_uid, ":%s KILL %s :", me.id, ID(source_p));
1202      len_uid += send_format(&buf_uid[len_uid], IRCD_BUFSIZE - len_uid, pattern,
1203                             args);
1204 +    va_end(args);
1205    }
1206 +
1207 +  va_start(args, pattern);
1208    len_nick = ircsprintf(buf_nick, ":%s KILL %s :", me.name, source_p->name);
1209    len_nick += send_format(&buf_nick[len_nick], IRCD_BUFSIZE - len_nick, pattern,
1210                            args);

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)