1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-02 15:53:12 +02:00

Fixed crash when entering text without any server connection

This commit is contained in:
Sebastien Helleu
2003-10-11 17:38:38 +00:00
parent 384b8780b0
commit 67428a1aaf
4 changed files with 10 additions and 6 deletions
+1
View File
@@ -5,6 +5,7 @@ ChangeLog - 2003-10-11
Version 0.0.3 (under dev!):
* fixed crash when entering text without any server connection
* fixed display bug (text was blinking when scrolling)
* new IRC command: /stats, /service, /squit, /motd, /lusers, /links, /time,
/trace, /admin, /info, /servlist, /squery, /who, /whowas, /die, /summon,
+4 -3
View File
@@ -675,7 +675,7 @@ user_command (t_irc_server *server, char *command)
{
t_irc_nick *ptr_nick;
if ((!command) || (command[0] == '\r') || (command[0] == '\n'))
if ((!command) || (!command[0]) || (command[0] == '\r') || (command[0] == '\n'))
return;
if ((command[0] == '/') && (command[1] != '/'))
{
@@ -686,7 +686,7 @@ user_command (t_irc_server *server, char *command)
{
if ((command[0] == '/') && (command[1] == '/'))
command++;
if (!WIN_IS_SERVER(gui_current_window))
if (server && (!WIN_IS_SERVER(gui_current_window)))
{
server_sendf (server, "PRIVMSG %s :%s\r\n",
CHANNEL(gui_current_window)->name,
@@ -725,7 +725,8 @@ user_command (t_irc_server *server, char *command)
}
}
else
gui_printf (server->window, _("This window is not a channel!\n"));
gui_printf ((server) ? server->window : NULL,
_("This window is not a channel!\n"));
}
}
+1
View File
@@ -5,6 +5,7 @@ ChangeLog - 2003-10-11
Version 0.0.3 (under dev!):
* fixed crash when entering text without any server connection
* fixed display bug (text was blinking when scrolling)
* new IRC command: /stats, /service, /squit, /motd, /lusers, /links, /time,
/trace, /admin, /info, /servlist, /squery, /who, /whowas, /die, /summon,
+4 -3
View File
@@ -675,7 +675,7 @@ user_command (t_irc_server *server, char *command)
{
t_irc_nick *ptr_nick;
if ((!command) || (command[0] == '\r') || (command[0] == '\n'))
if ((!command) || (!command[0]) || (command[0] == '\r') || (command[0] == '\n'))
return;
if ((command[0] == '/') && (command[1] != '/'))
{
@@ -686,7 +686,7 @@ user_command (t_irc_server *server, char *command)
{
if ((command[0] == '/') && (command[1] == '/'))
command++;
if (!WIN_IS_SERVER(gui_current_window))
if (server && (!WIN_IS_SERVER(gui_current_window)))
{
server_sendf (server, "PRIVMSG %s :%s\r\n",
CHANNEL(gui_current_window)->name,
@@ -725,7 +725,8 @@ user_command (t_irc_server *server, char *command)
}
}
else
gui_printf (server->window, _("This window is not a channel!\n"));
gui_printf ((server) ? server->window : NULL,
_("This window is not a channel!\n"));
}
}