diff options
author | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2013-01-11 12:59:24 +0000 |
---|---|---|
committer | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2013-01-11 12:59:24 +0000 |
commit | 9206712a4455da4ae692005f4e3181fd36ba6f42 (patch) | |
tree | 81a48680db284ee7813cd25672ba46f98cee2252 /src | |
parent | 01cb956987521194a8ef673095a36025847387ac (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 'src')
-rw-r--r-- | src/client.c | 2 | ||||
-rw-r--r-- | src/send.c | 13 |
2 files changed, 11 insertions, 4 deletions
diff --git a/src/client.c b/src/client.c index 721f03d..e7bb6e6 100644 --- a/src/client.c +++ b/src/client.c @@ -658,7 +658,7 @@ exit_one_client(struct Client *source_p, const char *quitmsg) * that the client can show the "**signoff" message). * (Note: The notice is to the local clients *only*) */ - sendto_common_channels_local(source_p, 0, ":%s!%s@%s QUIT :%s", + sendto_common_channels_local(source_p, 0, 0, ":%s!%s@%s QUIT :%s", source_p->name, source_p->username, source_p->host, quitmsg); DLINK_FOREACH_SAFE(lp, next_lp, source_p->channel.head) @@ -506,7 +506,7 @@ sendto_server(struct Client *one, * used by m_nick.c and exit_one_client. */ void -sendto_common_channels_local(struct Client *user, int touser, +sendto_common_channels_local(struct Client *user, int touser, unsigned int cap, const char *pattern, ...) { va_list args; @@ -539,6 +539,9 @@ sendto_common_channels_local(struct Client *user, int touser, target_p->localClient->serial == current_serial) continue; + if (HasCap(target_p, cap) != cap) + continue; + target_p->localClient->serial = current_serial; send_message(target_p, buffer, len); } @@ -546,7 +549,8 @@ sendto_common_channels_local(struct Client *user, int touser, if (touser && MyConnect(user) && !IsDead(user) && user->localClient->serial != current_serial) - send_message(user, buffer, len); + if (HasCap(target_p, cap) == cap) + send_message(user, buffer, len); } /* sendto_channel_local() @@ -603,7 +607,7 @@ sendto_channel_local(int type, int nodeaf, struct Channel *chptr, * WARNING - +D clients are omitted */ void -sendto_channel_local_butone(struct Client *one, int type, +sendto_channel_local_butone(struct Client *one, int type, unsigned int cap, struct Channel *chptr, const char *pattern, ...) { va_list args; @@ -628,6 +632,9 @@ sendto_channel_local_butone(struct Client *one, int type, if (!MyConnect(target_p) || target_p == one || IsDefunct(target_p) || HasUMode(target_p, UMODE_DEAF)) continue; + + if (HasCap(target_p, cap) != cap) + continue; send_message(target_p, buffer, len); } } |