mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 10:12:39 +01:00
Add send_channel_join().
This commit is contained in:
parent
a8df2896bb
commit
27912fd4ff
2 changed files with 18 additions and 0 deletions
|
@ -281,4 +281,6 @@ const char * get_extban_string(void);
|
||||||
|
|
||||||
extern int get_channel_access(struct Client *source_p, struct membership *msptr);
|
extern int get_channel_access(struct Client *source_p, struct membership *msptr);
|
||||||
|
|
||||||
|
extern void send_channel_join(struct Channel *chptr, struct Client *client_p);
|
||||||
|
|
||||||
#endif /* INCLUDED_channel_h */
|
#endif /* INCLUDED_channel_h */
|
||||||
|
|
|
@ -123,6 +123,22 @@ free_ban(struct Ban *bptr)
|
||||||
rb_bh_free(ban_heap, bptr);
|
rb_bh_free(ban_heap, bptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* send_channel_join()
|
||||||
|
*
|
||||||
|
* input - channel to join, client joining.
|
||||||
|
* output - none
|
||||||
|
* side effects - none
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
send_channel_join(struct Channel *chptr, struct Client *client_p)
|
||||||
|
{
|
||||||
|
if (!IsClient(client_p))
|
||||||
|
return;
|
||||||
|
|
||||||
|
sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN %s",
|
||||||
|
client_p->name, client_p->username, client_p->host, chptr->chname);
|
||||||
|
}
|
||||||
|
|
||||||
/* find_channel_membership()
|
/* find_channel_membership()
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue