#define AC_INVITE 7 // a user is being invited
#define AC_GENERAL_MODE 8 // a user channel mode is being changed
+// used to define a set of behavior bits for a module
+
+#define VF_STATIC 1 // module is static, cannot be /unloadmodule'd
+#define VF_VENDOR 2 // module is a vendor module (came in the original tarball, not 3rd party)
+#define VF_SERVICEPROVIDER 4 // module provides a service to other modules (can be a dependency)
+#define VF_COMMON 8 // module needs to be common on all servers in a mesh to link
+
#include "dynamic.h"
#include "base.h"
#include "ctables.h"
* check user->server before taking any action (including returning nonzero from the method).
* If your method returns nonzero, the nickchange is silently forbidden, and it is down to your
* module to generate some meaninful output.
- * You may alter the message text as you wish before relinquishing control to the next module
- * in the chain, and if no other modules block the text this altered form of the text will be sent out
- * to the user and possibly to other servers.
*/
virtual int OnUserPreNick(userrec* user, std::string newnick);
+ /** Called after any nickchange, local or remote. This can be used to track users after nickchanges
+ * have been applied. Please note that although you can see remote nickchanges through this function, you should
+ * NOT make any changes to the userrec if the user is a remote user as this may cause a desnyc.
+ * check user->server before taking any action (including returning nonzero from the method).
+ * Because this method is called after the nickchange is taken place, no return values are possible
+ * to indicate forbidding of the nick change. Use OnUserPreNick for this.
+ */
+ virtual void OnUserPostNick(userrec* user, std::string oldnick);
+
/** Called before an action which requires a channel privilage check.
* This function is called before many functions which check a users status on a channel, for example
* before opping a user, deopping a user, kicking a user, etc.