+ /** Oper up the user using the given opertype.
+ * This will also give the +o usermode.
+ * @param opertype The oper type to oper as
+ */
+ void Oper(const std::string &opertype);
+
+ /** Call this method to find the matching <connect> for a user, and to check them against it.
+ */
+ void CheckClass();
+
+ /** Use this method to fully connect a user.
+ * This will send the message of the day, check G/K/E lines, etc.
+ */
+ void FullConnect();
+
+ /** Change this users hash key to a new string.
+ * You should not call this function directly. It is used by the core
+ * to update the users hash entry on a nickchange.
+ * @param New new user_hash key
+ * @return Pointer to userrec in hash (usually 'this')
+ */
+ userrec* UpdateNickHash(const char* New);
+
+ /** Force a nickname change.
+ * If the nickname change fails (for example, because the nick in question
+ * already exists) this function will return false, and you must then either
+ * output an error message, or quit the user for nickname collision.
+ * @param newnick The nickname to change to
+ * @return True if the nickchange was successful.
+ */
+ bool ForceNickChange(const char* newnick);
+
+ /** Add a client to the system.
+ * This will create a new userrec, insert it into the user_hash,
+ * initialize it as not yet registered, and add it to the socket engine.
+ * @param Instance a pointer to the server instance
+ * @param socket The socket id (file descriptor) this user is on
+ * @param port The port number this user connected on
+ * @param iscached This variable is reserved for future use
+ * @param ip The IP address of the user
+ * @return This function has no return value, but a call to AddClient may remove the user.
+ */
+ static void AddClient(InspIRCd* Instance, int socket, int port, bool iscached, int socketfamily, sockaddr* ip);
+
+ /** Oper down.
+ * This will clear the +o usermode and unset the user's oper type
+ */
+ void UnOper();
+
+ /** Return the number of global clones of this user
+ * @return The global clone count of this user
+ */
+ unsigned long GlobalCloneCount();
+
+ /** Return the number of local clones of this user
+ * @return The local clone count of this user
+ */
+ unsigned long LocalCloneCount();
+
+ /** Write text to this user, appending CR/LF.
+ * @param text A std::string to send to the user
+ */
+ void Write(std::string text);
+
+ /** Write text to this user, appending CR/LF.
+ * @param text The format string for text to send to the user
+ * @param ... POD-type format arguments
+ */
+ void Write(const char *text, ...);
+
+ /** Write text to this user, appending CR/LF and prepending :server.name
+ * @param text A std::string to send to the user
+ */
+ void WriteServ(const std::string& text);
+
+ /** Write text to this user, appending CR/LF and prepending :server.name
+ * @param text The format string for text to send to the user
+ * @param ... POD-type format arguments
+ */
+ void WriteServ(const char* text, ...);
+
+ /** Write text to this user, appending CR/LF and prepending :nick!user@host of the user provided in the first parameter.
+ * @param user The user to prepend the :nick!user@host of
+ * @param text A std::string to send to the user
+ */
+ void WriteFrom(userrec *user, const std::string &text);
+
+ /** Write text to this user, appending CR/LF and prepending :nick!user@host of the user provided in the first parameter.
+ * @param user The user to prepend the :nick!user@host of
+ * @param text The format string for text to send to the user
+ * @param ... POD-type format arguments
+ */
+ void WriteFrom(userrec *user, const char* text, ...);
+
+ /** Write text to the user provided in the first parameter, appending CR/LF, and prepending THIS user's :nick!user@host.
+ * @param dest The user to route the message to
+ * @param text A std::string to send to the user
+ */
+ void WriteTo(userrec *dest, const std::string &data);
+
+ /** Write text to the user provided in the first parameter, appending CR/LF, and prepending THIS user's :nick!user@host.
+ * @param dest The user to route the message to
+ * @param text The format string for text to send to the user
+ * @param ... POD-type format arguments
+ */
+ void WriteTo(userrec *dest, const char *data, ...);
+
+ /** Write to all users that can see this user (including this user in the list), appending CR/LF
+ * @param text A std::string to send to the users
+ */
+ void WriteCommon(const std::string &text);
+
+ /** Write to all users that can see this user (including this user in the list), appending CR/LF
+ * @param text The format string for text to send to the users
+ * @param ... POD-type format arguments
+ */
+ void WriteCommon(const char* text, ...);
+
+ /** Write to all users that can see this user (not including this user in the list), appending CR/LF
+ * @param text The format string for text to send to the users
+ * @param ... POD-type format arguments
+ */
+ void WriteCommonExcept(const char* text, ...);
+
+ /** Write to all users that can see this user (not including this user in the list), appending CR/LF
+ * @param text A std::string to send to the users
+ */
+ void WriteCommonExcept(const std::string &text);
+
+ void WriteCommonQuit(const std::string &normal_text, const std::string &oper_text);
+
+ /** Write a WALLOPS message from this user to all local opers.
+ * If this user is not opered, the function will return without doing anything.
+ * @param text The format string to send in the WALLOPS message
+ * @param ... Format arguments
+ */
+ void WriteWallOps(const char* text, ...);
+
+ /** Write a WALLOPS message from this user to all local opers.
+ * If this user is not opered, the function will return without doing anything.
+ * @param text The text to send in the WALLOPS message
+ */
+ void WriteWallOps(const std::string &text);
+
+ /** Return true if the user shares at least one channel with another user
+ * @param other The other user to compare the channel list against
+ * @return True if the given user shares at least one channel with this user
+ */
+ bool SharesChannelWith(userrec *other);