summaryrefslogtreecommitdiff
path: root/modules/commands/cs_suspend.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-09-25 04:19:15 -0400
committerAdam <Adam@anope.org>2011-09-25 04:19:15 -0400
commit1f2399de364c09adcce4193895cd362d80ffdfc5 (patch)
tree5f40fc531f22c174b6e10bb7bc12842a4a21d30b /modules/commands/cs_suspend.cpp
parent43201ead9575a74e350710bc191f4ac67366aca7 (diff)
Added a new database format and sqlite support. Also moved db-convert to a module.
Diffstat (limited to 'modules/commands/cs_suspend.cpp')
-rw-r--r--modules/commands/cs_suspend.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/modules/commands/cs_suspend.cpp b/modules/commands/cs_suspend.cpp
index d9f846d71..d59931b45 100644
--- a/modules/commands/cs_suspend.cpp
+++ b/modules/commands/cs_suspend.cpp
@@ -45,9 +45,9 @@ class CommandCSSuspend : public Command
}
ci->SetFlag(CI_SUSPENDED);
- ci->Extend("suspend_by", new ExtensibleItemRegular<Anope::string>(u->nick));
+ ci->Extend("suspend_by", new ExtensibleString(u->nick));
if (!reason.empty())
- ci->Extend("suspend_reason", new ExtensibleItemRegular<Anope::string>(reason));
+ ci->Extend("suspend_reason", new ExtensibleString(reason));
if (ci->c)
{
@@ -113,10 +113,9 @@ class CommandCSUnSuspend : public Command
return;
}
- Anope::string by, reason;
- ci->GetExtRegular("suspend_by", by);
- ci->GetExtRegular("suspend_reason", reason);
- Log(LOG_ADMIN, u, this, ci) << " which was suspended by " << by << " for: " << (!reason.empty() ? reason : "No reason");
+ Anope::string *by = ci->GetExt<Anope::string *>("suspend_by"), *reason = ci->GetExt<Anope::string *>("suspend_reason");
+ if (by != NULL)
+ Log(LOG_ADMIN, u, this, ci) << " which was suspended by " << *by << " for: " << (reason && !reason->empty() ? *reason : "No reason");
ci->UnsetFlag(CI_SUSPENDED);
ci->Shrink("suspend_by");