summaryrefslogtreecommitdiff
path: root/src/map/irc-bot.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/irc-bot.h')
-rw-r--r--src/map/irc-bot.h29
1 files changed, 17 insertions, 12 deletions
diff --git a/src/map/irc-bot.h b/src/map/irc-bot.h
index 911a15b0e..0c26c3cd8 100644
--- a/src/map/irc-bot.h
+++ b/src/map/irc-bot.h
@@ -3,13 +3,16 @@
// Base Author: shennetsind @ http://hercules.ws
-#ifndef _IRC_BOT_H_
-#define _IRC_BOT_H_
+#ifndef MAP_IRC_BOT_H
+#define MAP_IRC_BOT_H
+
+#include "../common/cbasetypes.h"
#define IRC_NICK_LENGTH 40
#define IRC_IDENT_LENGTH 40
#define IRC_HOST_LENGTH 63
#define IRC_FUNC_LENGTH 30
+#define IRC_MESSAGE_LENGTH 500
struct hChSysCh;
@@ -21,9 +24,9 @@ struct irc_func {
struct irc_bot_interface {
int fd;
bool isIn, isOn;
- unsigned int last_try;
+ int64 last_try;
unsigned char fails;
- unsigned long ip;
+ uint32 ip;
unsigned short port;
/* */
struct hChSysCh *channel;
@@ -33,7 +36,7 @@ struct irc_bot_interface {
unsigned int size;
} funcs;
/* */
- void (*init) (void);
+ void (*init) (bool minimal);
void (*final) (void);
/* */
int (*parse) (int fd);
@@ -42,20 +45,22 @@ struct irc_bot_interface {
/* */
struct irc_func* (*func_search) (char* function_name);
/* */
- int (*connect_timer) (int tid, unsigned int tick, int id, intptr_t data);
- int (*identify_timer) (int tid, unsigned int tick, int id, intptr_t data);
- int (*join_timer) (int tid, unsigned int tick, int id, intptr_t data);
+ int (*connect_timer) (int tid, int64 tick, int id, intptr_t data);
+ int (*identify_timer) (int tid, int64 tick, int id, intptr_t data);
+ int (*join_timer) (int tid, int64 tick, int id, intptr_t data);
/* */
void (*send)(char *str);
- void (*relay) (char *name, char *msg);
+ void (*relay) (char *name, const char *msg);
/* */
void (*pong) (int fd, char *cmd, char *source, char *target, char *msg);
- void (*join) (int fd, char *cmd, char *source, char *target, char *msg);
void (*privmsg) (int fd, char *cmd, char *source, char *target, char *msg);
-} irc_bot_s;
+ void (*userjoin) (int fd, char *cmd, char *source, char *target, char *msg);
+ void (*userleave) (int fd, char *cmd, char *source, char *target, char *msg);
+ void (*usernick) (int fd, char *cmd, char *source, char *target, char *msg);
+};
struct irc_bot_interface *ircbot;
void ircbot_defaults(void);
-#endif /* _IRC_BOT_H_ */
+#endif /* MAP_IRC_BOT_H */