diff options
author | MatthewM <mcm@they-got.us> | 2012-12-17 14:32:28 -0500 |
---|---|---|
committer | MatthewM <mcm@they-got.us> | 2012-12-17 14:32:28 -0500 |
commit | f33f7d98c4d38aabb9f9c54c7880249262e767a4 (patch) | |
tree | eec25f848b546ce8d5d378893cddabb4a6161953 /modules/extra/webcpanel/webcpanel.cpp | |
parent | 6b5f583ff36b7719e6358b92a9a35c59090a3011 (diff) |
Added a modal window interface to MemoServs page that will automaticly fade out after a give time (currently 5s)
Diffstat (limited to 'modules/extra/webcpanel/webcpanel.cpp')
-rw-r--r-- | modules/extra/webcpanel/webcpanel.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/extra/webcpanel/webcpanel.cpp b/modules/extra/webcpanel/webcpanel.cpp index a20b88ee9..816624628 100644 --- a/modules/extra/webcpanel/webcpanel.cpp +++ b/modules/extra/webcpanel/webcpanel.cpp @@ -217,12 +217,12 @@ class ModuleWebCPanel : public Module namespace WebPanel { - void RunCommand(const Anope::string &user, NickCore *nc, const Anope::string &service, const Anope::string &c, const std::vector<Anope::string> ¶ms, TemplateFileServer::Replacements &r) + void RunCommand(const Anope::string &user, NickCore *nc, const Anope::string &service, const Anope::string &c, const std::vector<Anope::string> ¶ms, TemplateFileServer::Replacements &r, const Anope::string &key) { ServiceReference<Command> cmd("Command", c); if (!cmd) { - r["MESSAGES"] = "Unable to find command " + c; + r[key] = "Unable to find command " + c; return; } @@ -237,15 +237,16 @@ namespace WebPanel struct MyComandReply : CommandReply { TemplateFileServer::Replacements &re; + const Anope::string &k; - MyComandReply(TemplateFileServer::Replacements &_r) : re(_r) { } + MyComandReply(TemplateFileServer::Replacements &_r, const Anope::string &_k) : re(_r), k(_k) { } void SendMessage(const BotInfo *source, const Anope::string &msg) anope_override { - re["MESSAGES"] = msg; + re[k] = msg; } } - my_reply(r); + my_reply(r, key); CommandSource source(user, NULL, nc, &my_reply, bi); cmd->Execute(source, params); |