Improve roulette function to really shoot only a maximum of 6 bullets
[vomak.git] / src / irc.h
blob69b5a296ff2452a92292b627e6c3e7829c7151b2
1 /*
2 * irc.h - this file is part of vomak - a very simple IRC bot
4 * Copyright 2008 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #ifndef IRC_H
22 #define IRC_H 1
26 typedef struct
28 gint socket;
29 GIOChannel *read_ioc;
30 gint lock_tag;
31 FILE *log_fd;
32 gchar *quit_msg;
33 } irc_conn_t;
36 void irc_goodbye (irc_conn_t *irc);
37 gint irc_finalize (irc_conn_t *irc_conn);
38 void irc_connect (irc_conn_t *irc_conn);
39 void irc_send_message (irc_conn_t *irc_conn, const gchar *target, const gchar *format, ...);
40 void irc_send_notice (irc_conn_t *irc_conn, const gchar *target, const gchar *format, ...);
41 gint irc_send (irc_conn_t *irc_conn, const gchar *msg, guint msg_len);
42 const gchar *irc_get_message(const gchar *line, guint len);
43 gboolean irc_query_names (gpointer data);
44 void irc_logfile_reopen (irc_conn_t *irc_conn);
46 #endif