if (match_ircglob(hidden_host, glob))
return 1;
}
+
+ /* Match crypt hostname */
+ if (match_ircglob(user->crypthost, glob))
+ return 1;
+
+ /* Match crypt IP */
+ if (match_ircglob(user->cryptip, glob))
+ return 1;
+
/* If only matching the visible hostnames, bail early. */
if ((flags & MATCH_VISIBLE) && IsHiddenHost(user)
&& (IsFakeHost(user) || (hidden_host_suffix && user->handle_info)))
return(retstr);
}
+/* Mallocing snprintf *
+ *
+ * If it overruns size, it will simply be safely truncated.
+ */
+char *
+x3_msnprintf(const int size, const char *format, ...)
+{
+ va_list ap;
+ char* buff = calloc(sizeof(char *), size+1);
+
+ va_start(ap, format);
+ vsnprintf(buff, size, format, ap);
+ va_end(ap);
+ buff = realloc(buff, strlen(buff) + 1);
+ return buff;
+}
+
char *time2str(time_t thetime)
{
char *buf, *tmp;
}
return make_nick_user_host(retmask, nick, user, host);
}
+
+int str_is_number(const char *str)
+{
+ char *ptr;
+ int ret = false;
+ for(ptr = (char *)str;*ptr;ptr++) {
+ if((*ptr >= '0' && *ptr <= '9') || *ptr == '-')
+ ret = true;
+ else
+ return false;
+ }
+ return ret;
+}