mirror of
https://github.com/anope/anope.git
synced 2026-07-05 16:43:12 +02:00
Shuffle shit around.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2062 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
+13
-10
@@ -54,16 +54,7 @@ class NickAlias
|
||||
class NickCore : public Extensible
|
||||
{
|
||||
public:
|
||||
NickCore()
|
||||
{
|
||||
next = prev = NULL;
|
||||
display = email = greet = url = NULL;
|
||||
ot = NULL;
|
||||
pass[0] = '\0';
|
||||
icq = flags = 0;
|
||||
language = accesscount = channelcount = 0;
|
||||
lastmail = 0;
|
||||
}
|
||||
NickCore();
|
||||
|
||||
NickCore *next, *prev;
|
||||
|
||||
@@ -85,5 +76,17 @@ class NickCore : public Extensible
|
||||
/* Unsaved data */
|
||||
time_t lastmail; /* Last time this nick record got a mail */
|
||||
SList aliases; /* List of aliases */
|
||||
|
||||
/** Check whether this opertype has access to run the given command string.
|
||||
* @param cmdstr The string to check, e.g. botserv/set/private.
|
||||
* @return True if this opertype may run the specified command, false otherwise.
|
||||
*/
|
||||
bool HasCommand(const std::string &cmdstr);
|
||||
|
||||
/** Check whether this opertype has access to the given special permission.
|
||||
* @param privstr The priv to check for, e.g. users/auspex.
|
||||
* @return True if this opertype has the specified priv, false otherwise.
|
||||
*/
|
||||
bool HasPriv(const std::string &privstr);
|
||||
};
|
||||
|
||||
|
||||
+2
-1
@@ -1,4 +1,4 @@
|
||||
OBJS = actions.o base64.o bots.o botserv.o channels.o chanserv.o commands.o compat.o \
|
||||
OBJS = account.cpp actions.o base64.o bots.o botserv.o channels.o chanserv.o commands.o compat.o \
|
||||
config.o datafiles.o encrypt.o events.o hashcomp.o helpserv.o hostserv.o init.o ircd.o language.o log.o mail.o main.o \
|
||||
memory.o memoserv.o messages.o misc.o modules.o news.o nickserv.o operserv.o \
|
||||
process.o protocol.o send.o servers.o sessions.o slist.o sockutil.o opertype.o timeout.o users.o module.o modulemanager.o configreader.o \
|
||||
@@ -33,6 +33,7 @@ services: $(OBJS) mod_version
|
||||
@$(MAKEBIN) $(CC) $(CFLAGS) $(OBJS) $(ANOPELIBS) $(MLIBS) -o $@ $(LDFLAGS)
|
||||
|
||||
$(OBJS): Makefile
|
||||
account.o: account.cpp $(INCLUDES)
|
||||
actions.o: actions.c $(INCLUDES)
|
||||
base64.o: base64.c $(INCLUDES)
|
||||
bots.o: bots.cpp $(INCLUDES)
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
#include "services.h"
|
||||
|
||||
NickCore::NickCore()
|
||||
{
|
||||
next = prev = NULL;
|
||||
display = email = greet = url = NULL;
|
||||
ot = NULL;
|
||||
pass[0] = '\0';
|
||||
icq = flags = 0;
|
||||
language = accesscount = channelcount = 0;
|
||||
lastmail = 0;
|
||||
}
|
||||
|
||||
bool NickCore::HasCommand(const std::string &cmdstr)
|
||||
{
|
||||
if (!this->ot)
|
||||
{
|
||||
// No opertype.
|
||||
return false;
|
||||
}
|
||||
|
||||
return this->ot->HasCommand(cmdstr);
|
||||
}
|
||||
|
||||
bool NickCore::HasPriv(const std::string &privstr)
|
||||
{
|
||||
if (!this->ot)
|
||||
{
|
||||
// No opertype.
|
||||
return false;
|
||||
}
|
||||
|
||||
return this->ot->HasPriv(privstr);
|
||||
}
|
||||
Reference in New Issue
Block a user