Fix irc plugin crash

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5365 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2018-12-10 22:59:13 +00:00
parent 1f587af822
commit 4d6bd82a2f

View file

@ -393,15 +393,9 @@ qintptr_t Plug_Init(qintptr_t *args)
Plug_Export("ConsoleLink", IRC_ConsoleLink); Plug_Export("ConsoleLink", IRC_ConsoleLink);
if (!Plug_Export("ConExecuteCommand", IRC_ConExecuteCommand)) if (!Plug_Export("ConExecuteCommand", IRC_ConExecuteCommand))
{
pCon_Print("IRC Client Plugin Loaded in single-console mode\n");
Con_TrySubPrint = Con_FakeSubPrint; Con_TrySubPrint = Con_FakeSubPrint;
}
else else
{
pCon_Print("IRC Client Plugin Loaded. ^[/"COMMANDNAME" /help^] for help\n");
Con_TrySubPrint = pCon_SubPrint; Con_TrySubPrint = pCon_SubPrint;
}
reloadconfig = true; reloadconfig = true;
IRC_InitCvars(); IRC_InitCvars();
@ -696,7 +690,10 @@ static void IRC_MakeDefault(ircclient_t *irc)
for (link = &ircclients; *link; link = &(*link)->next) for (link = &ircclients; *link; link = &(*link)->next)
{ {
if (*link == irc) if (*link == irc)
{
*link = irc->next; *link = irc->next;
break;
}
} }
irc->next = ircclients; irc->next = ircclients;