summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar brain2007-01-15 23:49:24 +0000
committerGravatar brain2007-01-15 23:49:24 +0000
commitd769fef63f2f9ccd929aa51fda3c3da7ec389181 (patch)
treed8277ddfdbb86a4825ec09e3ac8011a9fdffa51f
parentRemove some debug (im on a crusade to make debug mode useful, but at the same... (diff)
Crusade to remove debug from stable and tested parts of the core and base modules.
Most of the code here being de-noised hasnt had a crash or bug in it for many months, if not a year so the debug output is useless noise in the logfile when trying to trace a bug in a REAL problem area. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6356 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/channels.cpp22
-rw-r--r--src/cmd_nick.cpp19
-rw-r--r--src/dns.cpp43
-rw-r--r--src/inspircd.cpp10
-rw-r--r--src/mode.cpp22
-rw-r--r--src/modules/m_chanprotect.cpp18
-rw-r--r--src/modules/m_conn_umodes.cpp3
-rw-r--r--src/modules/m_opermodes.cpp2
-rw-r--r--src/modules/m_override.cpp7
-rw-r--r--src/socket.cpp24
-rw-r--r--src/socketengine_epoll.cpp32
-rw-r--r--src/socketengine_kqueue.cpp34
-rw-r--r--src/socketengine_select.cpp14
-rw-r--r--src/userprocess.cpp4
-rw-r--r--src/users.cpp26
15 files changed, 23 insertions, 257 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index 6a4973b07..5383f4aba 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -37,21 +37,12 @@ void chanrec::SetMode(char mode,bool mode_on)
void chanrec::SetModeParam(char mode,const char* parameter,bool mode_on)
{
- ServerInstance->Log(DEBUG,"SetModeParam called");
-
CustomModeList::iterator n = custom_mode_params.find(mode);
if (mode_on)
{
if (n == custom_mode_params.end())
- {
custom_mode_params[mode] = strdup(parameter);
- ServerInstance->Log(DEBUG,"Custom mode parameter %c %s added",mode,parameter);
- }
- else
- {
- ServerInstance->Log(DEBUG, "Tried to set custom mode parameter for %c '%s' when it was already '%s'", mode, parameter, n->second);
- }
}
else
{
@@ -225,7 +216,6 @@ chanrec* chanrec::JoinUser(InspIRCd* Instance, userrec *user, const char* cn, bo
*Ptr->topic = 0;
*Ptr->setby = 0;
Ptr->topicset = 0;
- Instance->Log(DEBUG,"chanrec::JoinUser(): created: %s",cname);
new_channel = true;
}
else
@@ -303,10 +293,6 @@ chanrec* chanrec::JoinUser(InspIRCd* Instance, userrec *user, const char* cn, bo
}
}
}
- else
- {
- Instance->Log(DEBUG,"chanrec::JoinUser(): Overridden checks");
- }
}
/* NOTE: If the user is an oper here, we can extend their user->chans by up to
@@ -335,7 +321,6 @@ chanrec* chanrec::JoinUser(InspIRCd* Instance, userrec *user, const char* cn, bo
if (new_channel)
{
- Instance->Log(DEBUG,"BLAMMO, Whacking channel.");
/* Things went seriously pear shaped, so take this away. bwahaha. */
chan_hash::iterator n = Instance->chanlist->find(cname);
if (n != Instance->chanlist->end())
@@ -464,7 +449,6 @@ long chanrec::PartUser(userrec *user, const char* reason)
/* kill the record */
if (iter != ServerInstance->chanlist->end())
{
- ServerInstance->Log(DEBUG,"del_channel: destroyed: %s", this->name);
FOREACH_MOD(I_OnChannelDelete,OnChannelDelete(this));
ServerInstance->chanlist->erase(iter);
}
@@ -809,12 +793,9 @@ void chanrec::UserList(userrec *user)
return;
FOREACH_RESULT(I_OnUserList,OnUserList(user, this));
- ServerInstance->Log(DEBUG,"MOD_RESULT for UserList = %d",MOD_RESULT);
if (MOD_RESULT == 1)
return;
- ServerInstance->Log(DEBUG,"Using builtin NAMES list generation");
-
dlen = curlen = snprintf(list,MAXBUF,"353 %s = %s :", user->nick, this->name);
int numusers = 0;
@@ -989,7 +970,6 @@ int chanrec::GetStatus(userrec *user)
void chanrec::SetPrefix(userrec* user, char prefix, unsigned int prefix_value, bool adding)
{
- ServerInstance->Log(DEBUG,"Setting prefix: %c on user %s in %s to %d", prefix, user->nick, this->name, adding);
prefixlist::iterator n = prefixes.find(user);
prefixtype pfx = std::make_pair(prefix,prefix_value);
if (adding)
@@ -1023,7 +1003,6 @@ void chanrec::SetPrefix(userrec* user, char prefix, unsigned int prefix_value, b
n->second.erase(x);
}
}
- ServerInstance->Log(DEBUG,"Added prefix %c to %s for %s, prefixlist size is now %d", prefix, this->name, user->nick, prefixes.size());
}
void chanrec::RemoveAllPrefixes(userrec* user)
@@ -1031,7 +1010,6 @@ void chanrec::RemoveAllPrefixes(userrec* user)
prefixlist::iterator n = prefixes.find(user);
if (n != prefixes.end())
{
- ServerInstance->Log(DEBUG,"Removed prefixes from %s for %s, prefixlist size is now %d", this->name, user->nick, prefixes.size());
prefixes.erase(n);
}
}
diff --git a/src/cmd_nick.cpp b/src/cmd_nick.cpp
index 19d970d53..3cfebea2b 100644
--- a/src/cmd_nick.cpp
+++ b/src/cmd_nick.cpp
@@ -29,17 +29,12 @@ CmdResult cmd_nick::Handle (const char** parameters, int pcnt, userrec *user)
{
char oldnick[NICKMAX];
- if (!parameters[0][0])
- {
- ServerInstance->Log(DEBUG,"zero length new nick passed to handle_nick");
+ if (!*parameters[0])
return CMD_FAILURE;
- }
+
if (!*user->nick)
- {
- ServerInstance->Log(DEBUG,"invalid old nick passed to handle_nick");
return CMD_FAILURE;
- }
- ServerInstance->Log(DEBUG,"Fall through");
+
if (irc::string(user->nick) == irc::string(parameters[0]))
{
/* If its exactly the same, even case, dont do anything. */
@@ -50,7 +45,6 @@ CmdResult cmd_nick::Handle (const char** parameters, int pcnt, userrec *user)
* able to do silly things like this even though the RFC says
* the nick AAA is the same as the nick aaa.
*/
- ServerInstance->Log(DEBUG,"old nick is new nick, not updating hash (case change only)");
strlcpy(oldnick, user->nick, NICKMAX - 1);
int MOD_RESULT = 0;
FOREACH_RESULT(I_OnUserPreNick,OnUserPreNick(user,parameters[0]));
@@ -118,16 +112,9 @@ CmdResult cmd_nick::Handle (const char** parameters, int pcnt, userrec *user)
user->InvalidateCache();
- ServerInstance->Log(DEBUG,"new nick set: %s",user->nick);
-
if (user->registered < REG_NICKUSER)
{
user->registered = (user->registered | REG_NICK);
- // dont attempt to look up the dns until they pick a nick... because otherwise their pointer WILL change
- // and unless we're lucky we'll get a duff one later on.
- //user->dns_done = (!lookup_dns(user->nick));
- //if (user->dns_done)
- // ServerInstance->Log(DEBUG,"Aborting dns lookup of %s because dns server experienced a failure.",user->nick);
if (ServerInstance->Config->NoUserDns)
{
diff --git a/src/dns.cpp b/src/dns.cpp
index 625951ee5..ab7f00ff3 100644
--- a/src/dns.cpp
+++ b/src/dns.cpp
@@ -126,7 +126,6 @@ class RequestTimeout : public InspTimer
public:
RequestTimeout(unsigned long n, InspIRCd* SI, DNSRequest* watching, int id) : InspTimer(n, time(NULL)), ServerInstance(SI), watch(watching), watchid(id)
{
- ServerInstance->Log(DEBUG, "New DNS timeout set on %08x", watching);
}
void Tick(time_t TIME)
@@ -141,11 +140,9 @@ class RequestTimeout : public InspTimer
ServerInstance->Res->Classes[watchid] = NULL;
}
ServerInstance->Res->requests[watchid] = NULL;
- delete watch;
- ServerInstance->Log(DEBUG, "DNS timeout on %08x squished pointer", watch);
+ DELETE(watch);
return;
}
- ServerInstance->Log(DEBUG, "DNS timeout on %08x: result already received!", watch);
}
};
@@ -290,7 +287,6 @@ int DNS::PruneCache()
delete this->cache;
this->cache = newcache;
- ServerInstance->Log(DEBUG,"Prune %d expired cache items", n);
return n;
}
@@ -326,11 +322,6 @@ void DNS::Rehash()
ServerInstance->Log(DEFAULT," to a true IPv6 environment.");
this->ip6munge = true;
}
- ServerInstance->Log(DEBUG,"Added nameserver '%s'",ServerInstance->Config->DNSServer);
- }
- else
- {
- ServerInstance->Log(DEBUG,"GACK! insp_aton says the nameserver '%s' is invalid!",ServerInstance->Config->DNSServer);
}
/* Initialize mastersocket */
@@ -346,10 +337,6 @@ void DNS::Rehash()
this->SetFd(-1);
}
}
- else
- {
- ServerInstance->Log(DEBUG,"I cant socket() this socket! (%s)",strerror(errno));
- }
/* Have we got a socket and is it nonblocking? */
if (this->GetFd() != -1)
@@ -371,7 +358,6 @@ void DNS::Rehash()
if (bind(this->GetFd(),(sockaddr *)&addr,sizeof(addr)) != 0)
{
/* Failed to bind */
- ServerInstance->Log(DEBUG,"Cant bind DNS fd");
shutdown(this->GetFd(),2);
close(this->GetFd());
this->SetFd(-1);
@@ -379,7 +365,6 @@ void DNS::Rehash()
if (this->GetFd() >= 0)
{
- ServerInstance->Log(DEBUG,"Add master socket %d",this->GetFd());
/* Hook the descriptor into the socket engine */
if (ServerInstance && ServerInstance->SE)
{
@@ -398,8 +383,6 @@ void DNS::Rehash()
/** Initialise the DNS UDP socket so that we can send requests */
DNS::DNS(InspIRCd* Instance) : ServerInstance(Instance)
{
- ServerInstance->Log(DEBUG,"DNS::DNS: Instance = %08x",Instance);
-
/* Clear the Resolver class table */
memset(Classes,0,sizeof(Classes));
@@ -584,8 +567,6 @@ int DNS::GetNameForce(const char *ip, ForceProtocol fp)
return -1;
}
- ServerInstance->Log(DEBUG,"DNS::GetNameForce: %s %d",query, fp);
-
if ((length = this->MakePayload(query, DNS_QUERY_PTR, 1, (unsigned char*)&h.payload)) == -1)
return -1;
@@ -633,14 +614,10 @@ DNSResult DNS::GetResult()
int length = recvfrom(this->GetFd(),buffer,sizeof(DNSHeader),0,&from,&x);
- if (length < 0)
- ServerInstance->Log(DEBUG,"Error in recvfrom()! (%s)",strerror(errno));
-
/* Did we get the whole header? */
if (length < 12)
{
/* Nope - something screwed up. */
- ServerInstance->Log(DEBUG,"Whole header not read!");
return DNSResult(-1,"",0,"");
}
@@ -668,7 +645,6 @@ DNSResult DNS::GetResult()
{
if ((port_from != DNS::QUERY_PORT) || (strcasecmp(ipaddr_from, ServerInstance->Config->DNSServer)))
{
- ServerInstance->Log(DEBUG,"port %d is not 53, or %s is not %s",port_from, ipaddr_from, ServerInstance->Config->DNSServer);
return DNSResult(-1,"",0,"");
}
}
@@ -686,7 +662,6 @@ DNSResult DNS::GetResult()
if (!requests[this_id])
{
/* Somehow we got a DNS response for a request we never made... */
- ServerInstance->Log(DEBUG,"DNS: got a response for a query we didnt send with fd=%d queryid=%d",this->GetFd(),this_id);
return DNSResult(-1,"",0,"");
}
else
@@ -773,7 +748,6 @@ DNSResult DNS::GetResult()
break;
default:
- ServerInstance->Log(DEBUG,"WARNING: Somehow we made a request for a DNS_QUERY_PTR4 or DNS_QUERY_PTR6, but these arent real rr types!");
break;
}
@@ -962,8 +936,6 @@ void Resolver::TriggerCachedResult()
/** High level abstraction of dns used by application at large */
Resolver::Resolver(InspIRCd* Instance, const std::string &source, QueryType qt, bool &cached, Module* creator) : ServerInstance(Instance), Creator(creator), input(source), querytype(qt)
{
- ServerInstance->Log(DEBUG,"Instance: %08x %08x",Instance, ServerInstance);
-
cached = false;
CQ = ServerInstance->Res->GetCache(source);
@@ -972,13 +944,11 @@ Resolver::Resolver(InspIRCd* Instance, const std::string &source, QueryType qt,
time_left = CQ->CalcTTLRemaining();
if (!time_left)
{
- ServerInstance->Log(DEBUG,"Cached but EXPIRED result: %s", CQ->data.c_str());
ServerInstance->Res->DelCache(source);
}
else
{
cached = true;
- ServerInstance->Log(DEBUG,"Cached result: %s", CQ->data.c_str());
return;
}
}
@@ -1029,14 +999,11 @@ Resolver::Resolver(InspIRCd* Instance, const std::string &source, QueryType qt,
}
if (this->myid == -1)
{
- ServerInstance->Log(DEBUG,"Resolver::Resolver: Could not get an id!");
this->OnError(RESOLVER_NSDOWN, "Nameserver is down");
throw ModuleException("Resolver: Couldnt get an id to make a request");
/* We shouldnt get here really */
return;
}
-
- ServerInstance->Log(DEBUG,"Resolver::Resolver: this->myid=%d",this->myid);
}
/** Called when an error occurs */
@@ -1076,7 +1043,6 @@ void DNS::HandleEvent(EventType et, int errornum)
/* Mask off the error bit */
res.id -= ERROR_MASK;
/* Marshall the error to the correct class */
- ServerInstance->Log(DEBUG,"Error available, id=%d",res.id);
if (Classes[res.id])
{
if (ServerInstance && ServerInstance->stats)
@@ -1088,19 +1054,14 @@ void DNS::HandleEvent(EventType et, int errornum)
}
else
{
- /* It is a non-error result */
- ServerInstance->Log(DEBUG,"Result available, id=%d",res.id);
- /* Marshall the result to the correct class */
+ /* It is a non-error result, marshall the result to the correct class */
if (Classes[res.id])
{
if (ServerInstance && ServerInstance->stats)
ServerInstance->stats->statsDnsGood++;
if (!this->GetCache(res.original.c_str()))
- {
- ServerInstance->Log(DEBUG,"Caching result: %s->%s for %lu secs", res.original.c_str(), res.result.c_str(), res.ttl);
this->cache->insert(std::make_pair(res.original.c_str(), CachedQuery(res.result, res.ttl)));
- }
Classes[res.id]->OnLookupComplete(res.result, res.ttl, false);
delete Classes[res.id];
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index b75a91715..ce083b3b9 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -41,8 +41,6 @@ InspIRCd* SI = NULL;
void InspIRCd::AddServerName(const std::string &servername)
{
- this->Log(DEBUG,"Adding server name: %s",servername.c_str());
-
if(find(servernames.begin(), servernames.end(), servername) == servernames.end())
servernames.push_back(servername); /* Wasn't already there. */
}
@@ -409,10 +407,8 @@ InspIRCd::InspIRCd(int argc, char** argv)
/* Add the listening sockets used for client inbound connections
* to the socket engine
*/
- this->Log(DEBUG,"%d listeners",stats->BoundPortCount);
for (unsigned long count = 0; count < stats->BoundPortCount; count++)
{
- this->Log(DEBUG,"Add listener: %d",Config->openSockfd[count]->GetFd());
if (!SE->AddFd(Config->openSockfd[count]))
{
printf("\nEH? Could not add listener to socketengine. You screwed up, aborting.\n");
@@ -531,10 +527,6 @@ void InspIRCd::MoveTo(std::string modulename,int slot)
Config->implement_lists[slot][n] = x;
}
}
- else
- {
- this->Log(DEBUG,"Move of %s to slot failed!",modulename.c_str());
- }
}
void InspIRCd::MoveAfter(std::string modulename, std::string after)
@@ -700,8 +692,6 @@ bool InspIRCd::LoadModule(const char* filename)
snprintf(MODERR,MAXBUF,"Module %s is not within the modules directory.",modfile);
return false;
}
- this->Log(DEBUG,"Loading module: %s",modfile);
-
if (ServerConfig::FileExists(modfile))
{
diff --git a/src/mode.cpp b/src/mode.cpp
index 213bcd820..5e9dc1233 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -185,7 +185,6 @@ const char* ModeParser::Grant(userrec *d,chanrec *chan,int MASK)
{
if (n->second & MASK)
{
- ServerInstance->Log(DEBUG,"User already has privilage %d (privset: %d)", MASK, n->second);
return "";
}
n->second = n->second | MASK;
@@ -201,13 +200,8 @@ const char* ModeParser::Grant(userrec *d,chanrec *chan,int MASK)
n->first->AddVoicedUser(d);
break;
}
- ServerInstance->Log(DEBUG,"grant: %s %s",n->first->name,d->nick);
return d->nick;
}
- else
- {
- ServerInstance->Log(DEBUG,"Channel %s not in users joined list", chan->name);
- }
return "";
}
@@ -236,7 +230,6 @@ const char* ModeParser::Revoke(userrec *d,chanrec *chan,int MASK)
n->first->DelVoicedUser(d);
break;
}
- ServerInstance->Log(DEBUG,"revoke: %s %s",n->first->name,d->nick);
return d->nick;
}
return "";
@@ -281,8 +274,6 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool
chanrec* targetchannel = ServerInstance->FindChan(parameters[0]);
userrec* targetuser = ServerInstance->FindNick(parameters[0]);
- ServerInstance->Log(DEBUG,"ModeParser::Process start: pcnt=%d",pcnt);
-
LastParse = "";
/* Special case for displaying the list for listmodes,
@@ -290,7 +281,6 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool
*/
if ((targetchannel) && (pcnt == 2))
{
- ServerInstance->Log(DEBUG,"Spool list");
const char* mode = parameters[1];
mask = MASK_CHANNEL;
@@ -330,13 +320,10 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool
if (pcnt == 1)
{
- ServerInstance->Log(DEBUG,"Mode list request");
this->DisplayCurrentModes(user, targetuser, targetchannel, parameters[0]);
}
else if (pcnt > 1)
{
- ServerInstance->Log(DEBUG,"More than one parameter");
-
if (targetchannel)
{
type = MODETYPE_CHANNEL;
@@ -349,8 +336,6 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool
if ((IS_LOCAL(user)) && (targetchannel->GetStatus(user) < STATUS_HOP))
{
/* We don't have halfop */
- ServerInstance->Log(DEBUG,"The user is not a halfop or above, checking other reasons for being able to set the modes");
-
int MOD_RESULT = 0;
FOREACH_RESULT(I_OnAccessCheck,OnAccessCheck(user, NULL, targetchannel, AC_GENERAL_MODE));
if (MOD_RESULT == ACR_DENY)
@@ -458,7 +443,6 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool
/* This mode expects a parameter, do we have any parameters left in our list to use? */
if (parameter_counter < pcnt)
{
- ServerInstance->Log(DEBUG,"parameter_counter = %d, pcnt = %d", parameter_counter, pcnt);
parameter = parameters[parameter_counter++];
/* Yerk, invalid! */
@@ -588,7 +572,6 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool
{
if (type == MODETYPE_CHANNEL)
{
- ServerInstance->Log(DEBUG,"Write output sequence and parameters to channel: %s %s%s",targetchannel->name,output_sequence.c_str(),parameter_list.str().c_str());
targetchannel->WriteChannel(user,"MODE %s %s%s",targetchannel->name,output_sequence.c_str(),parameter_list.str().c_str());
FOREACH_MOD(I_OnMode,OnMode(user, targetchannel, TYPE_CHANNEL, output_sequence + parameter_list.str()));
this->LastParse = targetchannel->name;
@@ -672,7 +655,6 @@ bool ModeParser::AddMode(ModeHandler* mh, unsigned const char modeletter)
return false;
modehandlers[pos] = mh;
- ServerInstance->Log(DEBUG,"ModeParser::AddMode: added mode %c",mh->GetModeChar());
return true;
}
@@ -912,8 +894,6 @@ bool ModeParser::AddModeWatcher(ModeWatcher* mw)
pos = (mw->GetModeChar()-65) | mask;
modewatchers[pos].push_back(mw);
- ServerInstance->Log(DEBUG,"ModeParser::AddModeWatcher: watching mode %c",mw->GetModeChar());
-
return true;
}
@@ -935,12 +915,10 @@ bool ModeParser::DelModeWatcher(ModeWatcher* mw)
if (a == modewatchers[pos].end())
{
- ServerInstance->Log(DEBUG, "ModeParser::DelModeWatcher: Couldn't find watcher for mode %c in list", mw->GetModeChar());
return false;
}
modewatchers[pos].erase(a);
- ServerInstance->Log(DEBUG,"ModeParser::DelModeWatcher: stopped watching mode %c",mw->GetModeChar());
return true;
}
diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp
index f7c05572f..a1d580180 100644
--- a/src/modules/m_chanprotect.cpp
+++ b/src/modules/m_chanprotect.cpp
@@ -372,10 +372,7 @@ class ModuleChanProtect : public Module
// to make it clearer that +q has been given, send that one user the +q notice
// so that their client's syncronization and their sanity are left intact.
user->WriteServ("MODE %s +q %s",channel->name,user->nick);
- if (user->Extend("cm_founder_"+std::string(channel->name),fakevalue))
- {
- ServerInstance->Log(DEBUG,"Marked user "+std::string(user->nick)+" as founder for "+std::string(channel->name));
- }
+ user->Extend("cm_founder_"+std::string(channel->name),fakevalue);
}
}
}
@@ -385,8 +382,6 @@ class ModuleChanProtect : public Module
// here we perform access checks, this is the important bit that actually stops kicking/deopping
// etc of protected users. There are many types of access check, we're going to handle
// a relatively small number of them relevent to our module using a switch statement.
-
- ServerInstance->Log(DEBUG,"chanprotect OnAccessCheck %d",access_type);
// don't allow action if:
// (A) Theyre founder (no matter what)
// (B) Theyre protected, and you're not
@@ -397,10 +392,7 @@ class ModuleChanProtect : public Module
// firstly, if a ulined nick, or a server, is setting the mode, then allow them to set the mode
// without any access checks, we're not worthy :p
if ((ServerInstance->ULine(source->nick)) || (ServerInstance->ULine(source->server)) || (!*source->server))
- {
- ServerInstance->Log(DEBUG,"chanprotect OnAccessCheck returns ALLOW");
return ACR_ALLOW;
- }
std::string founder = "cm_founder_"+std::string(channel->name);
std::string protect = "cm_protect_"+std::string(channel->name);
@@ -409,17 +401,11 @@ class ModuleChanProtect : public Module
{
// a user has been deopped. Do we let them? hmmm...
case AC_DEOP:
- ServerInstance->Log(DEBUG,"OnAccessCheck AC_DEOP");
if (dest->GetExt(founder,dummyptr))
{
- ServerInstance->Log(DEBUG,"Has %s",founder.c_str());
source->WriteServ("484 "+std::string(source->nick)+" "+std::string(channel->name)+" :Can't deop "+std::string(dest->nick)+" as they're a channel founder");
return ACR_DENY;
}
- else
- {
- ServerInstance->Log(DEBUG,"Doesnt have %s",founder.c_str());
- }
if ((dest->GetExt(protect,dummyptr)) && (!source->GetExt(protect,dummyptr)))
{
source->WriteServ("484 "+std::string(source->nick)+" "+std::string(channel->name)+" :Can't deop "+std::string(dest->nick)+" as they're protected (+a)");
@@ -429,7 +415,6 @@ class ModuleChanProtect : public Module
// a user is being kicked. do we chop off the end of the army boot?
case AC_KICK:
- ServerInstance->Log(DEBUG,"OnAccessCheck AC_KICK");
if (dest->GetExt(founder,dummyptr))
{
source->WriteServ("484 "+std::string(source->nick)+" "+std::string(channel->name)+" :Can't kick "+std::string(dest->nick)+" as they're a channel founder");
@@ -472,7 +457,6 @@ class ModuleChanProtect : public Module
}
// we dont know what this access check is, or dont care. just carry on, nothing to see here.
- ServerInstance->Log(DEBUG,"chanprotect OnAccessCheck returns DEFAULT");
return ACR_DEFAULT;
}
diff --git a/src/modules/m_conn_umodes.cpp b/src/modules/m_conn_umodes.cpp
index 1b6bbe66d..2226f9776 100644
--- a/src/modules/m_conn_umodes.cpp
+++ b/src/modules/m_conn_umodes.cpp
@@ -61,13 +61,11 @@ class ModuleModesOnConnect : public Module
if (!IS_LOCAL(user))
return;
- ServerInstance->Log(DEBUG,"Post connect for mode setting");
for (int j = 0; j < Conf->Enumerate("connect"); j++)
{
std::string hostn = Conf->ReadValue("connect","allow",j);
if ((match(user->GetIPString(),hostn.c_str(),true)) || (match(user->host,hostn.c_str())))
{
- ServerInstance->Log(DEBUG,"Found matching connect block '%s'",hostn.c_str());
std::string ThisModes = Conf->ReadValue("connect","modes",j);
if (ThisModes != "")
{
@@ -96,7 +94,6 @@ class ModuleModesOnConnect : public Module
}
}
- ServerInstance->Log(DEBUG,"Call mode handler to set modes");
ServerInstance->Parser->CallHandler("MODE", modes, size, user);
}
break;
diff --git a/src/modules/m_opermodes.cpp b/src/modules/m_opermodes.cpp
index dbc34bcb5..57eb8ae23 100644
--- a/src/modules/m_opermodes.cpp
+++ b/src/modules/m_opermodes.cpp
@@ -93,7 +93,6 @@ class ModuleModesOnOper : public Module
for (unsigned int k = 1; k < tokens.size(); k++)
{
modes[i] = (char*)tokens[k].c_str();
- ServerInstance->Log(DEBUG, "m_opermodes.so: got mode param: %s", modes[i]);
i++;
}
}
@@ -106,7 +105,6 @@ class ModuleModesOnOper : public Module
n.push_back(modes[j]);
}
rmode.Send(ServerInstance);
- ServerInstance->Log(DEBUG, "m_opermodes.so: new modes for %s: %s", modes[0], modes[1]);
ServerInstance->SendMode(modes, size, user);
}
break;
diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp
index d86f87b2a..e68d3f760 100644
--- a/src/modules/m_override.cpp
+++ b/src/modules/m_override.cpp
@@ -131,7 +131,6 @@ class ModuleOverride : public Module
switch (access_type)
{
case AC_DEOP:
- ServerInstance->Log(DEBUG,"Override access check AC_DEOP");
if (CanOverride(source,"MODEDEOP"))
{
if (NoisyOverride)
@@ -145,7 +144,6 @@ class ModuleOverride : public Module
}
break;
case AC_OP:
- ServerInstance->Log(DEBUG,"Override access check AC_OP");
if (CanOverride(source,"MODEOP"))
{
if (NoisyOverride)
@@ -159,7 +157,6 @@ class ModuleOverride : public Module
}
break;
case AC_VOICE:
- ServerInstance->Log(DEBUG,"Override access check AC_VOICE");
if (CanOverride(source,"MODEVOICE"))
{
if (NoisyOverride)
@@ -173,7 +170,6 @@ class ModuleOverride : public Module
}
break;
case AC_DEVOICE:
- ServerInstance->Log(DEBUG,"Override access check AC_DEVOICE");
if (CanOverride(source,"MODEDEVOICE"))
{
if (NoisyOverride)
@@ -187,7 +183,6 @@ class ModuleOverride : public Module
}
break;
case AC_HALFOP:
- ServerInstance->Log(DEBUG,"Override access check AC_HALFOP");
if (CanOverride(source,"MODEHALFOP"))
{
if (NoisyOverride)
@@ -201,7 +196,6 @@ class ModuleOverride : public Module
}
break;
case AC_DEHALFOP:
- ServerInstance->Log(DEBUG,"Override access check AC_DEHALFOP");
if (CanOverride(source,"MODEDEHALFOP"))
{
if (NoisyOverride)
@@ -221,7 +215,6 @@ class ModuleOverride : public Module
if (NoisyOverride)
if ((!channel->HasUser(source)) || (mode < STATUS_OP))
{
- ServerInstance->Log(DEBUG,"Overridden mode");
OverriddenMode = true;
OverOps = OverDeops = OverVoices = OverDevoices = OverHalfops = OverDehalfops = 0;
}
diff --git a/src/socket.cpp b/src/socket.cpp
index 9345af224..472d58c2e 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -39,12 +39,8 @@ const char inverted_bits[8] = { 0x00, /* 00000000 - 0 bits - never actually used
ListenSocket::ListenSocket(InspIRCd* Instance, int sockfd, insp_sockaddr client, insp_sockaddr server, int port, char* addr) : ServerInstance(Instance), desc("plaintext")
{
this->SetFd(sockfd);
- Instance->Log(DEBUG,"Binding to port %s:%d",addr,port);
if (!Instance->BindSocket(this->fd,client,server,port,addr))
- {
- Instance->Log(DEBUG,"Binding failed!");
this->fd = -1;
- }
}
ListenSocket::~ListenSocket()
@@ -64,9 +60,6 @@ void ListenSocket::HandleEvent(EventType et, int errornum)
insp_sockaddr client;
socklen_t length;
int incomingSockfd, in_port;
-
- ServerInstance->Log(DEBUG,"Handle ListenSocket event");
-
uslen = sizeof(sock_us);
length = sizeof(client);
incomingSockfd = accept (this->GetFd(),(struct sockaddr*)&client, &length);
@@ -78,7 +71,6 @@ void ListenSocket::HandleEvent(EventType et, int errornum)
#else
in_port = ntohs(sock_us.sin_port);
#endif
- ServerInstance->Log(DEBUG,"Accepted socket %d",incomingSockfd);
NonBlocking(incomingSockfd);
if (ServerInstance->Config->GetIOHook(in_port))
{
@@ -97,17 +89,13 @@ void ListenSocket::HandleEvent(EventType et, int errornum)
}
ServerInstance->stats->statsAccept++;
#ifdef IPV6
- ServerInstance->Log(DEBUG,"Add ipv6 client");
userrec::AddClient(ServerInstance, incomingSockfd, in_port, false, client.sin6_addr);
#else
- ServerInstance->Log(DEBUG,"Add ipv4 client");
userrec::AddClient(ServerInstance, incomingSockfd, in_port, false, client.sin_addr);
#endif
- ServerInstance->Log(DEBUG,"Adding client on port %d fd=%d",in_port,incomingSockfd);
}
else
{
- ServerInstance->Log(DEBUG,"Accept failed on fd %d: %s",incomingSockfd,strerror(errno));
shutdown(incomingSockfd,2);
close(incomingSockfd);
ServerInstance->stats->statsRefused++;
@@ -306,10 +294,7 @@ bool InspIRCd::BindSocket(int sockfd, insp_sockaddr client, insp_sockaddr server
*addr = 0;
if ((*addr) && (insp_aton(addr,&addy) < 1))
- {
- this->Log(DEBUG,"Invalid IP '%s' given to BindSocket()", addr);
return false;;
- }
#ifdef IPV6
server.sin6_family = AF_FAMILY;
@@ -343,7 +328,6 @@ bool InspIRCd::BindSocket(int sockfd, insp_sockaddr client, insp_sockaddr server
}
else
{
- this->Log(DEBUG,"Bound port %s:%d",*addr ? addr : "*",port);
if (listen(sockfd, Config->MaxConn) == -1)
{
this->Log(DEFAULT,"ERROR in listen(): %s",strerror(errno));
@@ -404,7 +388,6 @@ int InspIRCd::BindPorts(bool bail, int &ports_found, FailedPortList &failed_port
ports_found = 0;
int InitialPortCount = stats->BoundPortCount;
- this->Log(DEBUG,"Initial port count: %d",InitialPortCount);
for (int count = 0; count < Config->ConfValueEnum(Config->config_data, "bind"); count++)
{
@@ -427,7 +410,6 @@ int InspIRCd::BindPorts(bool bail, int &ports_found, FailedPortList &failed_port
strlcpy(Config->addrs[clientportcount+InitialPortCount],Addr,256);
clientportcount++;
- this->Log(DEBUG,"NEW binding %s:%d [%s] from config",Addr, portno, Type);
}
}
}
@@ -443,7 +425,6 @@ int InspIRCd::BindPorts(bool bail, int &ports_found, FailedPortList &failed_port
int fd = OpenTCPSocket();
if (fd == ERROR)
{
- this->Log(DEBUG,"Bad fd %d binding port [%s:%d]",fd,Config->addrs[count],Config->ports[count]);
failed_ports.push_back(std::make_pair(Config->addrs[count],Config->ports[count]));
}
else
@@ -466,10 +447,6 @@ int InspIRCd::BindPorts(bool bail, int &ports_found, FailedPortList &failed_port
}
return InitialPortCount + BoundPortCount;
}
- else
- {
- this->Log(DEBUG,"There is nothing new to bind!");
- }
return InitialPortCount;
}
}
@@ -481,7 +458,6 @@ int InspIRCd::BindPorts(bool bail, int &ports_found, FailedPortList &failed_port
int fd = OpenTCPSocket();
if (fd == ERROR)
{
- this->Log(DEBUG,"Bad fd %d binding port [%s:%d]",fd,Config->addrs[count],Config->ports[count]);
failed_ports.push_back(std::make_pair(Config->addrs[count],Config->ports[count]));
}
else
diff --git a/src/socketengine_epoll.cpp b/src/socketengine_epoll.cpp
index 24ee6c891..8f346cf3a 100644
--- a/src/socketengine_epoll.cpp
+++ b/src/socketengine_epoll.cpp
@@ -40,37 +40,26 @@ bool EPollEngine::AddFd(EventHandler* eh)
{
int fd = eh->GetFd();
if ((fd < 0) || (fd > MAX_DESCRIPTORS))
- {
- ServerInstance->Log(DEBUG,"ERROR: FD of %d added above max of %d",fd,MAX_DESCRIPTORS);
return false;
- }
+
if (GetRemainingFds() <= 1)
- {
- ServerInstance->Log(DEBUG,"ERROR: System out of file descriptors!");
return false;
- }
+
if (ref[fd])
- {
- ServerInstance->Log(DEBUG,"Slot %d already occupied",fd);
return false;
- }
ref[fd] = eh;
-
- ServerInstance->Log(DEBUG,"***** Add socket %d",fd);
-
struct epoll_event ev;
memset(&ev,0,sizeof(struct epoll_event));
- ServerInstance->Log(DEBUG,"epoll: Add socket to events, ep=%d socket=%d",EngineHandle,fd);
eh->Readable() ? ev.events = EPOLLIN : ev.events = EPOLLOUT;
ev.data.fd = fd;
int i = epoll_ctl(EngineHandle, EPOLL_CTL_ADD, fd, &ev);
if (i < 0)
{
- ServerInstance->Log(DEBUG,"epoll: List insertion failure!");
return false;
}
+ ServerInstance->Log(DEBUG,"New file descriptor: %d", fd);
CurrentSetSize++;
return true;
}
@@ -84,11 +73,7 @@ void EPollEngine::WantWrite(EventHandler* eh)
memset(&ev,0,sizeof(struct epoll_event));
ev.events = EPOLLOUT;
ev.data.fd = eh->GetFd();
- int i = epoll_ctl(EngineHandle, EPOLL_CTL_MOD, eh->GetFd(), &ev);
- if (i < 0)
- {
- ServerInstance->Log(DEBUG,"epoll: Could not set want write on fd %d!",eh->GetFd());
- }
+ epoll_ctl(EngineHandle, EPOLL_CTL_MOD, eh->GetFd(), &ev);
}
bool EPollEngine::DelFd(EventHandler* eh, bool force)
@@ -109,6 +94,7 @@ bool EPollEngine::DelFd(EventHandler* eh, bool force)
CurrentSetSize--;
ref[fd] = NULL;
+ ServerInstance->Log(DEBUG,"Remove file descriptor: %d", fd);
return true;
}
@@ -131,7 +117,6 @@ int EPollEngine::DispatchEvents()
{
if (events[j].events & EPOLLHUP)
{
- ServerInstance->Log(DEBUG,"Handle error event on fd %d", events[j].data.fd);
if (ref[events[j].data.fd])
ref[events[j].data.fd]->HandleEvent(EVENT_ERROR, 0);
continue;
@@ -141,7 +126,6 @@ int EPollEngine::DispatchEvents()
/* Get error number */
if (getsockopt(events[j].data.fd, SOL_SOCKET, SO_ERROR, &errcode, &codesize) < 0)
errcode = errno;
- ServerInstance->Log(DEBUG,"Handle error event on fd %d: %s", events[j].data.fd, strerror(errcode));
if (ref[events[j].data.fd])
ref[events[j].data.fd]->HandleEvent(EVENT_ERROR, errcode);
continue;
@@ -152,11 +136,7 @@ int EPollEngine::DispatchEvents()
memset(&ev,0,sizeof(struct epoll_event));
ev.events = EPOLLIN;
ev.data.fd = events[j].data.fd;
- int i = epoll_ctl(EngineHandle, EPOLL_CTL_MOD, events[j].data.fd, &ev);
- if (i < 0)
- {
- ServerInstance->Log(DEBUG,"epoll: Could not reset fd %d!", events[j].data.fd);
- }
+ epoll_ctl(EngineHandle, EPOLL_CTL_MOD, events[j].data.fd, &ev);
if (ref[events[j].data.fd])
ref[events[j].data.fd]->HandleEvent(EVENT_WRITE);
}
diff --git a/src/socketengine_kqueue.cpp b/src/socketengine_kqueue.cpp
index 4d0039903..7fcdae2b6 100644
--- a/src/socketengine_kqueue.cpp
+++ b/src/socketengine_kqueue.cpp
@@ -35,7 +35,6 @@ KQueueEngine::KQueueEngine(InspIRCd* Instance) : SocketEngine(Instance)
KQueueEngine::~KQueueEngine()
{
- ServerInstance->Log(DEBUG,"KQueueEngine::~KQueueEngine()");
close(EngineHandle);
}
@@ -43,40 +42,27 @@ bool KQueueEngine::AddFd(EventHandler* eh)
{
int fd = eh->GetFd();
- ServerInstance->Log(DEBUG,"KQueueEngine::AddFd(%d)",fd);
-
if ((fd < 0) || (fd > MAX_DESCRIPTORS))
- {
- ServerInstance->Log(DEBUG,"ERROR: FD of %d added above max of %d",fd,MAX_DESCRIPTORS);
return false;
- }
+
if (GetRemainingFds() <= 1)
- {
- ServerInstance->Log(DEBUG,"ERROR: System out of file descriptors!");
return false;
- }
if (ref[fd])
- {
- ServerInstance->Log(DEBUG,"ERROR: Slot already occupied");
return false;
- }
ref[fd] = eh;
- ServerInstance->Log(DEBUG,"Add socket %d",fd);
struct kevent ke;
- ServerInstance->Log(DEBUG,"kqueue: Add socket to events, kq=%d socket=%d",EngineHandle,fd);
EV_SET(&ke, fd, eh->Readable() ? EVFILT_READ : EVFILT_WRITE, EV_ADD, 0, 0, NULL);
int i = kevent(EngineHandle, &ke, 1, 0, 0, NULL);
if (i == -1)
- {
- ServerInstance->Log(DEBUG,"kqueue: List insertion failure!");
return false;
- }
CurrentSetSize++;
+
+ ServerInstance->Log(DEBUG,"New file descriptor: %d", fd);
return true;
}
@@ -102,6 +88,7 @@ bool KQueueEngine::DelFd(EventHandler* eh, bool force)
CurrentSetSize--;
ref[fd] = NULL;
+ ServerInstance->Log(DEBUG,"Remove file descriptor: %d", fd);
return true;
}
@@ -113,11 +100,7 @@ void KQueueEngine::WantWrite(EventHandler* eh)
*/
struct kevent ke;
EV_SET(&ke, eh->GetFd(), EVFILT_WRITE, EV_ADD | EV_ONESHOT, 0, 0, NULL);
- int i = kevent(EngineHandle, &ke, 1, 0, 0, NULL);
- if (i == -1)
- {
- ServerInstance->Log(DEBUG,"kqueue: Unable to set fd %d for wanting write", eh->GetFd());
- }
+ kevent(EngineHandle, &ke, 1, 0, 0, NULL);
}
int KQueueEngine::GetMaxFds()
@@ -139,7 +122,6 @@ int KQueueEngine::DispatchEvents()
{
if (ke_list[j].flags & EV_EOF)
{
- ServerInstance->Log(DEBUG,"kqueue: Error on FD %d", ke_list[j].ident);
/* We love you kqueue, oh yes we do *sings*!
* kqueue gives us the error number directly in the EOF state!
* Unlike smelly epoll and select, where we have to getsockopt
@@ -156,11 +138,7 @@ int KQueueEngine::DispatchEvents()
*/
struct kevent ke;
EV_SET(&ke, ke_list[j].ident, EVFILT_READ, EV_ADD, 0, 0, NULL);
- int i = kevent(EngineHandle, &ke, 1, 0, 0, NULL);
- if (i == -1)
- {
- ServerInstance->Log(DEBUG,"kqueue: Unable to set fd %d back to just wanting to read!", ke_list[j].ident);
- }
+ kevent(EngineHandle, &ke, 1, 0, 0, NULL);
if (ref[ke_list[j].ident])
ref[ke_list[j].ident]->HandleEvent(EVENT_WRITE);
}
diff --git a/src/socketengine_select.cpp b/src/socketengine_select.cpp
index afa42c7bc..ef5f2071f 100644
--- a/src/socketengine_select.cpp
+++ b/src/socketengine_select.cpp
@@ -18,7 +18,6 @@
SelectEngine::SelectEngine(InspIRCd* Instance) : SocketEngine(Instance)
{
- ServerInstance->Log(DEBUG,"SelectEngine::SelectEngine()");
EngineHandle = 0;
CurrentSetSize = 0;
memset(writeable, 0, sizeof(writeable));
@@ -26,22 +25,16 @@ SelectEngine::SelectEngine(InspIRCd* Instance) : SocketEngine(Instance)
SelectEngine::~SelectEngine()
{
- ServerInstance->Log(DEBUG,"SelectEngine::~SelectEngine()");
}
bool SelectEngine::AddFd(EventHandler* eh)
{
int fd = eh->GetFd();
if ((fd < 0) || (fd > MAX_DESCRIPTORS))
- {
- ServerInstance->Log(DEBUG,"ERROR: FD of %d added above max of %d",fd,MAX_DESCRIPTORS);
return false;
- }
+
if (GetRemainingFds() <= 1)
- {
- ServerInstance->Log(DEBUG,"ERROR: System out of file descriptors!");
return false;
- }
fds[fd] = fd;
@@ -49,9 +42,10 @@ bool SelectEngine::AddFd(EventHandler* eh)
return false;
ref[fd] = eh;
- ServerInstance->Log(DEBUG,"Add socket %d",fd);
CurrentSetSize++;
+
+ ServerInstance->Log(DEBUG,"New file descriptor: %d", fd);
return true;
}
@@ -73,6 +67,8 @@ bool SelectEngine::DelFd(EventHandler* eh, bool force)
CurrentSetSize--;
ref[fd] = NULL;
+
+ ServerInstance->Log(DEBUG,"Remove file descriptor: %d", fd);
return true;
}
diff --git a/src/userprocess.cpp b/src/userprocess.cpp
index 11af15710..c6a34561b 100644
--- a/src/userprocess.cpp
+++ b/src/userprocess.cpp
@@ -201,7 +201,6 @@ void InspIRCd::ProcessUser(userrec* cu)
if ((result == -1) && (errno != EAGAIN) && (errno != EINTR))
{
- this->Log(DEBUG,"killing: %s",cu->nick);
cu->SetWriteError(strerror(errno));
return;
}
@@ -215,7 +214,6 @@ void InspIRCd::ProcessUser(userrec* cu)
else if (result == 0)
{
cu->SetWriteError("Client exited");
- this->Log(DEBUG,"Bailing from client exit");
return;
}
}
@@ -254,7 +252,6 @@ void InspIRCd::DoBackgroundUserStuff(time_t TIME)
*/
if ((TIME > curr->timeout) && (curr->registered != REG_ALL))
{
- this->Log(DEBUG,"InspIRCd: registration timeout: %s",curr->nick);
GlobalGoners.AddItem(curr,"Registration timeout");
continue;
}
@@ -284,7 +281,6 @@ void InspIRCd::DoBackgroundUserStuff(time_t TIME)
if ((curr->dns_done) && (curr->registered == REG_NICKUSER) && (ready))
{
- this->Log(DEBUG,"dns done, registered=3, and modules ready, OK");
curr->FullConnect(&GlobalGoners);
continue;
}
diff --git a/src/users.cpp b/src/users.cpp
index 0e88c3de4..78c72801d 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -31,10 +31,8 @@ bool InitTypes(ServerConfig* conf, const char* tag)
{
if (conf->opertypes.size())
{
- conf->GetInstance()->Log(DEBUG,"Currently %d items to clear",conf->opertypes.size());
for (opertype_t::iterator n = conf->opertypes.begin(); n != conf->opertypes.end(); n++)
{
- conf->GetInstance()->Log(DEBUG,"Clear item");
if (n->second)
delete[] n->second;
}
@@ -65,7 +63,6 @@ bool DoType(ServerConfig* conf, const char* tag, char** entries, ValueList &valu
const char* Classes = values[1].GetString();
conf->opertypes[TypeName] = strdup(Classes);
- conf->GetInstance()->Log(DEBUG,"Read oper TYPE '%s' with classes '%s'",TypeName,Classes);
return true;
}
@@ -75,7 +72,6 @@ bool DoClass(ServerConfig* conf, const char* tag, char** entries, ValueList &val
const char* CommandList = values[1].GetString();
conf->operclass[ClassName] = strdup(CommandList);
- conf->GetInstance()->Log(DEBUG,"Read oper CLASS '%s' with commands '%s'",ClassName,CommandList);
return true;
}
@@ -90,12 +86,8 @@ std::string userrec::ProcessNoticeMasks(const char *sm)
const char *c = sm;
std::string output;
- ServerInstance->Log(DEBUG,"Process notice masks");
-
while (c && *c)
{
- ServerInstance->Log(DEBUG,"Process notice mask %c",*c);
-
switch (*c)
{
case '+':
@@ -147,10 +139,8 @@ std::string userrec::ProcessNoticeMasks(const char *sm)
void userrec::StartDNSLookup()
{
- ServerInstance->Log(DEBUG,"Commencing reverse lookup");
try
{
- ServerInstance->Log(DEBUG,"Passing instance: %08x",this->ServerInstance);
bool cached;
res_reverse = new UserResolver(this->ServerInstance, this, this->GetIPString(), DNS_QUERY_REVERSE, cached);
this->ServerInstance->AddResolver(res_reverse, cached);
@@ -172,7 +162,6 @@ void UserResolver::OnLookupComplete(const std::string &result, unsigned int ttl,
{
if ((!this->fwd) && (ServerInstance->SE->GetRef(this->bound_fd) == this->bound_user))
{
- ServerInstance->Log(DEBUG,"Commencing forward lookup");
this->bound_user->stored_host = result;
try
{
@@ -307,7 +296,6 @@ void userrec::DecrementModes()
userrec::userrec(InspIRCd* Instance) : ServerInstance(Instance)
{
- ServerInstance->Log(DEBUG,"userrec::userrec(): Instance: %08x",ServerInstance);
// the PROPER way to do it, AVOID bzero at *ALL* costs
*password = *nick = *ident = *host = *dhost = *fullname = *awaymsg = *oper = 0;
server = (char*)Instance->FindServerNamePtr(Instance->Config->ServerName);
@@ -506,7 +494,6 @@ void userrec::InviteTo(const irc::string &channel)
void userrec::RemoveInvite(const irc::string &channel)
{
- ServerInstance->Log(DEBUG,"Removing invites");
for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
{
if (channel == *i)
@@ -703,7 +690,6 @@ void userrec::FlushWriteBuf()
/* The socket buffer is full. This isnt fatal,
* try again later.
*/
- ServerInstance->Log(DEBUG,"EAGAIN, want write");
this->ServerInstance->SE->WantWrite(this);
}
else
@@ -723,10 +709,7 @@ void userrec::FlushWriteBuf()
this->bytes_out += n_sent;
this->cmds_out++;
if (n_sent != old_sendq_length)
- {
- ServerInstance->Log(DEBUG,"Not all written, want write");
this->ServerInstance->SE->WantWrite(this);
- }
}
}
}
@@ -743,10 +726,7 @@ void userrec::SetWriteError(const std::string &error)
{
// don't try to set the error twice, its already set take the first string.
if (this->WriteError.empty())
- {
- ServerInstance->Log(DEBUG,"Setting error string for %s to '%s'",this->nick,error.c_str());
this->WriteError = error;
- }
}
catch (...)
@@ -791,7 +771,6 @@ void userrec::UnOper()
{
if (*a == this)
{
- ServerInstance->Log(DEBUG,"Oper removed from optimization list");
ServerInstance->all_opers.erase(a);
return;
}
@@ -866,7 +845,6 @@ void userrec::QuitUser(InspIRCd* Instance, userrec *user, const std::string &qui
if (iter != Instance->clientlist->end())
{
- Instance->Log(DEBUG,"deleting user hash value %lx",(unsigned long)user);
if (IS_LOCAL(user))
{
std::vector<userrec*>::iterator x = find(Instance->local_users.begin(),Instance->local_users.end(),user);
@@ -918,8 +896,6 @@ void userrec::AddClient(InspIRCd* Instance, int socket, int port, bool iscached,
Instance->clientlist->erase(iter);
}
- Instance->Log(DEBUG,"AddClient: %d %d %s",socket,port,ipaddr);
-
New = new userrec(Instance);
(*(Instance->clientlist))[tempnick] = New;
New->fd = socket;
@@ -1203,7 +1179,6 @@ void userrec::SetSockAddr(int protocol_family, const char* ip, int port)
#ifdef SUPPORT_IP6LINKS
case AF_INET6:
{
- ServerInstance->Log(DEBUG,"Set inet6 protocol address");
sockaddr_in6* sin = new sockaddr_in6;
sin->sin6_family = AF_INET6;
sin->sin6_port = port;
@@ -1214,7 +1189,6 @@ void userrec::SetSockAddr(int protocol_family, const char* ip, int port)
#endif
case AF_INET:
{
- ServerInstance->Log(DEBUG,"Set inet4 protocol address");
sockaddr_in* sin = new sockaddr_in;
sin->sin_family = AF_INET;
sin->sin_port = port;