route_replies: fix module to check if we are not connected to a network.

psychon gets credit for this code change.
This commit is contained in:
KindOne
2016-09-12 04:45:15 -04:00
parent 6a8fbbc933
commit 34db7be4ae

View File

@@ -294,7 +294,9 @@ class CRouteRepliesMod : public CModule {
EModRet OnUserRaw(CString& sLine) override {
CString sCmd = sLine.Token(0).AsUpper();
if (!GetNetwork()->GetIRCSock()) return CONTINUE;
if (!GetNetwork()->GetIRCSock() ||
!GetNetwork()->GetIRCSock()->IsConnected())
return CONTINUE;
if (sCmd.Equals("MODE")) {
// Check if this is a mode request that needs to be handled