Changeset 833
- Timestamp:
- 05/11/09 01:24:59 (3 years ago)
- Location:
- branches/ithildin-1.1/modules/ircd
- Files:
-
- 1 added
- 2 edited
-
commands/npc.c (added)
-
send.c (modified) (1 diff)
-
send.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/ithildin-1.1/modules/ircd/send.c
r823 r833 329 329 if (conn == NULL) 330 330 continue; 331 332 if (conn->proto->tmpmsg == NULL) 333 sm = conn->proto->output(&ps, cmd, chan->name, msg, vl); 334 if (CACHE_MSG(conn->proto)) { 335 conn->proto->tmpmsg = create_sendq_block(sm->msg, sm->len); 336 sendq_push(conn->proto->tmpmsg, conn); 337 } else 338 sendq_push(create_sendq_block(sm->msg, sm->len), conn); 339 } 340 341 CLEAR_SEND_TEMPS(); 342 va_end(vl); 343 } 344 345 /* sends a message to every server which has users in the channel except the 346 * server sending the message */ 347 void sendto_channel_remote(channel_t *chan, client_t *cli, server_t *srv, 348 char *cmd, char *msg, ...) { 349 struct protocol_sender ps = {cli, srv}; 350 struct send_msg *sm = NULL; 351 struct chanlink *cp; 352 connection_t *conn; 353 va_list vl; 354 va_start(vl, msg); 355 356 /* walk the channel list, only send to our own clients. */ 357 LIST_FOREACH(cp, &chan->users, lpchan) { 358 if (MYCLIENT(cp->cli)) 359 continue; 360 361 conn = cli_uplink(cp->cli); 362 if (conn == NULL) 363 continue; /* skip this one */ 364 if (ircd.sends[conn->sock->fd]) 365 continue; 366 else 367 ircd.sends[conn->sock->fd] = 1; 331 368 332 369 if (conn->proto->tmpmsg == NULL) -
branches/ithildin-1.1/modules/ircd/send.h
r727 r833 70 70 void sendto_channel_local(channel_t *, client_t *, server_t *, char *, char *, 71 71 ...) __PRINTF0(5); 72 void sendto_channel_remote(channel_t *, client_t *, server_t *, char *, char *, 73 ...) __PRINTF0(5); 72 74 void sendto_channel_butone(channel_t *, client_t *, client_t *, server_t *, 73 75 char *, char *, ...) __PRINTF0(6);
Note: See TracChangeset
for help on using the changeset viewer.
