X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fusers.h;h=f8bfb5a6e523eeb78cf7579d4becb2b9709b42c3;hb=282138ad0e9ef483ec2a1606376fc5cb6d5f4cbc;hp=fa9d97c215f664403ec7e969f6242253c12557eb;hpb=d736eba00b274c87662bd73a3acf8288135643d6;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/users.h b/include/users.h index fa9d97c21..f8bfb5a6e 100644 --- a/include/users.h +++ b/include/users.h @@ -306,7 +306,7 @@ class CoreExport User : public Extensible /** The server the user is connected to. */ - const std::string server; + Server* server; /** The user's away message. * If this string is empty, the user is not marked as away. @@ -357,7 +357,7 @@ class CoreExport User : public Extensible /** Constructor * @throw CoreException if the UID allocated to the user already exists */ - User(const std::string &uid, const std::string& srv, int objtype); + User(const std::string& uid, Server* srv, int objtype); /** Returns the full displayed host of the user * This member function returns the hostname of the user as seen by other users @@ -818,7 +818,7 @@ class CoreExport LocalUser : public User, public InviteBase class CoreExport RemoteUser : public User { public: - RemoteUser(const std::string& uid, const std::string& srv) : User(uid, srv, USERTYPE_REMOTE) + RemoteUser(const std::string& uid, Server* srv) : User(uid, srv, USERTYPE_REMOTE) { } virtual void SendText(const std::string& line); @@ -827,9 +827,15 @@ class CoreExport RemoteUser : public User class CoreExport FakeUser : public User { public: - FakeUser(const std::string &uid, const std::string& srv) : User(uid, srv, USERTYPE_SERVER) + FakeUser(const std::string& uid, Server* srv) : User(uid, srv, USERTYPE_SERVER) { - nick = srv; + nick = srv->GetName(); + } + + FakeUser(const std::string& uid, const std::string& sname, const std::string& sdesc) + : User(uid, new Server(sname, sdesc), USERTYPE_SERVER) + { + nick = sname; } virtual CullResult cull();