X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fuserprocess.cpp;h=42c3bd3db49aff8bd84fc971eb4a9a19e978b42c;hb=eb28eaea35d9d109a0b7b890de9d957d562da675;hp=b2c8034a328be45e86092e01d1940df05cabf751;hpb=89749a74402913d50bd5a9140757a383d6ff175e;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/userprocess.cpp b/src/userprocess.cpp index b2c8034a3..42c3bd3db 100644 --- a/src/userprocess.cpp +++ b/src/userprocess.cpp @@ -58,12 +58,8 @@ extern std::vector modules; extern std::vector factory; extern time_t TIME; extern time_t OLDTIME; -extern std::vector local_users; char data[65536]; -extern user_hash clientlist; -extern chan_hash chanlist; - void InspIRCd::ProcessUser(userrec* cu) { int result = EAGAIN; @@ -151,7 +147,7 @@ void InspIRCd::ProcessUser(userrec* cu) { log(DEFAULT,"Excess flood from: %s!%s@%s",current->nick,current->ident,current->host); WriteOpers("*** Excess flood from: %s!%s@%s",current->nick,current->ident,current->host); - userrec::QuitUser(current,"Excess flood"); + userrec::QuitUser(this, current,"Excess flood"); return; } else @@ -175,7 +171,7 @@ void InspIRCd::ProcessUser(userrec* cu) { if (current->registered == REG_ALL) { - userrec::QuitUser(current,"RecvQ exceeded"); + userrec::QuitUser(this, current,"RecvQ exceeded"); } else { @@ -201,7 +197,7 @@ void InspIRCd::ProcessUser(userrec* cu) { log(DEFAULT,"Excess flood from: %s!%s@%s",current->nick,current->ident,current->host); WriteOpers("*** Excess flood from: %s!%s@%s",current->nick,current->ident,current->host); - userrec::QuitUser(current,"Excess flood"); + userrec::QuitUser(this, current,"Excess flood"); return; } @@ -211,7 +207,7 @@ void InspIRCd::ProcessUser(userrec* cu) { log(DEFAULT,"Excess flood from: %s!%s@%s",current->nick,current->ident,current->host); WriteOpers("*** Excess flood from: %s!%s@%s",current->nick,current->ident,current->host); - userrec::QuitUser(current,"Excess flood"); + userrec::QuitUser(this, current,"Excess flood"); } else { @@ -256,7 +252,7 @@ void InspIRCd::ProcessUser(userrec* cu) if ((result == -1) && (errno != EAGAIN) && (errno != EINTR)) { log(DEBUG,"killing: %s",cu->nick); - userrec::QuitUser(cu,strerror(errno)); + userrec::QuitUser(this,cu,strerror(errno)); return; } } @@ -269,7 +265,7 @@ void InspIRCd::ProcessUser(userrec* cu) else if (result == 0) { log(DEBUG,"InspIRCd: Exited: %s",cu->nick); - userrec::QuitUser(cu,"Client exited"); + userrec::QuitUser(this,cu,"Client exited"); log(DEBUG,"Bailing from client exit"); return; } @@ -310,12 +306,12 @@ void InspIRCd::DoBackgroundUserStuff(time_t TIME) CullList GlobalGoners; /* XXX: IT IS NOT SAFE TO USE AN ITERATOR HERE. DON'T EVEN THINK ABOUT IT. */ - for (unsigned long count2 = 0; count2 != local_users.size(); count2++) + for (unsigned long count2 = 0; count2 != this->local_users.size(); count2++) { - if (count2 >= local_users.size()) + if (count2 >= this->local_users.size()) break; - userrec* curr = local_users[count2]; + userrec* curr = this->local_users[count2]; if (curr) {