summaryrefslogtreecommitdiff
path: root/src/core/servers.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-03-04 10:30:41 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-03-04 10:30:41 +0000
commit484f62f7571f94ff85515363afa6d6fc85e2aaba (patch)
tree8cf90aa3d0baa10cd1d14a685e7f0814dd5b80b7 /src/core/servers.c
parentf167516d23badb13fa99b8aba1b7bb784f24386b (diff)
downloadirssi-484f62f7571f94ff85515363afa6d6fc85e2aaba.zip
added server_change_nick() function for servers.[ch]. Lots of fixes for
support to multiple identical nicks. Should work now properly :) git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1351 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/servers.c')
-rw-r--r--src/core/servers.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/servers.c b/src/core/servers.c
index 02fda4d9..4b91f846 100644
--- a/src/core/servers.c
+++ b/src/core/servers.c
@@ -428,6 +428,16 @@ void server_connect_free(SERVER_CONNECT_REC *conn)
g_free(conn);
}
+void server_change_nick(SERVER_REC *server, const char *nick)
+{
+ g_free(server->connrec->nick);
+ g_free(server->nick);
+ server->connrec->nick = g_strdup(nick);
+ server->nick = g_strdup(nick);
+
+ signal_emit("server nick changed", 1, server);
+}
+
/* Update own IPv4 and IPv6 records */
void server_connect_own_ip_save(SERVER_CONNECT_REC *conn,
IPADDR *ip4, IPADDR *ip6)