summaryrefslogtreecommitdiff
path: root/src/plugins/irc/irc-protocol.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2015-01-25 15:17:51 +0100
committerSébastien Helleu <flashcode@flashtux.org>2015-01-25 15:17:51 +0100
commit055d7de721d02f58ba80cfb945bb981947fc239d (patch)
treebdedf0db99a737767c166dfa0191949c0f2ab73c /src/plugins/irc/irc-protocol.c
parent62256251bedca9e36b833197e8e5a5d46a03a517 (diff)
downloadweechat-055d7de721d02f58ba80cfb945bb981947fc239d.zip
irc: shorten code to call irc_nick_new() in join callback
Diffstat (limited to 'src/plugins/irc/irc-protocol.c')
-rw-r--r--src/plugins/irc/irc-protocol.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index 84b1f6d83..625d34583 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -746,10 +746,8 @@ IRC_PROTOCOL_CALLBACK(join)
}
/* add nick in channel */
- if (pos_account)
- ptr_nick = irc_nick_new (server, ptr_channel, nick, address, NULL, 0, pos_account);
- else
- ptr_nick = irc_nick_new (server, ptr_channel, nick, address, NULL, 0, "*");
+ ptr_nick = irc_nick_new (server, ptr_channel, nick, address, NULL, 0,
+ (pos_account) ? pos_account : "*");
/* rename the nick if it was in list with a different case */
irc_channel_nick_speaking_rename_if_present (server, ptr_channel, nick);