]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/users.h
Clean up the protocol interface
[user/henk/code/inspircd.git] / include / users.h
index 478476cdde38a944a5d87381b6efd80e1a13f960..aa11a2b82ac5b2adb52452cc17691002c5899f67 100644 (file)
@@ -133,7 +133,7 @@ struct CoreExport ConnectClass : public refcountbase
 
        /** If set to true, no user DNS lookups are to be performed
         */
-       bool nouserdns;
+       bool resolvehostnames;
 
        /** Create a new connect class with no settings.
         */
@@ -593,7 +593,7 @@ class CoreExport User : public Extensible
         * @return True if the change succeeded, false if it didn't
         * (a module vetoed the change).
         */
-       bool ChangeDisplayedHost(const char* host);
+       bool ChangeDisplayedHost(const std::string& host);
 
        /** Change the ident (username) of a user.
         * ALWAYS use this function, rather than writing User::ident directly,
@@ -602,7 +602,7 @@ class CoreExport User : public Extensible
         * @param newident The new ident to set
         * @return True if the change succeeded, false if it didn't
         */
-       bool ChangeIdent(const char* newident);
+       bool ChangeIdent(const std::string& newident);
 
        /** Change a users realname field.
         * ALWAYS use this function, rather than writing User::fullname directly,
@@ -611,7 +611,7 @@ class CoreExport User : public Extensible
         * @param gecos The user's new realname
         * @return True if the change succeeded, false if otherwise
         */
-       bool ChangeName(const char* gecos);
+       bool ChangeName(const std::string& gecos);
 
        /** Change a user's nick
         * @param newnick The new nick
@@ -635,11 +635,6 @@ class CoreExport User : public Extensible
         */
        void PurgeEmptyChannels();
 
-       /** Get the connect class which this user belongs to. NULL for remote users.
-        * @return A pointer to this user's connect class.
-        */
-       virtual ConnectClass* GetClass();
-
        /** Default destructor
         */
        virtual ~User();
@@ -702,7 +697,10 @@ class CoreExport LocalUser : public User, public InviteBase
         */
        reference<ConnectClass> MyClass;
 
-       ConnectClass* GetClass();
+       /** Get the connect class which this user belongs to.
+        * @return A pointer to this user's connect class.
+        */
+       ConnectClass* GetClass() const { return MyClass; }
 
        /** Call this method to find the matching \<connect> for a user, and to check them against it.
         */