summaryrefslogtreecommitdiff
path: root/src/login/loginlog.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-02-06 20:49:01 +0300
committerAndrei Karas <akaras@inbox.ru>2018-02-09 18:34:44 +0300
commitf9c920a728d1a8406fa4a15a395eee23b9bccc7a (patch)
tree7e5f4108f63259f8ddea30285137ee0fdd201529 /src/login/loginlog.h
parent90e1201d43939e29dc0b0d8807694ff1f710a27f (diff)
downloadhercules-f9c920a728d1a8406fa4a15a395eee23b9bccc7a.tar.gz
hercules-f9c920a728d1a8406fa4a15a395eee23b9bccc7a.tar.bz2
hercules-f9c920a728d1a8406fa4a15a395eee23b9bccc7a.tar.xz
hercules-f9c920a728d1a8406fa4a15a395eee23b9bccc7a.zip
Add interface into loginlog.c.
Diffstat (limited to 'src/login/loginlog.h')
-rw-r--r--src/login/loginlog.h25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/login/loginlog.h b/src/login/loginlog.h
index 8153dd769..8edbedbaa 100644
--- a/src/login/loginlog.h
+++ b/src/login/loginlog.h
@@ -21,15 +21,28 @@
#ifndef LOGIN_LOGINLOG_H
#define LOGIN_LOGINLOG_H
+#include "common/hercules.h"
#include "common/cbasetypes.h"
+struct config_t;
+
+/**
+ * Loginlog.c Interface
+ **/
+struct loginlog_interface {
+ unsigned long (*failedattempts) (uint32 ip, unsigned int minutes);
+ void (*log) (uint32 ip, const char* username, int rcode, const char* message);
+ bool (*init) (void);
+ bool (*final) (void);
+ bool (*config_read_names) (const char *filename, struct config_t *config, bool imported);
+ bool (*config_read_log) (const char *filename, struct config_t *config, bool imported);
+ bool (*config_read) (const char *filename, bool imported);
+};
+
#ifdef HERCULES_CORE
-// TODO: Interface
-unsigned long loginlog_failedattempts(uint32 ip, unsigned int minutes);
-void loginlog_log(uint32 ip, const char* username, int rcode, const char* message);
-bool loginlog_init(void);
-bool loginlog_final(void);
-bool loginlog_config_read(const char *filename, bool imported);
+void loginlog_defaults(void);
#endif // HERCULES_CORE
+HPShared struct loginlog_interface *loginlog;
+
#endif /* LOGIN_LOGINLOG_H */