]> jfr.im git - irc/evilnet/x3.git/blobdiff - src/proto-common.c
Fix for "whats the color" 8ball question formats
[irc/evilnet/x3.git] / src / proto-common.c
index 2d8e1f892b773a84cca1ac79fc0bd30c628dd6bb..3505f5ecb0c96dd3d9b755360a531fd03c432439 100644 (file)
@@ -26,6 +26,7 @@
 #include "spamserv.h"
 #include "shun.h"
 #include "timeq.h"
+#include "version.h"
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
 #endif
@@ -370,7 +371,7 @@ static CMD_FUNC(cmd_version)
         log_module(MAIN_LOG, LOG_ERROR, "Could not find VERSION origin user %s", origin);
         return 0;
     }
-    irc_numeric(user, 351, "%s %s %s", PACKAGE_TARNAME, PACKAGE_VERSION, self->name);
+    irc_numeric(user, 351, "%s %s+[%s] %s", PACKAGE_TARNAME, PACKAGE_VERSION, cvs_version, self->name);
     return 1;
 }
 
@@ -903,10 +904,10 @@ generate_hostmask(struct userNode *user, int options)
         if (data)
             style = atoi(data);
 
-        if ((style == 1) && user->handle_info && hidden_host_suffix && !(options & GENMASK_NO_HIDING)) {
+        if (((style == 1) || (style == 3)) && 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)) {
+        } else if (((style == 2) || (style == 3)) && !(options & GENMASK_NO_HIDING)) {
             hostname = alloca(strlen(user->crypthost));
             sprintf(hostname, "%s", user->crypthost);
         }