* Parts of the RPMODE_SYS were not appropriately enclosed in ifdef
statements, causing all non-privileged players to be rpgagged on
channels. [RLB]
+ * Improved PennMUSH to CobraMUSH flag conversion code for flags that are
+ set to be of 'ANY' type. [RLB]
* Fixed a bug related to uninitialized lastmod entries [AEJ]
* Fixed SHS 64-bit incompatability, to allow password encryption
to work properly on 64-bit platforms [AEJ]
#define NOTYPE 0xFFFF
#define ALLTYPES (0 | TYPE_ROOM | TYPE_THING | TYPE_EXIT | TYPE_PLAYER | TYPE_DIVISION)
+#define ALL_PENNMUSH_TYPES (0 | TYPE_ROOM | TYPE_THING | TYPE_EXIT | TYPE_PLAYER)
#define HAS_COBRADBFLAG(x,y) (!(x & DBF_TYPE_GARBAGE) && (x & y)) /* Macro exists so cobra & penn dbflags can exist as same DBFs */
+#define IS_COBRA_DB(x) (!(x & DBF_TYPE_GARBAGE))
+
/* Reboot DB flag macros - these should be defined whether or not the
* corresponding system option is defined
* They are successive binary numbers
}
#endif
#ifdef HAS_TEXTDOMAIN
- textdomain("pennmush");
+ textdomain("cobramush");
#endif
#ifdef HAS_BINDTEXTDOMAIN
- bindtextdomain("pennmush", "../po");
+ bindtextdomain("cobramush", "../po");
#endif
/* Build the locale-dependant tables used by PCRE */
db_read_this_labeled_string(in, "type", &tmp);
if(!strcmp(tmp, "ANY"))
f->type = ALLTYPES;
- else
+ else {
f->type = string_to_privs(type_privs, tmp, 0);
+ /* Check to See if we're converting from Penn.. if so, change their Any to include our Any */
+ if(!IS_COBRA_DB(flagdb_flags) && f->type == ALL_PENNMUSH_TYPES)
+ f->type = ALLTYPES;
+ }
db_read_this_labeled_string(in, "perms", &tmp);
f->perms = string_to_privs(flag_privs, tmp, 0);
db_read_this_labeled_string(in, "negate_perms", &tmp);
return;
}
+ do_rawlog(LT_ERR, T("Initializing flag table."));
+
ptab_init(n->tab);
/* do regular flags first */
for (f = n->flag_table; f->name; f++) {
T("FLAG INIT: flag alias %s matches no known flag."), a->alias);
}
flag_add_additional();
+
+ do_rawlog(LT_ERR, T("Flag table initialization complete."));
}
/* This is where the developers will put flag_add statements to create