]> jfr.im git - solanum.git/commitdiff
Add send_channel_join().
authorWilliam Pitcock <redacted>
Thu, 16 Dec 2010 06:09:29 +0000 (00:09 -0600)
committerWilliam Pitcock <redacted>
Thu, 16 Dec 2010 06:09:29 +0000 (00:09 -0600)
include/channel.h
src/channel.c

index 6e4f70d931dfa7a6877e5ea5b05eee81a22abec0..80f7c0fbb8ff09163361e940bc8ac2be70d16c5a 100644 (file)
@@ -281,4 +281,6 @@ const char * get_extban_string(void);
 
 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 */
index 308bd32a79356987d2cab15a8eaaa352bb2d2477..92d36512596329a585684770b1644361dd76d966 100644 (file)
@@ -123,6 +123,22 @@ free_ban(struct Ban *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()
  *