Phasor
01.00.10.059
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
Phasor
Phasor
Admin.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <string>
4
#include "../Common/Streams.h"
5
6
enum
e_command_result
;
7
8
namespace
commands
9
{
10
class
CArgParser
;
11
}
12
13
namespace
Admin
14
{
15
enum
result_t
16
{
17
E_OK
= 0,
18
E_HASH_INUSE
,
19
E_LEVEL_NOT_EXIST
,
20
E_NAME_INUSE
,
21
E_NOT_ADMIN
,
22
E_NOT_ALLOWED
,
23
};
24
25
// Attempts to add the the admin to the list
26
result_t
add
(
const
std::string& hash,
const
std::string& authname,
int
level);
27
28
// Removes an existing admin, does nothing if they're not an admin.
29
void
remove
(
const
std::string& hash);
30
31
// Checks if a player is an admin
32
bool
isAdmin
(
const
std::string& hash);
33
34
// Gets an admin's access level.
35
bool
getLevel
(
const
std::string& hash,
int
* level);
36
37
// Checks if hash challenging is enabled (defaults to true)
38
bool
isChallengeEnabled
();
39
40
// Checks if a player can execute the specified command
41
// Returns E_OK if there are no admins (the system is inactive)
42
result_t
canUseCommand
(
const
std::string& hash,
const
std::string& command,
43
std::string* authName=NULL);
44
45
// Initialize the admin system, outputting errors to 'out'.
46
// Errors aren't output if 'out' is NULL.
47
void
initialize
(
COutStream
* out);
48
49
// Reloads the admin/access files
50
void
reload
();
51
52
// -------------------------------------------------------------------
53
//
62
e_command_result
sv_admin_add
(
void
*,
commands::CArgParser
& args,
COutStream
& out);
63
70
e_command_result
sv_admin_del
(
void
*,
commands::CArgParser
& args,
COutStream
& out);
71
76
e_command_result
sv_admin_list
(
void
*,
commands::CArgParser
& args,
COutStream
& out);
77
82
e_command_result
sv_admin_cur
(
void
*,
commands::CArgParser
& args,
COutStream
& out);
83
88
e_command_result
sv_admin_reload
(
void
*,
commands::CArgParser
& args,
COutStream
& out);
89
94
e_command_result
sv_commands
(
void
* player,
commands::CArgParser
& args,
COutStream
& out);
95
100
e_command_result
sv_admin_check
(
void
*,
commands::CArgParser
& args,
COutStream
& out);
101
e_command_result
sv_public
(
void
*,
commands::CArgParser
& args,
COutStream
& out);
102
}
Generated on Mon Jul 22 2013 17:09:01 for Phasor by
1.8.2-20121118