diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2015-01-25 16:00:31 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2015-01-25 16:00:31 +0100 |
commit | 939c7b29c00d642e72a9195e07cf096bf3049686 (patch) | |
tree | 354c12c6dc3fc2f8c13e479c316af7fb475e355c /src | |
parent | 0f1e997090ccdd431d4ce17f34f0bc8aba6744ed (diff) | |
download | weechat-939c7b29c00d642e72a9195e07cf096bf3049686.zip |
irc: shorten code in account callback
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/irc/irc-protocol.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 625d34583..509fc9d6e 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -318,10 +318,8 @@ IRC_PROTOCOL_CALLBACK(account) { if (ptr_nick->account) free (ptr_nick->account); - if (server->cap_account_notify) - ptr_nick->account = strdup (argv[2]); - else - ptr_nick->account = strdup ("*"); + ptr_nick->account = (server->cap_account_notify) ? + strdup (argv[2]) : strdup ("*"); } } |