diff options
author | Adam <Adam@anope.org> | 2011-09-19 12:29:54 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-09-19 12:29:54 -0400 |
commit | be77a7e27e5b337f294d6283ed48c734658f25a9 (patch) | |
tree | 5402b11e55ea25e9cce7aead2c6551f838d78460 | |
parent | 934723faa5f7be2f9bf7e7aff0c329bf87a2c987 (diff) |
Bug #1334 - fixed crash on /os oper info
-rw-r--r-- | modules/commands/os_oper.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/commands/os_oper.cpp b/modules/commands/os_oper.cpp index e65cb98eb..db300f1ce 100644 --- a/modules/commands/os_oper.cpp +++ b/modules/commands/os_oper.cpp @@ -108,7 +108,8 @@ class CommandOSOper : public Command { source.Reply(_("Available commands for \2%s\2:"), ot->GetName().c_str()); Anope::string buf; - for (std::list<Anope::string>::const_iterator it = ot->GetCommands().begin(), it_end = ot->GetCommands().end(); it != it_end; ++it) + std::list<Anope::string> cmds = ot->GetCommands(); + for (std::list<Anope::string>::const_iterator it = cmds.begin(), it_end = cmds.end(); it != it_end; ++it) { buf += *it + " "; if (buf.length() > 400) @@ -129,7 +130,8 @@ class CommandOSOper : public Command { source.Reply(_("Available privileges for \2%s\2:"), ot->GetName().c_str()); Anope::string buf; - for (std::list<Anope::string>::const_iterator it = ot->GetPrivs().begin(), it_end = ot->GetPrivs().end(); it != it_end; ++it) + std::list<Anope::string> privs = ot->GetPrivs(); + for (std::list<Anope::string>::const_iterator it = privs.begin(), it_end = privs.end(); it != it_end; ++it) { buf += *it + " "; if (buf.length() > 400) |