* ---------------------------------------------------
*/
+/* $Core: libIRCDusers */
+
#include "inspircd.h"
#include <stdarg.h>
#include "socketengine.h"
server = (char*)Instance->FindServerNamePtr(Instance->Config->ServerName);
reset_due = ServerInstance->Time();
age = ServerInstance->Time(true);
+ Penalty = 0;
lines_in = lastping = signon = idle_lastmsg = nping = registered = 0;
ChannelCount = timeout = flood = bytes_in = bytes_out = cmds_in = cmds_out = 0;
- muted = exempt = haspassed = dns_done = false;
+ OverPenalty = ExemptFromPenalty = muted = exempt = haspassed = dns_done = false;
fd = -1;
recvq.clear();
sendq.clear();
{
try
{
- if (!recvq.length())
+ if (recvq.empty())
return "";
/* Strip any leading \r or \n off the string.
void User::QuitUser(InspIRCd* Instance, User *user, const std::string &quitreason, const char* operreason)
{
- user->Write("ERROR :Closing link (%s@%s) [%s]", user->ident, user->host, operreason);
+ Instance->Log(DEBUG,"QuitUser: %s '%s'", user->nick, quitreason.c_str());
+ user->Write("ERROR :Closing link (%s@%s) [%s]", user->ident, user->host, *operreason ? operreason : quitreason.c_str());
user->muted = true;
Instance->GlobalCulls.AddItem(user, quitreason.c_str(), operreason);
}
return;
}
+ Instance->Log(DEBUG,"New user fd: %d", socket);
+
int j = 0;
Instance->unregistered_count++;
{
if (!Instance->SE->AddFd(New))
{
+ Instance->Log(DEBUG,"Internal error on new connection");
User::QuitUser(Instance, New, "Internal error handling connection");
}
}
* BOPM and other stuff requires it.
*/
New->WriteServ("NOTICE Auth :*** Looking up your hostname...");
+
+ if (Instance->Config->NoUserDns)
+ {
+ New->dns_done = true;
+ }
+ else
+ {
+ New->StartDNSLookup();
+ }
}
unsigned long User::GlobalCloneCount()
return operquit ? operquit : "";
}
+void User::IncreasePenalty(int increase)
+{
+ this->Penalty += increase;
+}
+
+void User::DecreasePenalty(int decrease)
+{
+ this->Penalty -= decrease;
+}
+
VisData::VisData()
{
}