irc: Expose more IRC functionality

Now exposing the connection event and raw incoming commands.
This commit is contained in:
Christian Decker
2016-09-27 18:26:35 +02:00
parent 356bb73fe9
commit c97c47da47
2 changed files with 14 additions and 4 deletions

4
irc.h
View File

@@ -53,8 +53,10 @@ struct ircstate {
struct timerel reconnect_timeout;
};
/* Callback to register for incoming messages */
/* Callbacks to register for incoming messages, events and raw commands */
extern void (*irc_privmsg_cb)(struct ircstate *, const struct privmsg *);
extern void (*irc_command_cb)(struct ircstate *, const struct irccommand *);
extern void (*irc_connect_cb)(struct ircstate *);
extern void (*irc_disconnect_cb)(struct ircstate *);
/* Send messages to IRC */