diff --git a/src/Parse.cpp b/src/Parse.cpp index 252bc21d4..8b300a36c 100644 --- a/src/Parse.cpp +++ b/src/Parse.cpp @@ -199,8 +199,7 @@ void LocalUser::Parse(std::string message) bForce[nickname] = 0; LocalUser* target = Mainframe::instance()->getLocalUserByName(nickname); if (target) { - target->Close(); - Server::Send("QUIT " + target->mNickName); + target->Exit(); } else { RemoteUser* target = Mainframe::instance()->getRemoteUserByName(nickname); if (target) { diff --git a/src/ParserServer.cpp b/src/ParserServer.cpp index 65124d138..db80f180b 100644 --- a/src/ParserServer.cpp +++ b/src/ParserServer.cpp @@ -80,7 +80,7 @@ void Server::Parse(std::string message) } LocalUser* target = Mainframe::instance()->getLocalUserByName(x[1]); if (target) { - target->Close(); + target->Exit(); } else { RemoteUser *user = new RemoteUser(x[7]); user->mNickName = x[1]; @@ -460,7 +460,7 @@ void Server::Parse(std::string message) } else { LocalUser *lu = Mainframe::instance()->getLocalUserByName(x[1]); if (lu != nullptr) { - lu->Close(); + lu->Exit(); } else { RemoteUser *ru = Mainframe::instance()->getRemoteUserByName(x[1]); if (ru != nullptr) { diff --git a/src/operserv.cpp b/src/operserv.cpp index e4dc890ba..9b24f8bae 100644 --- a/src/operserv.cpp +++ b/src/operserv.cpp @@ -80,8 +80,7 @@ void OperServ::Message(LocalUser *user, string message) { auto lusers = Mainframe::instance()->LocalUsers(); for (auto it = lusers.begin(); it != lusers.end();) { if ((*it).second->mHost == split[2]) { - (*it).second->Close(); - Server::Send("SKILL " + (*it).second->mNickName); + (*it).second->Exit(); it = lusers.erase(it); continue; } @@ -178,7 +177,7 @@ void OperServ::Message(LocalUser *user, string message) { auto it = local.begin(); for (; it != local.end(); it++) { if ((*it).second->mHost == split[2]) - (*it).second->Close(); + (*it).second->Exit(); } auto remote = Mainframe::instance()->RemoteUsers(); auto it2 = remote.begin(); @@ -244,8 +243,7 @@ void OperServ::Message(LocalUser *user, string message) { else { LocalUser *lu = Mainframe::instance()->getLocalUserByName(split[1]); if (lu != nullptr) { - lu->Close(); - Server::Send("SKILL " + lu->mNickName); + lu->Exit(); oper.GlobOPs(Utils::make_string("", "The nick %s has been KILLed by %s.", lu->mNickName.c_str(), user->mNickName.c_str())); } else { RemoteUser *ru = Mainframe::instance()->getRemoteUserByName(split[1]);