diff options
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); } } |