commit 1a44ced15ba7c80a37459b7bbd7584c4ee811cd4
parent c2e0c8245a171a545391db0dec3508fec0a02c0e
Author: Antoine Amarilli <a3nm@a3nm.net>
Date: Fri, 29 Aug 2014 20:14:39 +0200
check libircclient version
Diffstat:
1 file changed, 10 insertions(+), 0 deletions(-)
diff --git a/irctk.c b/irctk.c
@@ -23,6 +23,7 @@
#define E_SERVER_ERROR 5
#define E_BADNAME 6
#define E_BADLINE 7
+#define E_LIBIRCCLIENT_VERSION 7
enum do_say_type {DO_SAY_MSG, DO_SAY_NOTICE};
@@ -1949,6 +1950,15 @@ void ssl_rename() {
int main (int argc, char **argv)
{
+ // check libircclient version
+ unsigned int high, low;
+ irc_get_version(&high, &low);
+ if (high < 1 || (high == 1 && low < 8)) {
+ die(E_LIBIRCCLIENT_VERSION,
+ "Need libircclient >= 1.8 but was compiled against %d.%d\n",
+ high, low);
+ }
+
// initialize the default option values
initialize_args();