summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/xline.h3
-rw-r--r--src/xline.cpp13
2 files changed, 13 insertions, 3 deletions
diff --git a/include/xline.h b/include/xline.h
index 8b718ba93..59f151864 100644
--- a/include/xline.h
+++ b/include/xline.h
@@ -42,6 +42,7 @@ class CoreExport XLine : public Serialize::Object
std::regex *regex = nullptr;
using Serialize::Object::Object;
+ void Delete() override;
~XLine();
@@ -98,7 +99,7 @@ class XLineType : public Serialize::Type<XLine>
, mask(this, "mask", &XLine::mask)
, by(this, "by", &XLine::by)
, reason(this, "reason", &XLine::reason)
- , id(this, "id", &XLine::id)
+ , id(this, "akillid", &XLine::id)
, created(this, "created", &XLine::created)
, expires(this, "expires", &XLine::expires)
{
diff --git a/src/xline.cpp b/src/xline.cpp
index baaca5976..02afa597e 100644
--- a/src/xline.cpp
+++ b/src/xline.cpp
@@ -100,6 +100,15 @@ XLine::~XLine()
delete c;
}
+void XLine::Delete()
+{
+ XLineManager *manager = GetManager();
+ if (manager)
+ manager->SendDel(this);
+
+ return Serialize::Object::Delete();
+}
+
void XLine::SetType(const Anope::string &t)
{
Set(&XLineType::type, t);
@@ -200,8 +209,8 @@ Anope::string XLine::GetReasonWithID()
bool XLine::IsExpired()
{
- time_t expires = GetExpires();
- return expires > 0 && expires <= Anope::CurTime;
+ time_t exp = GetExpires();
+ return exp > 0 && exp <= Anope::CurTime;
}
bool XLine::HasNickOrReal() const