summaryrefslogtreecommitdiff
path: root/modules/core
diff options
context:
space:
mode:
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2013-01-11 12:59:24 +0000
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2013-01-11 12:59:24 +0000
commit9206712a4455da4ae692005f4e3181fd36ba6f42 (patch)
tree81a48680db284ee7813cd25672ba46f98cee2252 /modules/core
parent01cb956987521194a8ef673095a36025847387ac (diff)
- Add support for "away-notify" client capability
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/trunk@1734 82007160-df01-0410-b94d-b575c5fd34c7
Diffstat (limited to 'modules/core')
-rw-r--r--modules/core/m_join.c16
-rw-r--r--modules/core/m_nick.c4
-rw-r--r--modules/core/m_sjoin.c5
3 files changed, 23 insertions, 2 deletions
diff --git a/modules/core/m_join.c b/modules/core/m_join.c
index badef89..569663b 100644
--- a/modules/core/m_join.c
+++ b/modules/core/m_join.c
@@ -233,6 +233,11 @@ m_join(struct Client *client_p, struct Client *source_p,
source_p->host, chptr->chname);
sendto_channel_local(ALL_MEMBERS, 0, chptr, ":%s MODE %s +nt",
me.name, chptr->chname);
+ if (source_p->away[0])
+ sendto_channel_local_butone(source_p, 0, CAP_AWAY_NOTIFY, chptr,
+ ":%s!%s@%s AWAY :%s",
+ source_p->name, source_p->username,
+ source_p->host, source_p->away);
}
else
{
@@ -248,6 +253,12 @@ m_join(struct Client *client_p, struct Client *source_p,
sendto_channel_local(ALL_MEMBERS, 0, chptr, ":%s!%s@%s JOIN :%s",
source_p->name, source_p->username,
source_p->host, chptr->chname);
+
+ if (source_p->away[0])
+ sendto_channel_local_butone(source_p, 0, CAP_AWAY_NOTIFY, chptr,
+ ":%s!%s@%s AWAY :%s",
+ source_p->name, source_p->username,
+ source_p->host, source_p->away);
}
del_invite(chptr, source_p);
@@ -415,6 +426,11 @@ ms_join(struct Client *client_p, struct Client *source_p,
sendto_channel_local(ALL_MEMBERS, 0, chptr, ":%s!%s@%s JOIN :%s",
source_p->name, source_p->username,
source_p->host, chptr->chname);
+ if (source_p->away[0])
+ sendto_channel_local_butone(source_p, 0, CAP_AWAY_NOTIFY, chptr,
+ ":%s!%s@%s AWAY :%s",
+ source_p->name, source_p->username,
+ source_p->host, source_p->away);
}
sendto_server(client_p, CAP_TS6, NOCAPS,
diff --git a/modules/core/m_nick.c b/modules/core/m_nick.c
index 2f10317..1250d2c 100644
--- a/modules/core/m_nick.c
+++ b/modules/core/m_nick.c
@@ -148,7 +148,7 @@ change_local_nick(struct Client *source_p, const char *nick)
sendto_realops_flags(UMODE_NCHANGE, L_ALL, SEND_NOTICE,
"Nick change: From %s to %s [%s@%s]",
source_p->name, nick, source_p->username, source_p->host);
- sendto_common_channels_local(source_p, 1, ":%s!%s@%s NICK :%s",
+ sendto_common_channels_local(source_p, 1, 0, ":%s!%s@%s NICK :%s",
source_p->name, source_p->username,
source_p->host, nick);
add_history(source_p, 1);
@@ -728,7 +728,7 @@ nick_from_server(struct Client *client_p, struct Client *source_p, int parc,
source_p->tsinfo = newts ? newts : CurrentTime;
}
- sendto_common_channels_local(source_p, 1, ":%s!%s@%s NICK :%s",
+ sendto_common_channels_local(source_p, 1, 0, ":%s!%s@%s NICK :%s",
source_p->name,source_p->username,
source_p->host, nick);
diff --git a/modules/core/m_sjoin.c b/modules/core/m_sjoin.c
index a072183..c817c99 100644
--- a/modules/core/m_sjoin.c
+++ b/modules/core/m_sjoin.c
@@ -423,6 +423,11 @@ ms_sjoin(struct Client *client_p, struct Client *source_p,
sendto_channel_local(ALL_MEMBERS, 0, chptr, ":%s!%s@%s JOIN :%s",
target_p->name, target_p->username,
target_p->host, chptr->chname);
+ if (target_p->away[0])
+ sendto_channel_local_butone(target_p, 0, CAP_AWAY_NOTIFY, chptr,
+ ":%s!%s@%s AWAY :%s",
+ target_p->name, target_p->username,
+ target_p->host, target_p->away);
}
if (fl & CHFL_CHANOP)