SilcClientConnection conn = cmd->conn;
SilcClient client = cmd->client;
SilcClientEntry client_entry = NULL;
- unsigned int num = 0;
+ uint32 num = 0;
char *nickname = NULL, *server = NULL;
if (!cmd->conn) {
SilcClientConnection conn = cmd->conn;
SilcClient client = cmd->client;
SilcClientInternal app = (SilcClientInternal)client->application;
+ unsigned char modebuf[4];
+ SilcBuffer idp, buffer;
if (!cmd->conn) {
silc_say(client, conn,
}
if (cmd->argc == 1) {
+ conn->local_entry->mode &= ~SILC_UMODE_GONE;
+
if (conn->away) {
silc_free(conn->away->away);
silc_free(conn->away);
silc_screen_print_bottom_line(app->screen, 0);
}
} else {
-
+ conn->local_entry->mode |= SILC_UMODE_GONE;
+
if (conn->away)
silc_free(conn->away->away);
else
silc_screen_print_bottom_line(app->screen, 0);
}
+ /* Send the UMODE command to se myself as gone */
+ idp = silc_id_payload_encode(conn->local_id, SILC_ID_CLIENT);
+ SILC_PUT32_MSB(conn->local_entry->mode, modebuf);
+ buffer = silc_command_payload_encode_va(SILC_COMMAND_UMODE,
+ ++conn->cmd_ident, 2,
+ 1, idp->data, idp->len,
+ 2, modebuf, sizeof(modebuf));
+ silc_client_packet_send(cmd->client, conn->sock, SILC_PACKET_COMMAND,
+ NULL, 0, NULL, NULL, buffer->data,
+ buffer->len, TRUE);
+ silc_buffer_free(buffer);
+ silc_buffer_free(idp);
+
out:
silc_client_command_free(cmd);
}
SilcClient client = cmd->client;
SilcClientEntry client_entry = NULL;
SilcChannelEntry channel_entry = NULL;
- unsigned int num = 0;
+ uint32 num = 0;
char *nickname = NULL, *server = NULL;
int command = 0, port = 0, type = 0;
char *hostname = NULL;
} else if (type == 2) {
/* Unset channel key(s) */
SilcChannelPrivateKey *keys;
- unsigned int keys_count;
+ uint32 keys_count;
int number;
if (cmd->argc == 4)
if (type == 1) {
SilcPrivateMessageKeys keys;
- unsigned int keys_count;
+ uint32 keys_count;
int k, i, len;
char buf[1024];
silc_client_free_private_message_keys(keys, keys_count);
} else if (type == 2) {
SilcChannelPrivateKey *keys;
- unsigned int keys_count;
+ uint32 keys_count;
int k, i, len;
char buf[1024];