]> jfr.im git - irc/evilnet/x3.git/blobdiff - src/common.h
allow auto-oper on LOC too
[irc/evilnet/x3.git] / src / common.h
index 90cab5e5b3713bf2714eb30ba7c597dd9256122a..ffee4f4f27235c6988ad90819ef256ffdcea74b4 100644 (file)
@@ -5,7 +5,7 @@
  *
  * x3 is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
@@ -95,6 +95,7 @@ extern void x3_free(const char *, unsigned int, void *);
 extern void verify(const void *ptr);
 #  define verify(x) verify(x)
 # endif
+
 #elif defined(WITH_MALLOC_SLAB)
 # define malloc(n) slab_malloc(__FILE__, __LINE__, (n))
 # undef calloc
@@ -119,6 +120,9 @@ extern void verify(const void *ptr);
 # define verify(ptr) (void)(ptr)
 #endif
 
+extern char *x3_msnprintf(const int size, const char *format, ...);
+#define msnprintf x3_msnprintf
+
 extern time_t now;
 extern int quit_services;
 extern struct log_type *MAIN_LOG;
@@ -265,7 +269,10 @@ void string_buffer_append_substring(struct string_buffer *buf, const char *tail,
 void string_buffer_append_vprintf(struct string_buffer *buf, const char *fmt, va_list args);
 void string_buffer_append_printf(struct string_buffer *buf, const char *fmt, ...);
 void string_buffer_replace(struct string_buffer *buf, unsigned int from, unsigned int len, const char *repl);
+void
+irc_strtolower(char *str);
 
+int str_is_number(const char *str);
 #define enabled_string(string)  (!irccasecmp((string), "on") || !strcmp((string), "1") || !irccasecmp((string), "enabled"))
 #define disabled_string(string) (!irccasecmp((string), "off") || !strcmp((string), "0") || !irccasecmp((string), "disabled"))
 #define true_string(string)     (!irccasecmp((string), "true") || !strcmp((string), "1") || !irccasecmp((string), "yes"))