nickname formatter doesn't set the new nick anymore to Nick@host.
Affected file lib/silcclient/idlist.[ch].
+ * Now actually fixed the nickname changing on disconnection.
+ Added new function silc_change_nick to the Irssi SILC Client.
+ Affected file irssi/src/silc/core/client_ops.c,
+ irssi/src/silc/core/silc-nicklist.[ch].
+
Sat Sep 15 13:29:17 EEST 2001 Pekka Riikonen <priikone@silcnet.org>
* Check that the public key exists in the GETKEY command before
{
SILC_SERVER_REC *server = conn->context;
+ if (server->conn) {
+ nicklist_rename_unique(SERVER(server),
+ server->conn->local_entry, server->nick,
+ server->conn->local_entry,
+ silc_client->username);
+ silc_change_nick(server, silc_client->username);
+ }
+
server->conn->context = NULL;
server->conn = NULL;
server->connection_lost = TRUE;
server->get_nick_flags = (void *) get_nick_flags;
}
+void silc_change_nick(SILC_SERVER_REC *server, const char *newnick)
+{
+ server_change_nick((SERVER_REC *)server, newnick);
+}
+
void silc_nicklist_init(void)
{
signal_add("server connected", (SIGNAL_FUNC) sig_connected);
/* Check if `msg' is meant for `nick'. */
int silc_nick_match(const char *nick, const char *msg);
-
+void silc_change_nick(SILC_SERVER_REC *server, const char *newnick);
void silc_nicklist_init(void);
void silc_nicklist_deinit(void);
static void sig_disconnected(SILC_SERVER_REC *server)
{
- if (!IS_SILC_SERVER(server) || server->conn == NULL)
+ if (!IS_SILC_SERVER(server))
return;
- if (server->conn->sock != NULL) {
- nicklist_rename_unique(SERVER(server),
- server->conn->local_entry, server->nick,
- server->conn->local_entry,
- silc_client->username);
- signal_emit("message own_nick", 4, server, server->nick, server->nick, "");
-
+ if (server->conn && server->conn->sock != NULL) {
silc_client_close_connection(silc_client, NULL, server->conn);
/* SILC closes the handle */
SilcCommand command)
{
SilcIDListData idata = (SilcIDListData)sock->user_data;
+
+ if (!idata)
+ return FALSE;
+
if (idata->status & SILC_IDLIST_STATUS_REGISTERED)
return TRUE;
client_id, TRUE, NULL);
if ((!client && !cmd->pending && !server->standalone) ||
- (client && !client->connection && !cmd->pending &&
- !server->standalone) ||
- (client && !client->data.public_key && !cmd->pending &&
- !server->standalone)) {
+ (client && !client->connection && !cmd->pending) ||
+ (client && !client->data.public_key && !cmd->pending)) {
SilcBuffer tmpbuf;
uint16 old_ident;
SilcSocketConnection dest_sock;