diff options
Diffstat (limited to 'irc.h')
-rw-r--r-- | irc.h | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -0,0 +1,24 @@ +/* + * Copyright (c) Natanael Copa 2009, 2010 + * GPL-2 + * + */ + +#ifndef IRC_H +#define IRC_H + +struct irc_session { + int fd; + const char *server; + const char *nick; + int last_pong; +}; + +struct irc_session *irc_connect(const char* server, int port, const char *nick, + const char *pass); +int irc_send(struct irc_session *s, const char *command, const char *args); +int irc_send_chan(struct irc_session *s, const char *chan, const char *msg); +int irc_send_ping(struct irc_session *s); +int irc_close(struct irc_session *s, const char *msg); + +#endif /* IRC_H */ |