Anope IRC Services  Version 2.0
os_update.cpp
Go to the documentation of this file.
1 /* OperServ core functions
2  *
3  * (C) 2003-2014 Anope Team
4  * Contact us at team@anope.org
5  *
6  * Please read COPYING and README for further details.
7  *
8  * Based on the original code of Epona by Lara.
9  * Based on the original code of Services by Andy Church.
10  */
11 
12 #include "module.h"
13 
14 class CommandOSUpdate : public Command
15 {
16  public:
17  CommandOSUpdate(Module *creator) : Command(creator, "operserv/update", 0, 0)
18  {
19  this->SetDesc(_("Force the Services databases to be updated immediately"));
20  }
21 
22  void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
23  {
24  Log(LOG_ADMIN, source, this);
25  source.Reply(_("Updating databases."));
27  return;
28  }
29 
30  bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override
31  {
32  this->SendSyntax(source);
33  source.Reply(" ");
34  source.Reply(_("Causes Services to update all database files as soon as you\n"
35  "send the command."));
36  return true;
37  }
38 };
39 
40 class OSUpdate : public Module
41 {
43 
44  public:
45  OSUpdate(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
46  commandosupdate(this)
47  {
48 
49  }
50 };
51 
CommandOSUpdate(Module *creator)
Definition: os_update.cpp:17
bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override
Definition: os_update.cpp:30
CommandOSUpdate commandosupdate
Definition: os_update.cpp:42
void SetDesc(const Anope::string &d)
Definition: command.cpp:130
#define anope_override
Definition: services.h:56
#define MODULE_INIT(x)
Definition: modules.h:45
void Execute(CommandSource &source, const std::vector< Anope::string > &params) anope_override
Definition: os_update.cpp:22
void SendSyntax(CommandSource &)
Definition: command.cpp:145
OSUpdate(const Anope::string &modname, const Anope::string &creator)
Definition: os_update.cpp:45
Definition: logger.h:53
CoreExport void SaveDatabases()
Definition: main.cpp:67
#define _(x)
Definition: services.h:50