aboutsummaryrefslogtreecommitdiffstats
path: root/irc_user.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-07-10 00:39:25 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2010-07-10 00:39:25 +0100
commitf3b6764f269490f11a8adbddeeb06964331917d0 (patch)
tree503b810a5e9322b444dc7e84e4d8535dc0f4807e /irc_user.c
parent9a9b520df6044cfc034f9736fb97660a46e879b9 (diff)
parentb556e46f9bfeeb630b45a3c0f0951110ac3de0f2 (diff)
Only available in ForkDaemon mode for now: If a user connects (and
identifies) while he's already logged in, offer to take over the old connection.
Diffstat (limited to 'irc_user.c')
-rw-r--r--irc_user.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/irc_user.c b/irc_user.c
index 7d29cae0..8db1de28 100644
--- a/irc_user.c
+++ b/irc_user.c
@@ -24,6 +24,7 @@
*/
#include "bitlbee.h"
+#include "ipc.h"
irc_user_t *irc_user_new( irc_t *irc, const char *nick )
{
@@ -159,6 +160,9 @@ int irc_user_set_nick( irc_user_t *iu, const char *new )
g_hash_table_insert( irc->nick_user_hash, iu->key, iu );
irc->users = g_slist_insert_sorted( irc->users, iu, irc_user_cmp );
+ if( iu == irc->user )
+ ipc_to_master_str( "NICK :%s\r\n", new );
+
return 1;
}