#include "ioset.h"
#include "log.h"
#include "nickserv.h"
+#include "spamserv.h"
#include "shun.h"
#include "timeq.h"
#ifdef HAVE_SYS_SOCKET_H
if (!pd->is_notice && cf->func
&& ((cn->modes & MODE_REGISTERED) || GetUserMode(cn, cf->service)))
cf->func(pd->user, cn, pd->text+1, cf->service);
+ else
+ spamserv_channel_message(cn, pd->user, pd->text);
/* This catches *all* text sent to the channel that the services server sees */
for (x = 0; x < ALLCHANMSG_FUNCS_MAX; x++) {
hostname = user->hostname;
if (IsFakeHost(user) && IsHiddenHost(user) && !(options & GENMASK_NO_HIDING)) {
hostname = user->fakehost;
- } else if (IsHiddenHost(user) && user->handle_info && hidden_host_suffix && !(options & GENMASK_NO_HIDING)) {
- hostname = alloca(strlen(user->handle_info->handle) + strlen(hidden_host_suffix) + 2);
- sprintf(hostname, "%s.%s", user->handle_info->handle, hidden_host_suffix);
+ } else if (IsHiddenHost(user)) {
+ int style = 1;
+ char *data;
+ data = conf_get_data("server/hidden_host_type", RECDB_QSTRING);
+ if (data)
+ style = atoi(data);
+
+ if ((style == 1) && user->handle_info && hidden_host_suffix && !(options & GENMASK_NO_HIDING)) {
+ hostname = alloca(strlen(user->handle_info->handle) + strlen(hidden_host_suffix) + 2);
+ sprintf(hostname, "%s.%s", user->handle_info->handle, hidden_host_suffix);
+ } else if ((style == 2) && !(options & GENMASK_NO_HIDING)) {
+ hostname = alloca(strlen(user->crypthost));
+ sprintf(hostname, "%s", user->crypthost);
+ }
} else if (options & GENMASK_STRICT_HOST) {
if (options & GENMASK_BYIP)
hostname = (char*)irc_ntoa(&user->ip);