irc: fix crash when /join command is executed on a non-irc buffer (bug #33742)

This commit is contained in:
Sebastien Helleu 2011-07-10 23:21:04 +02:00
parent cb4e0d0076
commit 201ee104e7
2 changed files with 3 additions and 2 deletions

View File

@ -27,6 +27,7 @@ Version 0.3.6 (under dev!)
hdata_get_string
* api: fix bug with function config_set_desc_plugin (use immediately
description for option when function is called)
* irc: fix crash when /join command is executed on a non-irc buffer (bug #33742)
* irc: fix bug with comma in irc color code: do not strip comma if it is not
followed by a digit (bug #33662)
* irc: add prefix "#" for all channels on join (if no prefix given)

View File

@ -1868,13 +1868,13 @@ irc_command_join (void *data, struct t_gui_buffer *buffer, int argc,
}
else
{
if (!ptr_server)
return WEECHAT_RC_ERROR;
IRC_COMMAND_CHECK_SERVER("join", 1);
irc_command_join_server (ptr_server, argv_eol[1], 1);
}
}
else
{
IRC_COMMAND_CHECK_SERVER("join", 1);
if (ptr_channel && (ptr_channel->type == IRC_CHANNEL_TYPE_CHANNEL)
&& !ptr_channel->nicks)
{