memset(file, 0, sizeof(file));
snprintf(file, sizeof(file) - 1, "%s/session", get_irssi_dir());
params.detach_data = silc_file_readfile(file, ¶ms.detach_data_len);
+ if (params.detach_data)
+ params.detach_data[params.detach_data_len] = 0;
/* Add connection to the client library */
conn = silc_client_add_connection(silc_client, ¶ms,
/* Start key exchange with the server */
silc_client_start_key_exchange(silc_client, conn, fd);
+ /* Put default attributes */
+ silc_query_attributes_default(silc_client, conn);
+
server->ftp_sessions = silc_dlist_init();
server->isnickflag = isnickflag_func;
server->ischannel = ischannel_func;
/* SYNTAX: SILCOPER <username> [-pubkey] */
/* SYNTAX: TOPIC <channel> [<topic>] */
/* SYNTAX: UMODE +|-<modes> */
-/* SYNTAX: WHOIS <nickname>[@<hostname>] [<count>] */
+/* SYNTAX: WHOIS <nickname>[@<hostname>] [-details] [<count>] */
/* SYNTAX: WHOWAS <nickname>[@<hostname>] [<count>] */
/* SYNTAX: CLOSE <server> [<port>] */
/* SYNTAX: SHUTDOWN */
/* SYNTAX: JOIN <channel> [<passphrase>] [-cipher <cipher>] [-hmac <hmac>] [-founder] */
/* SYNTAX: DETACH */
/* SYNTAX: WATCH [<-add | -del> <nickname>] */
+/* SYNTAX: STATS */
+/* SYNTAX: ATTR [<-del> <option> [{ <value>}]] */
void silc_command_exec(SILC_SERVER_REC *server,
const char *command, const char *args)
command_bind_silc("file", MODULE_NAME, (SIGNAL_FUNC) command_file);
command_bind_silc("detach", MODULE_NAME, (SIGNAL_FUNC) command_self);
command_bind_silc("watch", MODULE_NAME, (SIGNAL_FUNC) command_self);
+ command_bind_silc("stats", MODULE_NAME, (SIGNAL_FUNC) command_self);
+ command_bind_silc("attr", MODULE_NAME, (SIGNAL_FUNC) command_attr);
command_set_options("connect", "+silcnet");
}
command_unbind("file", (SIGNAL_FUNC) command_file);
command_unbind("detach", (SIGNAL_FUNC) command_self);
command_unbind("watch", (SIGNAL_FUNC) command_self);
+ command_unbind("stats", (SIGNAL_FUNC) command_self);
+ command_unbind("attr", (SIGNAL_FUNC) command_attr);
}
void silc_server_free_ftp(SILC_SERVER_REC *server,