summaryrefslogtreecommitdiff
path: root/include/modules.h
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-12 14:38:32 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-12 14:38:32 +0000
commitcb77b70cbdffdc95612ef951a951fedf14559f27 (patch)
treefddd02b3568a21e9b3279338f5598b963fd67c0f /include/modules.h
parente7ed8d5b73dd4d398fd7a16e9a731418387a3b7a (diff)
Added Server::PseudoToUser and Server::UserToPseudo
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1057 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/modules.h')
-rw-r--r--include/modules.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/modules.h b/include/modules.h
index a040757f6..34549b6c2 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -96,6 +96,8 @@ typedef std::deque<userrec*> chanuserlist;
// *********************************************************************************************
+#define FD_MAGIC_NUMBER -42
+
extern void createcommand(char* cmd, handlerfunc f, char flags, int minparams, char* source);
extern void server_mode(char **parameters, int pcnt, userrec *user);
@@ -667,6 +669,22 @@ class Server : public classbase
*/
virtual chanuserlist GetUsers(chanrec* chan);
+ /** Remove a user's connection to the irc server, but leave their client in existence in the
+ * user hash. When you call this function, the user's file descriptor will be replaced with the
+ * value of FD_MAGIC_NUMBER and their old file descriptor will be closed. This idle client will
+ * remain until it is restored with a valid file descriptor, or is removed from IRC by an operator
+ * After this call, the pointer to user will be invalid.
+ */
+ virtual bool UserToPseudo(userrec* user,std::string message);
+
+ /** This user takes one user, and switches their file descriptor with another user, so that one user
+ * "becomes" the other. The user in 'alive' is booted off the server with the given message. The user
+ * referred to by 'zombie' should have previously been locked with Server::ZombifyUser, otherwise
+ * stale sockets and file descriptor leaks can occur. After this call, the pointer to alive will be
+ * invalid, and the pointer to zombie will be equivalent in effect to the old pointer to alive.
+ */
+ virtual bool PseudoToUser(userrec* alive,userrec* zombie,std::string message);
+
};
#define CONF_NOT_A_NUMBER 0x000010