Skip to content

Commit

Permalink
Fix crash on propogation after routed squit has reached it's destinat…
Browse files Browse the repository at this point in the history
…ion. Thx HiroP.

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7330 e03df62e-2008-0410-955e-edbf42e46eb7
  • Loading branch information
peavey committed Jun 15, 2007
1 parent 2bb87d9 commit 02c6ce1
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/modules/m_spanningtree/rsquit.cpp
Expand Up @@ -66,17 +66,20 @@ CmdResult cmd_rsquit::Handle (const char** parameters, int pcnt, userrec *user)
NoticeUser(user, "*** RSQUIT: Foolish mortal, you cannot make a server SQUIT itself! ("+ConvToStr(parameters[1])+" matches local server name)");
return CMD_FAILURE;
}
TreeSocket* sock = s->GetSocket();
if (!sock)
if (s)
{
NoticeUser(user, "*** RSQUIT: Server \002"+ConvToStr(parameters[1])+"\002 isn't connected to \002"+ConvToStr(parameters[0])+"\002.");
return CMD_FAILURE;
TreeSocket* sock = s->GetSocket();
if (!sock)
{
NoticeUser(user, "*** RSQUIT: Server \002"+ConvToStr(parameters[1])+"\002 isn't connected to \002"+ConvToStr(parameters[0])+"\002.");
return CMD_FAILURE;
}
ServerInstance->SNO->WriteToSnoMask('l',"Remote SQUIT from %s matching \002%s\002, squitting server \002%s\002",user->nick,parameters[0],parameters[1]);
const char* para[1];
para[0] = parameters[1];
std::string original_command = std::string("SQUIT ") + parameters[1];
Creator->OnPreCommand("SQUIT", para, 1, user, true, original_command);
}
ServerInstance->SNO->WriteToSnoMask('l',"Remote SQUIT from %s matching \002%s\002, squitting server \002%s\002",user->nick,parameters[0],parameters[1]);
const char* para[1];
para[0] = parameters[1];
std::string original_command = std::string("SQUIT ") + parameters[1];
Creator->OnPreCommand("SQUIT", para, 1, user, true, original_command);
}
}
else
Expand Down

0 comments on commit 02c6ce1

Please sign in to comment.