From 38ca8be9a3881a3cb3cf6864e67b779ffbab6874 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 15 Mar 2007 17:37:25 +0000 Subject: 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 --- src/modules/m_spanningtree/treesocket2.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/modules/m_spanningtree/treesocket2.cpp') diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index fe56ea1bf..8bb404a45 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -207,6 +207,21 @@ bool TreeSocket::ForceNick(const std::string &prefix, std::deque &p return true; } +bool TreeSocket::OperQuit(const std::string &prefix, std::deque ¶ms) +{ + if (params.size() < 1) + return true; + + userrec* u = this->Instance->FindNick(prefix); + + if (u) + { + Utils->DoOneToAllButSender(prefix,"OPERQUIT",params,prefix); + u->SetOperQuit(params[0]); + } + return true; +} + /* * Remote SQUIT (RSQUIT). Routing works similar to SVSNICK: Route it to the server that the target is connected to locally, * then let that server do the dirty work (squit it!). Example: @@ -1157,6 +1172,10 @@ bool TreeSocket::ProcessLine(std::string &line) } return this->ForceNick(prefix,params); } + else if (command == "OPERQUIT") + { + return this->OperQuit(prefix,params); + } else if (command == "RSQUIT") { return this->RemoteSquit(prefix, params); -- cgit v1.3.1-10-gc9f91