Fix for amb1565 CCmdManager's gotAccess check was retardedly checking to make sure a user has all access flags instead of one of the access flags; this is inconsistent with how access is checked elsewhere

This commit is contained in:
Steve Dudenhoeffer 2008-04-10 05:42:06 +00:00
parent 074fd60f3c
commit 313044fe89

View File

@ -78,7 +78,7 @@ public:
inline bool matchCommandLine(const char* cmd, const char* arg) { return (!stricmp(command.c_str() + prefix, cmd + prefix) && (argument.empty() || !stricmp(argument.c_str(), arg))); } inline bool matchCommandLine(const char* cmd, const char* arg) { return (!stricmp(command.c_str() + prefix, cmd + prefix) && (argument.empty() || !stricmp(argument.c_str(), arg))); }
inline bool matchCommand(const char* cmd) { return (!strcmp(command.c_str(), cmd)); } inline bool matchCommand(const char* cmd) { return (!strcmp(command.c_str(), cmd)); }
inline int getFunction() const { return function; } inline int getFunction() const { return function; }
inline bool gotAccess(int f) const { return (!flags || ((flags & f) == flags)); } inline bool gotAccess(int f) const { return (!flags || ((flags & f) != 0)); }
inline CPluginMngr::CPlugin* getPlugin() { return plugin; } inline CPluginMngr::CPlugin* getPlugin() { return plugin; }
inline bool isViewable() const { return listable; } inline bool isViewable() const { return listable; }
inline int getFlags() const { return flags; } inline int getFlags() const { return flags; }