Update waf.
[vomak.git] / src / vomak.h
blobf8a243ee68e00280e1b3efc53a1f517ccacd5925
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 GHashTable *data;
55 } config_t;
57 extern config_t *config;
60 void help_system_query(const gchar *msg);
61 gboolean help_system_learn(const gchar *keyword, const gchar *text);
62 void set_user_list(const gchar *userlist);
63 const gchar *get_user_list();
64 void main_quit();
67 #endif