Use send_channel_join().

This commit is contained in:
William Pitcock 2010-12-16 00:13:42 -06:00
parent 27912fd4ff
commit 805cfa5ab2
2 changed files with 6 additions and 18 deletions

View file

@ -104,9 +104,7 @@ mo_ojoin(struct Client *client_p, struct Client *source_p, int parc, const char
sendto_server(client_p, chptr, CAP_TS6, NOCAPS, sendto_server(client_p, chptr, CAP_TS6, NOCAPS,
":%s SJOIN %ld %s + :@%s", ":%s SJOIN %ld %s + :@%s",
me.id, (long) chptr->channelts, chptr->chname, source_p->id); me.id, (long) chptr->channelts, chptr->chname, source_p->id);
sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN %s", send_channel_join(chptr, source_p);
source_p->name,
source_p->username, source_p->host, chptr->chname);
sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +o %s", sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +o %s",
me.name, chptr->chname, source_p->name); me.name, chptr->chname, source_p->name);
@ -117,9 +115,7 @@ mo_ojoin(struct Client *client_p, struct Client *source_p, int parc, const char
sendto_server(client_p, chptr, CAP_TS6, NOCAPS, sendto_server(client_p, chptr, CAP_TS6, NOCAPS,
":%s SJOIN %ld %s + :+%s", ":%s SJOIN %ld %s + :+%s",
me.id, (long) chptr->channelts, chptr->chname, source_p->id); me.id, (long) chptr->channelts, chptr->chname, source_p->id);
sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN %s", send_channel_join(chptr, source_p);
source_p->name,
source_p->username, source_p->host, chptr->chname);
sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +v %s", sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +v %s",
me.name, chptr->chname, source_p->name); me.name, chptr->chname, source_p->name);
} }
@ -129,9 +125,7 @@ mo_ojoin(struct Client *client_p, struct Client *source_p, int parc, const char
sendto_server(client_p, chptr, CAP_TS6, NOCAPS, sendto_server(client_p, chptr, CAP_TS6, NOCAPS,
":%s JOIN %ld %s +", ":%s JOIN %ld %s +",
source_p->id, (long) chptr->channelts, chptr->chname); source_p->id, (long) chptr->channelts, chptr->chname);
sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN %s", send_channel_join(chptr, source_p);
source_p->name,
source_p->username, source_p->host, chptr->chname);
} }
/* send the topic... */ /* send the topic... */

View file

@ -322,9 +322,7 @@ m_join(struct Client *client_p, struct Client *source_p, int parc, const char *p
/* we send the user their join here, because we could have to /* we send the user their join here, because we could have to
* send a mode out next. * send a mode out next.
*/ */
sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN :%s", send_channel_join(chptr, source_p);
source_p->name,
source_p->username, source_p->host, chptr->chname);
/* its a new channel, set +nt and burst. */ /* its a new channel, set +nt and burst. */
if(flags & CHFL_CHANOP) if(flags & CHFL_CHANOP)
@ -494,9 +492,7 @@ ms_join(struct Client *client_p, struct Client *source_p, int parc, const char *
chptr->join_delta = rb_current_time(); chptr->join_delta = rb_current_time();
} }
chptr->join_count++; chptr->join_count++;
sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN :%s", send_channel_join(chptr, source_p);
source_p->name, source_p->username,
source_p->host, chptr->chname);
} }
sendto_server(client_p, chptr, CAP_TS6, NOCAPS, sendto_server(client_p, chptr, CAP_TS6, NOCAPS,
@ -839,9 +835,7 @@ ms_sjoin(struct Client *client_p, struct Client *source_p, int parc, const char
if(!IsMember(target_p, chptr)) if(!IsMember(target_p, chptr))
{ {
add_user_to_channel(chptr, target_p, fl); add_user_to_channel(chptr, target_p, fl);
sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN :%s", send_channel_join(chptr, target_p);
target_p->name,
target_p->username, target_p->host, parv[2]);
joins++; joins++;
} }