summaryrefslogtreecommitdiff
path: root/include/modules.h
diff options
context:
space:
mode:
authorDukePyrolator <DukePyrolator@5417fbe8-f217-4b02-8779-1006273d7864>2009-06-29 04:47:00 +0000
committerDukePyrolator <DukePyrolator@5417fbe8-f217-4b02-8779-1006273d7864>2009-06-29 04:47:00 +0000
commit15687a7c9eb882edc151870a4f27ac1e8dfd61ce (patch)
treea1180b8d0426a2f9471527efcca3bdd55340f433 /include/modules.h
parent712cbb540c41e56115061be296f419e21111bedd (diff)
changed encryption modules to use the new module API
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2342 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include/modules.h')
-rw-r--r--include/modules.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/include/modules.h b/include/modules.h
index 7a1edf716..a75edac56 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -47,7 +47,8 @@ enum EventReturn
{
EVENT_STOP,
EVENT_CONTINUE,
- EVENT_ALLOW
+ EVENT_ALLOW,
+ EVENT_ERROR
};
@@ -539,6 +540,15 @@ class CoreExport Module
*/
virtual void OnBackupDatabase() MARK_DEPRECATED { }
+ /** Called when anope needs to check passwords against encryption
+ * see src/encrypt.c for detailed informations
+ */
+ virtual EventReturn OnEncrypt(const char *src,int len,char *dest,int size) { return EVENT_CONTINUE; }
+ virtual EventReturn OnEncryptInPlace(char *buf, int size) { return EVENT_CONTINUE; }
+ virtual EventReturn OnEncryptCheckLen(int passlen, int bufsize) { return EVENT_CONTINUE; }
+ virtual EventReturn OnDecrypt(const char *src, char *dest, int size) { return EVENT_CONTINUE; }
+ virtual EventReturn OnCheckPassword(const char *plaintext, const char *password) { return EVENT_CONTINUE; }
+
/** Called on fantasy command
* @param command The command
* @param u The user using the command
@@ -805,17 +815,17 @@ enum Implementation
I_OnUserKicked, I_OnBotFantasy, I_OnBotNoFantasyAccess, I_OnBotBan,
/* Users */
- I_OnUserConnect, I_OnUserNickChange, I_OnUserLogoff, I_OnPreJoinChannel, I_OnJoinChannel, I_OnPrePartChannel, I_OnPartChannel,
+ I_OnUserConnect, I_OnUserNickChange, I_OnUserLogoff, I_OnPreJoinChannel, I_OnJoinChannel,
+ I_OnPrePartChannel, I_OnPartChannel,
/* OperServ */
I_OnDefconLevel,
/* Other */
-
I_OnReload, I_OnPreServerConnect, I_OnServerConnect, I_OnPreCommand, I_OnPostCommand, I_OnSaveDatabase, I_OnBackupDatabase,
I_OnPreDatabaseExpire, I_OnDatabaseExpire, I_OnPreRestart, I_OnRestart, I_OnPreShutdown, I_OnShutdown, I_OnSignal,
I_OnServerQuit, I_OnTopicUpdated,
-
+ I_OnEncrypt, I_OnEncryptInPlace, I_OnEncryptCheckLen, I_OnDecrypt, I_OnCheckPassword,
I_END
};
@@ -943,9 +953,9 @@ struct MessageHash_ {
/*************************************************************************/
/* Module Managment Functions */
-MDE Module *findModule(const char *name); /* Find a module */
+MDE Module *findModule(const char *name); /* Find a module */
-int encryption_module_init(); /* Load the encryption module */
+int encryption_module_init(); /* Load the encryption module */
int protocol_module_init(); /* Load the IRCD Protocol Module up*/
MDE void moduleDisplayHelp(const char *service, User *u);