X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fbase.cpp;h=09673eb3eb28c22bec8139973d343402f600fdb3;hb=2d4a319d961e3f9e6aa9f7926f9ed320d72de8da;hp=4612c4a595131d6dbecac4e0354da05d14d09cc0;hpb=d85ea7eac1580b52981578ea647d0da5b5694f54;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/base.cpp b/src/base.cpp index 4612c4a59..09673eb3e 100644 --- a/src/base.cpp +++ b/src/base.cpp @@ -2,32 +2,29 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev. - * E-mail: - * - * - * - * Written by Craig Edwards, Craig McLure, and others. + * InspIRCd: (C) 2002-2008 InspIRCd Development Team + * See: http://www.inspircd.org/wiki/index.php/Credits + * * This program is free but copyrighted software; see * the file COPYING for details. * * --------------------------------------------------- */ +/* $Core: libIRCDbase */ + #include "inspircd_config.h" #include "base.h" #include -#include -#include -#include #include "inspircd.h" -#include "modules.h" -#include "helperfuncs.h" const int bitfields[] = {1,2,4,8,16,32,64,128}; const int inverted_bitfields[] = {~1,~2,~4,~8,~16,~32,~64,~128}; -extern time_t TIME; +classbase::classbase() +{ + this->age = time(NULL); +} bool Extensible::Shrink(const std::string &key) { @@ -35,16 +32,7 @@ bool Extensible::Shrink(const std::string &key) * returns the number of elements removed, std::map * is single-associative so this should only be 0 or 1 */ - if(this->Extension_Items.erase(key)) - { - log(DEBUG, "Shrinking object with item %s",key.c_str()); - return true; - } - else - { - log(DEBUG, "Tried to shrink object with item %s but no items removed", key.c_str()); - return false; - } + return this->Extension_Items.erase(key); } void Extensible::GetExtList(std::deque &list)