aboutsummaryrefslogtreecommitdiffstats
path: root/irc.h
blob: e5dd2c81e29c9d50d3bf9a2f30f7d160476f2de1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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 */