summaryrefslogtreecommitdiff
path: root/src/char/loginif.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-07 17:38:31 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-15 11:47:29 +0300
commit8338483dd4c41bc9831bebc9d6dc1808247fc497 (patch)
tree62af0b36fdd3552eda22e3197f1d3e0e7fb30fc1 /src/char/loginif.c
parent9658066ce2f411375b9876d0c02737752b816e58 (diff)
downloadhercules-8338483dd4c41bc9831bebc9d6dc1808247fc497.tar.gz
hercules-8338483dd4c41bc9831bebc9d6dc1808247fc497.tar.bz2
hercules-8338483dd4c41bc9831bebc9d6dc1808247fc497.tar.xz
hercules-8338483dd4c41bc9831bebc9d6dc1808247fc497.zip
Add most functions from char.c to interfaces.
Introduced interfaces: chr, mapif, loginif.
Diffstat (limited to 'src/char/loginif.c')
-rw-r--r--src/char/loginif.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/char/loginif.c b/src/char/loginif.c
new file mode 100644
index 000000000..4026d1f7d
--- /dev/null
+++ b/src/char/loginif.c
@@ -0,0 +1,45 @@
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Portions Copyright (c) Athena Dev Teams
+
+#define HERCULES_CORE
+
+#include "loginif.h"
+
+#include <stdlib.h>
+
+#include "char.h"
+#include "../common/cbasetypes.h"
+#include "../common/mmo.h"
+#include "../common/random.h"
+#include "../common/showmsg.h"
+#include "../common/socket.h"
+#include "../common/strlib.h"
+
+void loginif_reset(void);
+void loginif_check_shutdown(void);
+void loginif_on_disconnect(void);
+void loginif_on_ready(void);
+void loginif_block_account(int account_id, int flag);
+void loginif_ban_account(int account_id, short year, short month, short day, short hour, short minute, short second);
+void loginif_unban_account(int account_id);
+void loginif_changesex(int account_id);
+void loginif_auth(int fd, struct char_session_data* sd, uint32 ipl);
+void loginif_send_users_count(int users);
+void loginif_connect_to_server(void);
+
+void loginif_defaults(void) {
+ loginif = &loginif_s;
+
+ loginif->reset = loginif_reset;
+ loginif->check_shutdown = loginif_check_shutdown;
+ loginif->on_disconnect = loginif_on_disconnect;
+ loginif->on_ready = loginif_on_ready;
+ loginif->block_account = loginif_block_account;
+ loginif->ban_account = loginif_ban_account;
+ loginif->unban_account = loginif_unban_account;
+ loginif->changesex = loginif_changesex;
+ loginif->auth = loginif_auth;
+ loginif->send_users_count = loginif_send_users_count;
+ loginif->connect_to_server = loginif_connect_to_server;
+}