diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-01-05 15:04:01 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-01-05 15:04:01 +0100 |
commit | 11916574f67962dce1d7a2fdf7ef6a3d2d1fa49f (patch) | |
tree | 1c3c602de5512a62e2db96652ddd540e6e53e821 /include/users.h | |
parent | 2f181fef775da4a686a892c06af843dddfb7950a (diff) |
Introduce Server class
- Replaces std::string server in User
- Replaces InspIRCd::ULine() and SilentULine()
Diffstat (limited to 'include/users.h')
-rw-r--r-- | include/users.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/include/users.h b/include/users.h index fa9d97c21..bf4ba4de2 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) + : User(uid, new Server(sname), USERTYPE_SERVER) + { + nick = sname; } virtual CullResult cull(); |