| 58 | } |
| 59 | |
| 60 | bool |
| 61 | Instance::AddPlugin(const cripts::string &tag, const cripts::string &plugin, const Plugin::Options &options) |
| 62 | { |
| 63 | if (plugins.find(tag) != plugins.end()) { |
| 64 | return false; |
| 65 | } |
| 66 | |
| 67 | auto p = Plugin::Remap::Create(tag, plugin, from_url, to_url, options); |
| 68 | |
| 69 | if (p.Valid()) { |
| 70 | plugins.emplace(tag, std::move(p)); |
| 71 | |
| 72 | return true; |
| 73 | } else { |
| 74 | Fail(); |
| 75 | return false; |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | bool |
| 80 | Instance::DeletePlugin(const cripts::string &tag) |