#include <opertype.h>

Public Member Functions | |
| OperType (const Anope::string &nname) | |
| bool | HasCommand (const Anope::string &cmdstr) const |
| bool | HasPriv (const Anope::string &privstr) const |
| void | AddCommand (const Anope::string &cmdstr) |
| void | AddPriv (const Anope::string &privstr) |
| const Anope::string & | GetName () const |
| void | Inherits (OperType *ot) |
| const std::list< Anope::string > | GetCommands () const |
| const std::list< Anope::string > | GetPrivs () const |
Static Public Member Functions | |
| static OperType * | Find (const Anope::string &name) |
Data Fields | |
| Anope::string | modes |
Private Attributes | |
| Anope::string | name |
| std::list< Anope::string > | privs |
| std::list< Anope::string > | commands |
| std::set< OperType * > | inheritances |
Definition at line 45 of file opertype.h.
| OperType::OperType | ( | const Anope::string & | nname | ) |
Create a new opertype of the given name.
| nname | The opertype name, e.g. "sra". |
Definition at line 41 of file opertype.cpp.
| void OperType::AddCommand | ( | const Anope::string & | cmdstr | ) |
Add the specified command to this opertype.
| cmdstr | The command mask to grant this opertype access to, e.g: nickserv/ *, chanserv/set/ *, botserv/set/private. |
Definition at line 81 of file opertype.cpp.
References commands.
Referenced by DoOperType().
| void OperType::AddPriv | ( | const Anope::string & | privstr | ) |
Add the specified priv mask to this opertype.
| privstr | The specified mask of privs to grant this opertype access to, e.g. users/auspex, users/ *, etc. |
Definition at line 86 of file opertype.cpp.
References privs.
Referenced by DoOperType().
| OperType * OperType::Find | ( | const Anope::string & | name | ) | [static] |
Find an oper type by name
| name | The name |
Definition at line 28 of file opertype.cpp.
References Config, GetName(), and ServerConfig::MyOperTypes.
Referenced by CommandOSOper::Execute(), SQLOperResult::OnResult(), and IdentifyInterface::OnResult().
| const std::list< Anope::string > OperType::GetCommands | ( | ) | const |
Gets the icommands for this opertype
Definition at line 101 of file opertype.cpp.
References commands, GetPrivs(), and inheritances.
Referenced by CommandOSOper::Execute().
| const Anope::string & OperType::GetName | ( | ) | const |
Returns the name of this opertype.
Definition at line 91 of file opertype.cpp.
References name.
Referenced by DoneOpers(), DoOperType(), MyXMLRPCEvent::DoUser(), CommandOSOper::Execute(), Find(), IdentifyInterface::OnResult(), Message::Stats::Run(), MyOper::Serialize(), and MyOper::Unserialize().
| const std::list< Anope::string > OperType::GetPrivs | ( | ) | const |
Gets the privileges for this opertype
Definition at line 114 of file opertype.cpp.
References GetPrivs(), inheritances, and privs.
Referenced by CommandOSOper::Execute(), GetCommands(), and GetPrivs().
| bool OperType::HasCommand | ( | const Anope::string & | cmdstr | ) | const |
Check whether this opertype has access to run the given command string.
| cmdstr | The string to check, e.g. botserv/set/private. |
Definition at line 45 of file opertype.cpp.
References commands, HasCommand(), inheritances, and Anope::Match().
Referenced by HasCommand().
| bool OperType::HasPriv | ( | const Anope::string & | privstr | ) | const |
Check whether this opertype has access to the given special permission.
| privstr | The priv to check for, e.g. users/auspex. |
Definition at line 63 of file opertype.cpp.
References HasPriv(), inheritances, Anope::Match(), and privs.
Referenced by HasPriv().
| void OperType::Inherits | ( | OperType * | ot | ) |
Make this opertype inherit commands and privs from another opertype
| ot | The opertype to inherit from |
Definition at line 96 of file opertype.cpp.
References inheritances.
Referenced by DoOperType().
std::list<Anope::string> OperType::commands [private] |
Commands this user may execute, e.g: botserv/set/ *, botserv/set/private, botserv/ * et cetera.
This *must* be std::list, not std::map, because we support full globbing here. This shouldn't be a problem as we don't invoke it often.
Definition at line 65 of file opertype.h.
Referenced by AddCommand(), GetCommands(), and HasCommand().
std::set<OperType *> OperType::inheritances [private] |
Set of opertypes we inherit from
Definition at line 69 of file opertype.h.
Referenced by GetCommands(), GetPrivs(), HasCommand(), HasPriv(), and Inherits().
Modes to set when someone identifys using this opertype
Definition at line 73 of file opertype.h.
Referenced by DoOperType(), and CommandOSOper::Execute().
Anope::string OperType::name [private] |
The name of this opertype, e.g. "sra".
Definition at line 50 of file opertype.h.
Referenced by GetName().
std::list<Anope::string> OperType::privs [private] |
Privs that this opertype may use, e.g. 'users/auspex'. This *must* be std::list, see commands comment for details.
Definition at line 55 of file opertype.h.
Referenced by AddPriv(), GetPrivs(), and HasPriv().
1.7.1