From b897894d81184417f5d88b5bea8ef7f2b7da728d Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Tue, 29 Dec 2009 14:41:25 +0000 Subject: initial commit --- irc.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 irc.h (limited to 'irc.h') diff --git a/irc.h b/irc.h new file mode 100644 index 0000000..e5dd2c8 --- /dev/null +++ b/irc.h @@ -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 */ -- cgit v1.2.3