projects
/
silc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Statistics updating fixes to not go negative.
[silc.git]
/
apps
/
silcd
/
command.c
diff --git
a/apps/silcd/command.c
b/apps/silcd/command.c
index 9760e1b52dfa1285f003e892339ab3503b939b04..ff46244a741154df51f5e5b8d0360bbd2659db3e 100644
(file)
--- a/
apps/silcd/command.c
+++ b/
apps/silcd/command.c
@@
-3868,19
+3868,12
@@
SILC_SERVER_CMD_FUNC(umode)
/* Update statistics */
if (mask & SILC_UMODE_GONE) {
/* Update statistics */
if (mask & SILC_UMODE_GONE) {
- if (!
client->mode & SILC_UMODE_GONE
)
+ if (!
(client->mode & SILC_UMODE_GONE)
)
server->stat.my_aways++;
} else {
if (client->mode & SILC_UMODE_GONE)
server->stat.my_aways--;
}
server->stat.my_aways++;
} else {
if (client->mode & SILC_UMODE_GONE)
server->stat.my_aways--;
}
- if (mask & SILC_UMODE_DETACHED) {
- if (!client->mode & SILC_UMODE_DETACHED)
- server->stat.my_detached++;
- } else {
- if (client->mode & SILC_UMODE_DETACHED)
- server->stat.my_detached--;
- }
/* Change the mode */
client->mode = mask;
/* Change the mode */
client->mode = mask;
@@
-4982,6
+4975,7
@@
SILC_SERVER_CMD_FUNC(detach)
silc_server_send_notify_umode(server, server->router->connection,
server->server_type == SILC_SERVER ?
FALSE : TRUE, client->id, client->mode);
silc_server_send_notify_umode(server, server->router->connection,
server->server_type == SILC_SERVER ?
FALSE : TRUE, client->id, client->mode);
+ server->stat.my_detached++;
/* Check if anyone is watching this nickname */
if (server->server_type == SILC_ROUTER)
/* Check if anyone is watching this nickname */
if (server->server_type == SILC_ROUTER)