summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 9f54975b4..48260bd1f 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -331,13 +331,15 @@ userrec::userrec(InspIRCd* Instance) : ServerInstance(Instance)
memset(modes,0,sizeof(modes));
memset(snomasks,0,sizeof(snomasks));
/* Invalidate cache */
- cached_fullhost = cached_hostip = cached_makehost = cached_fullrealhost = NULL;
+ operquit = cached_fullhost = cached_hostip = cached_makehost = cached_fullrealhost = NULL;
}
userrec::~userrec()
{
this->InvalidateCache();
this->DecrementModes();
+ if (operquit)
+ free(operquit);
if (ip)
{
clonemap::iterator x = ServerInstance->local_clones.find(this->GetIPString());
@@ -1914,3 +1916,17 @@ void userrec::HandleEvent(EventType et, int errornum)
}
}
+void userrec::SetOperQuit(const std::string &oquit)
+{
+ if (operquit)
+ return;
+
+ operquit = strdup(oquit.c_str());
+}
+
+const char* userrec::GetOperQuit()
+{
+ return operquit ? operquit : "";
+}
+
+