version 1.19, 2015/01/30 15:57:30 |
version 1.20, 2015/04/24 23:17:11 |
|
|
struct client *c, *cloop; |
struct client *c, *cloop; |
struct session *s; |
struct session *s; |
enum msgtype msgtype; |
enum msgtype msgtype; |
u_int i; |
|
|
|
if (self->entry == &cmd_suspend_client_entry) { |
if (self->entry == &cmd_suspend_client_entry) { |
if ((c = cmd_find_client(cmdq, args_get(args, 't'), 0)) == NULL) |
if ((c = cmd_find_client(cmdq, args_get(args, 't'), 0)) == NULL) |
|
|
if (s == NULL) |
if (s == NULL) |
return (CMD_RETURN_ERROR); |
return (CMD_RETURN_ERROR); |
|
|
for (i = 0; i < ARRAY_LENGTH(&clients); i++) { |
TAILQ_FOREACH(cloop, &clients, entry) { |
cloop = ARRAY_ITEM(&clients, i); |
if (cloop->session != s) |
if (cloop == NULL || cloop->session != s) |
|
continue; |
continue; |
server_write_client(cloop, msgtype, |
server_write_client(cloop, msgtype, |
cloop->session->name, |
cloop->session->name, |
|
|
return (CMD_RETURN_ERROR); |
return (CMD_RETURN_ERROR); |
|
|
if (args_has(args, 'a')) { |
if (args_has(args, 'a')) { |
for (i = 0; i < ARRAY_LENGTH(&clients); i++) { |
TAILQ_FOREACH(cloop, &clients, entry) { |
cloop = ARRAY_ITEM(&clients, i); |
if (cloop->session == NULL || cloop == c) |
if (cloop == NULL || cloop->session == NULL) |
|
continue; |
|
if (cloop == c) |
|
continue; |
continue; |
server_write_client(cloop, msgtype, |
server_write_client(cloop, msgtype, |
cloop->session->name, |
cloop->session->name, |