#include "commands.h"
#include "utils.h"
-#include "link.h"
-#include "treesocket.h"
#include "treeserver.h"
-#include "resolvers.h"
CmdResult CommandUID::Handle(const parameterlist ¶ms, User* serversrc)
{
* Nick collision.
*/
int collide = sock->DoCollision(iter->second, age_t, params[5], params[6], params[0]);
- ServerInstance->Logs->Log("m_spanningtree",LOG_DEBUG,"*** Collision on %s, collide=%d", params[2].c_str(), collide);
+ ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "*** Collision on %s, collide=%d", params[2].c_str(), collide);
if (collide != 1)
{
}
catch (...)
{
- ServerInstance->Logs->Log("m_spanningtree", LOG_DEFAULT, "Duplicate UUID %s in client introduction", params[0].c_str());
+ ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Duplicate UUID %s in client introduction", params[0].c_str());
return CMD_INVALID;
}
(*(ServerInstance->Users->clientlist))[params[2]] = _new;
unsigned int paramptr = 9;
- // Accept more '+' chars, for now
- std::string::size_type pos = modestr.find_first_not_of('+');
- for (std::string::const_iterator v = modestr.begin()+pos; v != modestr.end(); ++v)
+ for (std::string::const_iterator v = modestr.begin(); v != modestr.end(); ++v)
{
+ // Accept more '+' chars, for now
+ if (*v == '+')
+ continue;
+
/* For each mode thats set, find the mode handler and set it on the new user */
ModeHandler* mh = ServerInstance->Modes->FindMode(*v, MODETYPE_USER);
if (!mh)
{
- ServerInstance->Logs->Log("m_spanningtree", LOG_DEFAULT, "Unrecognised mode '%c' for a user in UID, dropping link", *v);
+ ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Unrecognised mode '%c' for a user in UID, dropping link", *v);
return CMD_INVALID;
}
}
else
mh->OnModeChange(_new, _new, NULL, empty, true);
- _new->SetMode(*v, true);
+ _new->SetMode(mh, true);
}
_new->SetClientIP(params[6].c_str());