Make roulette command more realistic (change probability to 1/6).
[vomak.git] / vomak.h
blob3a1f25d3ee67a7525580eb8ccd7fff8592d97386
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 GHashTable *data;
54 } config_t;
56 extern config_t *config;
60 void help_system_query(const gchar *line, guint len);
61 gboolean help_system_learn(const gchar *keyword, const gchar *text);
62 void set_user_list(const gchar *userlist);
65 #endif