aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--irc.h1
-rw-r--r--irc_cap.c1
-rw-r--r--irc_send.c6
3 files changed, 7 insertions, 1 deletions
diff --git a/irc.h b/irc.h
index 23d97433..b39c306c 100644
--- a/irc.h
+++ b/irc.h
@@ -69,6 +69,7 @@ typedef enum {
typedef enum {
CAP_SASL = (1 << 0),
CAP_MULTI_PREFIX = (1 << 1),
+ CAP_EXTENDED_JOIN = (1 << 2),
} irc_cap_flag_t;
struct irc_user;
diff --git a/irc_cap.c b/irc_cap.c
index 4cfc158b..4d1c2caa 100644
--- a/irc_cap.c
+++ b/irc_cap.c
@@ -39,6 +39,7 @@ typedef struct {
static const cap_info_t supported_caps[] = {
{"sasl", CAP_SASL},
{"multi-prefix", CAP_MULTI_PREFIX},
+ {"extended-join", CAP_EXTENDED_JOIN},
{NULL},
};
diff --git a/irc_send.c b/irc_send.c
index e2ec0f59..adf1b853 100644
--- a/irc_send.c
+++ b/irc_send.c
@@ -171,7 +171,11 @@ void irc_send_join(irc_channel_t *ic, irc_user_t *iu)
{
irc_t *irc = ic->irc;
- irc_write(irc, ":%s!%s@%s JOIN :%s", iu->nick, iu->user, iu->host, ic->name);
+ if (irc->caps & CAP_EXTENDED_JOIN) {
+ irc_write(irc, ":%s!%s@%s JOIN %s * :%s", iu->nick, iu->user, iu->host, ic->name, iu->fullname);
+ } else {
+ irc_write(irc, ":%s!%s@%s JOIN :%s", iu->nick, iu->user, iu->host, ic->name);
+ }
if (iu == irc->user) {
if (ic->topic && *ic->topic) {