]> jfr.im git - irc/evilnet/x3.git/blobdiff - src/proto-common.c
found out from Kyle what b flag is.
[irc/evilnet/x3.git] / src / proto-common.c
index 2ee138bba28759c5b81de45e2943069a31206048..22ec8cc1ac715b97787c4699f670df6cd6e99f48 100644 (file)
@@ -1,7 +1,7 @@
 /* proto-common.c - common IRC protocol parsing/sending support
  * Copyright 2000-2004 srvx Development Team
  *
- * This file is part of srvx.
+ * This file is part of x3.
  *
  * srvx is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -373,7 +373,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 :%s", PACKAGE_TARNAME, PACKAGE_VERSION, self->name, CODENAME);
+    irc_numeric(user, 351, "%s %s %s", PACKAGE_TARNAME, PACKAGE_VERSION, self->name);
     return 1;
 }
 
@@ -626,13 +626,23 @@ mod_chanmode_apply(struct userNode *who, struct chanNode *channel, struct mod_ch
                 break;
             }
             break;
+            /* XXX Hack: this is the stupedest use of switch iv ever seen.
+             * you have to compare for EVERY POSSIBLE COMBINATION of bitmask
+             * because switch does only full comparison. This needs redone as if/else.
+             **/
         case MODE_CHANOP:
         case MODE_HALFOP:
         case MODE_VOICE:
+        case MODE_VOICE|MODE_CHANOP:
+        case MODE_VOICE|MODE_HALFOP:
+        case MODE_CHANOP|MODE_HALFOP:
         case MODE_VOICE|MODE_CHANOP|MODE_HALFOP:
         case MODE_REMOVE|MODE_CHANOP:
         case MODE_REMOVE|MODE_HALFOP:
         case MODE_REMOVE|MODE_VOICE:
+        case MODE_REMOVE|MODE_VOICE|MODE_CHANOP:
+        case MODE_REMOVE|MODE_VOICE|MODE_HALFOP:
+        case MODE_REMOVE|MODE_CHANOP|MODE_HALFOP:
         case MODE_REMOVE|MODE_VOICE|MODE_CHANOP|MODE_HALFOP:
             if (change->args[ii].mode & MODE_REMOVE)
                 change->args[ii].u.member->modes &= ~change->args[ii].mode;
@@ -737,7 +747,7 @@ generate_hostmask(struct userNode *user, int options)
         mask = ~0 << masklen;
         masked_ip = ntohl(user->ip.s_addr) & mask;
         hostname = alloca(32);
-        if (options & GENMASK_SRVXMASK) {
+        if (options & GENMASK_X3MASK) {
             sprintf(hostname, "%d.%d.%d.%d/%d", (masked_ip>>24)&0xFF, (masked_ip>>16)&0xFF, (masked_ip>>8)&0xFF, masked_ip&0xFF, masklen);
         } else {
             int ofs = 0;