]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
Replace irc::string usage in CommandParser::LoopCall() with irc::insensitive_swo set
[user/henk/code/inspircd.git] / src / users.cpp
index 7437e8a209f83baea1e3345608785616883e1732..24b2928ae052e55503013aa696782be294604bcd 100644 (file)
@@ -64,12 +64,14 @@ const char* User::FormatModes(bool showparameters)
 }
 
 User::User(const std::string& uid, Server* srv, int type)
-       : uuid(uid), server(srv), usertype(type)
+       : age(ServerInstance->Time())
+       , signon(0)
+       , uuid(uid)
+       , server(srv)
+       , registered(REG_NONE)
+       , quitting(false)
+       , usertype(type)
 {
-       age = ServerInstance->Time();
-       signon = 0;
-       registered = 0;
-       quitting = false;
        client_sa.sa.sa_family = AF_UNSPEC;
 
        ServerInstance->Logs->Log("USERS", LOG_DEBUG, "New UUID for user: %s", uuid.c_str());
@@ -83,14 +85,24 @@ User::User(const std::string& uid, Server* srv, int type)
 }
 
 LocalUser::LocalUser(int myfd, irc::sockets::sockaddrs* client, irc::sockets::sockaddrs* servaddr)
-       : User(ServerInstance->UIDGen.GetUID(), ServerInstance->FakeClient->server, USERTYPE_LOCAL), eh(this),
-       bytes_in(0), bytes_out(0), cmds_in(0), cmds_out(0), nping(0), CommandFloodPenalty(0),
-       already_sent(0)
-{
-       exempt = quitting_sendq = false;
-       idle_lastmsg = 0;
+       : User(ServerInstance->UIDGen.GetUID(), ServerInstance->FakeClient->server, USERTYPE_LOCAL)
+       , eh(this)
+       , bytes_in(0)
+       , bytes_out(0)
+       , cmds_in(0)
+       , cmds_out(0)
+       , quitting_sendq(false)
+       , lastping(true)
+       , exempt(false)
+       , nping(0)
+       , idle_lastmsg(0)
+       , CommandFloodPenalty(0)
+       , already_sent(0)
+{
+       signon = ServerInstance->Time();
+       // The user's default nick is their UUID
+       nick = uuid;
        ident = "unknown";
-       lastping = 0;
        eh.SetFd(myfd);
        memcpy(&client_sa, client, sizeof(irc::sockets::sockaddrs));
        memcpy(&server_sa, servaddr, sizeof(irc::sockets::sockaddrs));
@@ -927,27 +939,6 @@ void User::ForEachNeighbor(ForEachNeighborHandler& handler, bool include_self)
        }
 }
 
-void LocalUser::SendText(const std::string& line)
-{
-       Write(line);
-}
-
-void RemoteUser::SendText(const std::string& line)
-{
-       ServerInstance->PI->PushToClient(this, line);
-}
-
-void FakeUser::SendText(const std::string& line)
-{
-}
-
-void User::SendText(const char *text, ...)
-{
-       std::string line;
-       VAFORMAT(line, text, text);
-       SendText(line);
-}
-
 void User::WriteRemoteNumeric(const Numeric::Numeric& numeric)
 {
        WriteNumeric(numeric);