Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Pryan committed Oct 27, 2019
1 parent fbe0a85 commit 1435e7a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
3 changes: 1 addition & 2 deletions src/Parse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/ParserServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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) {
Expand Down
8 changes: 3 additions & 5 deletions src/operserv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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]);
Expand Down

0 comments on commit 1435e7a

Please sign in to comment.