X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Fuid.cpp;h=cc5acccf93eb04e0a3f585b3f9a0bdbf328a5164;hb=3151d60c1ecc9462e4c335282ee6c31672f45111;hp=86933dc729d871621028de8f692b99b9b24a6fee;hpb=8cb20e354533fbec24aafd4e61ff6fa69b434aa2;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/uid.cpp b/src/modules/m_spanningtree/uid.cpp index 86933dc72..cc5acccf9 100644 --- a/src/modules/m_spanningtree/uid.cpp +++ b/src/modules/m_spanningtree/uid.cpp @@ -1,9 +1,13 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2010 Daniel De Graaf + * Copyright (C) 2017-2019 Sadie Powell + * Copyright (C) 2013 Adam + * Copyright (C) 2012-2016 Attila Molnar + * Copyright (C) 2012 Robby + * Copyright (C) 2009-2010 Daniel De Graaf + * Copyright (C) 2008, 2010 Craig Edwards * Copyright (C) 2008 Robin Burchell - * Copyright (C) 2008 Craig Edwards * * This file is part of InspIRCd. InspIRCd is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public @@ -38,7 +42,7 @@ CmdResult CommandUID::HandleServer(TreeServer* remoteserver, CommandBase::Params const std::string& modestr = params[8]; // Check if the length of the uuid is correct and confirm the sid portion of the uuid matches the sid of the server introducing the user - if (params[0].length() != UIDGenerator::UUID_LENGTH || params[0].compare(0, 3, remoteserver->GetID())) + if (params[0].length() != UIDGenerator::UUID_LENGTH || params[0].compare(0, 3, remoteserver->GetId())) throw ProtocolException("Bogus UUID"); // Sanity check on mode string: must begin with '+' if (modestr[0] != '+') @@ -76,7 +80,7 @@ CmdResult CommandUID::HandleServer(TreeServer* remoteserver, CommandBase::Params _new->ChangeRealHost(params[3], false); _new->ChangeDisplayedHost(params[4]); _new->ident = params[5]; - _new->fullname = params.back(); + _new->ChangeRealName(params.back()); _new->registered = REG_ALL; _new->signon = signon; _new->age = age_t; @@ -89,7 +93,7 @@ CmdResult CommandUID::HandleServer(TreeServer* remoteserver, CommandBase::Params if (*v == '+') continue; - /* For each mode thats set, find the mode handler and set it on the new user */ + /* For each mode that's set, find the mode handler and set it on the new user */ ModeHandler* mh = ServerInstance->Modes->FindMode(*v, MODETYPE_USER); if (!mh) throw ProtocolException("Unrecognised mode '" + std::string(1, *v) + "'"); @@ -126,7 +130,7 @@ CmdResult CommandUID::HandleServer(TreeServer* remoteserver, CommandBase::Params dosend = false; if (dosend) - ServerInstance->SNO->WriteToSnoMask('C',"Client connecting at %s: %s (%s) [%s]", remoteserver->GetName().c_str(), _new->GetFullRealHost().c_str(), _new->GetIPString().c_str(), _new->fullname.c_str()); + ServerInstance->SNO->WriteToSnoMask('C',"Client connecting at %s: %s (%s) [%s]", remoteserver->GetName().c_str(), _new->GetFullRealHost().c_str(), _new->GetIPString().c_str(), _new->GetRealName().c_str()); FOREACH_MOD(OnPostConnect, (_new)); @@ -134,7 +138,7 @@ CmdResult CommandUID::HandleServer(TreeServer* remoteserver, CommandBase::Params } CmdResult CommandFHost::HandleRemote(RemoteUser* src, Params& params) -{ +{ src->ChangeDisplayedHost(params[0]); return CMD_SUCCESS; } @@ -147,12 +151,12 @@ CmdResult CommandFIdent::HandleRemote(RemoteUser* src, Params& params) CmdResult CommandFName::HandleRemote(RemoteUser* src, Params& params) { - src->ChangeName(params[0]); + src->ChangeRealName(params[0]); return CMD_SUCCESS; } CommandUID::Builder::Builder(User* user) - : CmdBuilder(TreeServer::Get(user)->GetID(), "UID") + : CmdBuilder(TreeServer::Get(user), "UID") { push(user->uuid); push_int(user->age); @@ -163,5 +167,5 @@ CommandUID::Builder::Builder(User* user) push(user->GetIPString()); push_int(user->signon); push(user->GetModeLetters(true)); - push_last(user->fullname); + push_last(user->GetRealName()); }