You know the game, fix URL, EOL.
[vomak.git] / src / vomak.h
blob18b68938032082706d22846ec14b341464d4e49a
1 /*
2 * vomak.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 VOMAK_H
22 #define VOMAK_H 1
25 #ifdef DEBUG
26 #define vdebug(str) g_message("%s: "#str"=%s", __func__, str)
27 #define debug(a, varargs...) g_message(a, ##varargs)
28 #define TRACE g_message("Entering: %s", __func__);
29 #else
30 #define vdebug(str)
31 #define debug(a, varargs...)
32 #define TRACE
33 #endif
36 /* Returns: TRUE if @a ptr points to a non-zero value. */
37 #define NZV(ptr) \
38 ((ptr) && (ptr)[0])
41 typedef struct
43 gchar *socketname; // vomak <-> unix domain socket
44 gchar *socketperm;
45 gchar *server;
46 gint port;
47 gchar *channel;
48 gchar *servername;
49 gchar *nickname;
50 gchar *username;
51 gchar *realname;
52 gchar *nickserv_password;
53 gchar *logfile;
54 gchar *fortune_cmd;
55 gint query_names_interval;
56 gboolean auto_rejoin;
57 GHashTable *data;
58 } config_t;
60 extern config_t *config;
63 void help_system_query(const gchar *msg);
64 gboolean help_system_learn(const gchar *keyword, const gchar *text);
65 void set_user_list(const gchar *userlist);
66 const gchar *get_user_list();
67 void main_quit();
69 void vomak_warning(gchar const *format, ...) G_GNUC_PRINTF (1, 2);
71 #endif