- Timestamp:
- 04/30/10 01:51:48 (22 months ago)
- File:
-
- 1 edited
-
branches/ithildin-1.1/modules/ircd/send.c (modified) (29 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/ithildin-1.1/modules/ircd/send.c
r833 r847 225 225 va_list vl; 226 226 227 va_start(vl, msg);228 227 229 228 /* walk our server list */ … … 234 233 235 234 if (conn->proto->tmpmsg == NULL) 235 { 236 va_start(vl, msg); 236 237 sm = conn->proto->output(&ps, cmd, to, msg, vl); 238 va_end(vl); 239 } 237 240 if (CACHE_MSG(conn->proto)) { 238 241 conn->proto->tmpmsg = create_sendq_block(sm->msg, sm->len); … … 243 246 244 247 CLEAR_SEND_TEMPS(); 245 va_end(vl);246 248 } 247 249 … … 255 257 va_list vl; 256 258 257 va_start(vl, msg);258 259 259 /* walk our server list */ 260 260 ones = srv_uplink(one); … … 266 266 267 267 if (conn->proto->tmpmsg == NULL) 268 { 269 va_start(vl, msg); 268 270 sm = conn->proto->output(&ps, cmd, to, msg, vl); 271 va_end(vl); 272 } 269 273 if (CACHE_MSG(conn->proto)) { 270 274 conn->proto->tmpmsg = create_sendq_block(sm->msg, sm->len); … … 275 279 276 280 CLEAR_SEND_TEMPS(); 277 va_end(vl); 278 } 281 } 282 279 283 /* sends a message to everyone in a channel (including sender) */ 280 284 void sendto_channel(channel_t *chan, client_t *cli, server_t *srv, char *cmd, … … 285 289 connection_t *conn; 286 290 va_list vl; 287 va_start(vl, msg);288 291 289 292 /* walk the channel list, for remote users, only pass the message to their … … 298 301 299 302 if (conn->proto->tmpmsg == NULL) 303 { 304 va_start(vl, msg); 300 305 sm = conn->proto->output(&ps, cmd, chan->name, msg, vl); 306 va_end(vl); 307 } 301 308 if (CACHE_MSG(conn->proto)) { 302 309 conn->proto->tmpmsg = create_sendq_block(sm->msg, sm->len); … … 307 314 308 315 CLEAR_SEND_TEMPS(); 309 va_end(vl);310 316 } 311 317 … … 319 325 connection_t *conn; 320 326 va_list vl; 321 va_start(vl, msg);322 327 323 328 /* walk the channel list, only send to our own clients. */ … … 331 336 332 337 if (conn->proto->tmpmsg == NULL) 338 { 339 va_start(vl, msg); 333 340 sm = conn->proto->output(&ps, cmd, chan->name, msg, vl); 341 va_end(vl); 342 } 334 343 if (CACHE_MSG(conn->proto)) { 335 344 conn->proto->tmpmsg = create_sendq_block(sm->msg, sm->len); … … 340 349 341 350 CLEAR_SEND_TEMPS(); 342 va_end(vl);343 351 } 344 352 … … 352 360 connection_t *conn; 353 361 va_list vl; 354 va_start(vl, msg);355 362 356 363 /* walk the channel list, only send to our own clients. */ … … 368 375 369 376 if (conn->proto->tmpmsg == NULL) 377 { 378 va_start(vl, msg); 370 379 sm = conn->proto->output(&ps, cmd, chan->name, msg, vl); 380 va_end(vl); 381 } 371 382 if (CACHE_MSG(conn->proto)) { 372 383 conn->proto->tmpmsg = create_sendq_block(sm->msg, sm->len); … … 377 388 378 389 CLEAR_SEND_TEMPS(); 379 va_end(vl);380 390 } 381 391 … … 388 398 connection_t *conn, *onec; 389 399 va_list vl; 390 va_start(vl, msg);391 400 392 401 /* just like above, but skip 'one'. ideally, when I can pass varargs with … … 404 413 405 414 if (conn->proto->tmpmsg == NULL) 415 { 416 va_start(vl, msg); 406 417 sm = conn->proto->output(&ps, cmd, chan->name, msg, vl); 418 va_end(vl); 419 } 407 420 if (CACHE_MSG(conn->proto)) { 408 421 conn->proto->tmpmsg = create_sendq_block(sm->msg, sm->len); … … 413 426 414 427 CLEAR_SEND_TEMPS(); 415 va_end(vl);416 428 } 417 429 … … 428 440 char pname[512]; /* prefixed name. */ 429 441 va_list vl; 430 va_start(vl, msg);431 442 432 443 sprintf(pname, "%s%s", prefixes, chan->name); … … 453 464 454 465 if (conn->proto->tmpmsg == NULL) 466 { 467 va_start(vl, msg); 455 468 sm = conn->proto->output(&ps, cmd, pname, msg, vl); 469 va_end(vl); 470 } 456 471 if (CACHE_MSG(conn->proto)) { 457 472 conn->proto->tmpmsg = create_sendq_block(sm->msg, sm->len); … … 462 477 463 478 CLEAR_SEND_TEMPS(); 464 va_end(vl);465 479 } 466 480 … … 480 494 connection_t *conn; 481 495 va_list vl; 482 va_start(vl, msg);483 496 484 497 /* for each channel the user is in, walk the list and do sends. it would … … 506 519 ircd.sends[conn->sock->fd] = 1; 507 520 if (conn->proto->tmpmsg == NULL) 521 { 522 va_start(vl, msg); 508 523 sm = conn->proto->output(&ps, cmd, NULL, msg, vl); 524 va_end(vl); 525 } 509 526 if (CACHE_MSG(conn->proto)) { 510 527 conn->proto->tmpmsg = create_sendq_block(sm->msg, sm->len); … … 517 534 518 535 CLEAR_SEND_TEMPS(); 519 va_end(vl);520 536 } 521 537 … … 538 554 } 539 555 540 va_start(vl, msg);541 542 556 /* walk the list of clients for the network, do matches as necessary. a 543 557 * lot of matches for non-local clients are luckily pre-empted if we're … … 560 574 561 575 if (conn->proto->tmpmsg == NULL) 576 { 577 va_start(vl, msg); 562 578 sm = conn->proto->output(&ps, cmd, mask, msg, vl); 579 va_end(vl); 580 } 563 581 if (CACHE_MSG(conn->proto)) { 564 582 conn->proto->tmpmsg = create_sendq_block(sm->msg, sm->len); … … 569 587 570 588 CLEAR_SEND_TEMPS(); 571 va_end(vl);572 589 } 573 590 … … 578 595 struct chanlink *cp; 579 596 va_list vl; 580 va_start(vl, msg);581 597 582 598 /* just walk the list. we shouldn't have any remote users if this is being … … 588 604 continue; 589 605 606 va_start(vl, msg); 590 607 sendto_common(cp->cli->conn, cli, srv, cmd, 591 608 (target ? cp->cli->nick : NULL), msg, vl); 609 va_end(vl); 592 610 } 593 611 594 612 /* we don't touch the temp stuff here. */ 595 va_end(vl);596 613 } 597 614 /*****************************************************************************
Note: See TracChangeset
for help on using the changeset viewer.
