diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-03-15 17:37:25 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-03-15 17:37:25 +0000 |
commit | 38ca8be9a3881a3cb3cf6864e67b779ffbab6874 (patch) | |
tree | 2f611ef900a80433c881702fbc5ea4c7f1a5da98 /src/users.cpp | |
parent | d1dc60e83eef53da5368e18955acfa6c72be0374 (diff) |
Add third parameter to OnUserQuit (quit reason for opers only) - bump api version
Add SetOperQuit and GetOperQuit methods to userrec
Add OPERQUIT command to protocol - bump protocol version
All this is to properly allow hidebans etc to work properly
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6675 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 18 |
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 : ""; +} + + |