diff options
Diffstat (limited to 'modules/memoserv/ms_ignore.cpp')
-rw-r--r-- | modules/memoserv/ms_ignore.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/modules/memoserv/ms_ignore.cpp b/modules/memoserv/ms_ignore.cpp index 1a3a054d5..6b50d90bc 100644 --- a/modules/memoserv/ms_ignore.cpp +++ b/modules/memoserv/ms_ignore.cpp @@ -57,23 +57,15 @@ public: return; } - if (std::find(mi->ignores.begin(), mi->ignores.end(), param.ci_str()) == mi->ignores.end()) - { - mi->ignores.emplace_back(param.ci_str()); + if (mi->ignores.insert(param).second) source.Reply(_("\002%s\002 added to ignore list."), param.c_str()); - } else source.Reply(_("\002%s\002 is already on the ignore list."), param.c_str()); } else if (command.equals_ci("DEL") && !param.empty()) { - std::vector<Anope::string>::iterator it = std::find(mi->ignores.begin(), mi->ignores.end(), param.ci_str()); - - if (it != mi->ignores.end()) - { - mi->ignores.erase(it); + if (mi->ignores.erase(param)) source.Reply(_("\002%s\002 removed from the ignore list."), param.c_str()); - } else source.Reply(_("\002%s\002 is not on the ignore list."), param.c_str()); } |