diff options
author | Adam <Adam@anope.org> | 2017-01-27 08:40:26 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2017-01-27 08:40:26 -0500 |
commit | 9ad06f49bbb3824139b0c0ee0a74898a18c8f735 (patch) | |
tree | 618a4f0e173166e6f966a7cce78f06c3c1c3299f /src/bots.cpp | |
parent | 16ca76c2e7ab287e480185fbb03a0bb438351eda (diff) |
Store CommandInfo in CommandSource instead of just command/permission
Diffstat (limited to 'src/bots.cpp')
-rw-r--r-- | src/bots.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/bots.cpp b/src/bots.cpp index 86d0a0136..7aaefccc1 100644 --- a/src/bots.cpp +++ b/src/bots.cpp @@ -198,12 +198,11 @@ void ServiceBot::OnMessage(User *u, const Anope::string &message) CommandInfo& ServiceBot::SetCommand(const Anope::string &cname, const Anope::string &sname, const Anope::string &permission) { - CommandInfo ci; + CommandInfo &ci = this->commands[cname]; ci.name = sname; ci.cname = cname; ci.permission = permission; - this->commands[cname] = ci; - return this->commands[cname]; + return ci; } CommandInfo *ServiceBot::GetCommand(const Anope::string &cname) |