X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fusers.cpp;h=93fd8d06568b169f9e84138f09297a055bc92923;hb=63aa8d0d42f619c52d382bde3e6ba2e5e23b12ac;hp=12243c64b074df57ab7442f4b5e8a782d79c5858;hpb=045747290ba1088daf7f70d5d36d0eb4c8ba2b4e;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/users.cpp b/src/users.cpp index 12243c64b..93fd8d065 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -26,8 +26,6 @@ #include "inspircd.h" #include "xline.h" -already_sent_t LocalUser::already_sent_id = 0; - bool User::IsNoticeMaskSet(unsigned char sm) { if (!isalpha(sm)) @@ -139,28 +137,6 @@ const std::string& User::GetFullRealHost() return this->cached_fullrealhost; } -InviteList& LocalUser::GetInviteList() -{ - RemoveExpiredInvites(); - return invites; -} - -bool LocalUser::RemoveInvite(Channel* chan) -{ - Invitation* inv = Invitation::Find(chan, this); - if (inv) - { - delete inv; - return true; - } - return false; -} - -void LocalUser::RemoveExpiredInvites() -{ - Invitation::Find(NULL, this); -} - bool User::HasModePermission(unsigned char, ModeType) { return true; @@ -328,7 +304,6 @@ CullResult User::cull() CullResult LocalUser::cull() { - ClearInvites(); eh.cull(); return User::cull(); } @@ -764,7 +739,7 @@ void LocalUser::Write(const std::string& text) if (text.length() > ServerInstance->Config->Limits.MaxLine - 2) { // this should happen rarely or never. Crop the string at 512 and try again. - std::string try_again(0, ServerInstance->Config->Limits.MaxLine - 2); + std::string try_again(text, 0, ServerInstance->Config->Limits.MaxLine - 2); Write(try_again); return; } @@ -896,7 +871,7 @@ void User::ForEachNeighbor(ForEachNeighborHandler& handler, bool include_self) FOREACH_MOD(OnBuildNeighborList, (this, include_chans, exceptions)); // Get next id, guaranteed to differ from the already_sent field of all users - const already_sent_t newid = ++LocalUser::already_sent_id; + const already_sent_t newid = ServerInstance->Users.NextAlreadySentId(); // Handle exceptions first for (std::map::const_iterator i = exceptions.begin(); i != exceptions.end(); ++i)