blob: 93c1f978cc1a266be14a1443933f5a3cdf7fd973 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
/*
* Copyright (C) 2008-2010 Robin Burchell <w00t@inspircd.org>
* Copyright (C) 2008-2010 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*/
#include "services.h"
#include "modules.h"
Command::Command(const Anope::string &sname, size_t min_params, size_t max_params, const Anope::string &spermission) : MaxParams(max_params), MinParams(min_params), name(sname), permission(spermission)
{
this->module = NULL;
this->service = NULL;
}
Command::~Command()
{
if (this->module)
this->module->DelCommand(this->service, this);
}
CommandReturn Command::Execute(User *u, const std::vector<Anope::string> &)
{
return MOD_CONT;
}
void Command::OnServHelp(User *u) { }
bool Command::OnHelp(User *u, const Anope::string &subcommand) { return false; }
void Command::OnSyntaxError(User *u, const Anope::string &subcommand) { }
void Command::SetPermission(const Anope::string &reststr)
{
this->permission = reststr;
}
bool Command::AddSubcommand(Command *c)
{
return false;
}
bool Command::DelSubcommand(Command *c)
{
return false;
}
Command *Command::FindSubcommand(const Anope::string &name)
{
return NULL;
}
|