mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 22:06:38 +02:00
irc: use NULL instead of "*" for unidentified nicks
This commit is contained in:
@@ -653,7 +653,7 @@ irc_channel_remove_account (struct t_irc_server *server,
|
||||
{
|
||||
if (ptr_nick->account)
|
||||
free (ptr_nick->account);
|
||||
ptr_nick->account = strdup ("*");
|
||||
ptr_nick->account = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,9 +206,12 @@ IRC_PROTOCOL_CALLBACK(account)
|
||||
{
|
||||
struct t_irc_channel *ptr_channel;
|
||||
struct t_irc_nick *ptr_nick;
|
||||
char *pos_account;
|
||||
|
||||
IRC_PROTOCOL_MIN_ARGS(3);
|
||||
|
||||
pos_account = (argv[2] && argv[2][0] != '*') ? argv[2] : NULL;
|
||||
|
||||
for (ptr_channel = server->channels; ptr_channel;
|
||||
ptr_channel = ptr_channel->next_channel)
|
||||
{
|
||||
@@ -217,8 +220,8 @@ IRC_PROTOCOL_CALLBACK(account)
|
||||
{
|
||||
if (ptr_nick->account)
|
||||
free (ptr_nick->account);
|
||||
ptr_nick->account = (server->cap_account_notify) ?
|
||||
strdup (argv[2]) : strdup ("*");
|
||||
ptr_nick->account = (server->cap_account_notify && pos_account) ?
|
||||
strdup (pos_account) : NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -747,7 +750,7 @@ IRC_PROTOCOL_CALLBACK(join)
|
||||
|
||||
/* add nick in channel */
|
||||
ptr_nick = irc_nick_new (server, ptr_channel, nick, address, NULL, 0,
|
||||
(pos_account) ? pos_account : "*", (pos_realname) ? pos_realname : NULL);
|
||||
(pos_account) ? pos_account : NULL, (pos_realname) ? pos_realname : NULL);
|
||||
|
||||
/* rename the nick if it was in list with a different case */
|
||||
irc_channel_nick_speaking_rename_if_present (server, ptr_channel, nick);
|
||||
@@ -4208,7 +4211,7 @@ IRC_PROTOCOL_CALLBACK(353)
|
||||
if (ptr_channel && ptr_channel->nicks)
|
||||
{
|
||||
if (!irc_nick_new (server, ptr_channel, nickname, pos_host,
|
||||
prefixes, 0, "*", NULL))
|
||||
prefixes, 0, NULL, NULL))
|
||||
{
|
||||
weechat_printf (
|
||||
server->buffer,
|
||||
@@ -4345,7 +4348,7 @@ IRC_PROTOCOL_CALLBACK(354)
|
||||
free (ptr_nick->account);
|
||||
ptr_nick->account = (ptr_channel && pos_account
|
||||
&& server->cap_account_notify) ?
|
||||
strdup (pos_account) : strdup ("*");
|
||||
strdup (pos_account) : NULL;
|
||||
}
|
||||
|
||||
/* update realname flag for nick */
|
||||
|
||||
Reference in New Issue
Block a user