diff options
-rw-r--r-- | include/modules.h | 4 | ||||
-rw-r--r-- | src/cmd_kill.cpp | 2 | ||||
-rw-r--r-- | src/modules.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/main.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_spanningtree/main.h | 2 |
5 files changed, 10 insertions, 6 deletions
diff --git a/include/modules.h b/include/modules.h index 2096bb6a5..389fa6184 100644 --- a/include/modules.h +++ b/include/modules.h @@ -81,7 +81,7 @@ enum MessageType { * ipv4 servers, so this value will be ten times as * high on ipv6 servers. */ -#define NATIVE_API_VERSION 11024 +#define NATIVE_API_VERSION 11025 #ifdef IPV6 #define API_VERSION (NATIVE_API_VERSION * 10) #else @@ -1086,7 +1086,7 @@ class CoreExport Module : public Extensible * @param dest The user being killed * @param reason The kill reason */ - virtual void OnRemoteKill(userrec* source, userrec* dest, const std::string &reason); + virtual void OnRemoteKill(userrec* source, userrec* dest, const std::string &reason, const std::string &operreason); /** Called whenever a module is loaded. * mod will contain a pointer to the module, and string will contain its name, diff --git a/src/cmd_kill.cpp b/src/cmd_kill.cpp index dea888bad..26f354b8f 100644 --- a/src/cmd_kill.cpp +++ b/src/cmd_kill.cpp @@ -88,7 +88,7 @@ CmdResult cmd_kill::Handle (const char** parameters, int pcnt, userrec *user) { // remote kill ServerInstance->SNO->WriteToSnoMask('K', "Remote kill by %s: %s!%s@%s (%s)", user->nick, u->nick, u->ident, u->host, parameters[1]); - FOREACH_MOD(I_OnRemoteKill, OnRemoteKill(user, u, killreason)); + FOREACH_MOD(I_OnRemoteKill, OnRemoteKill(user, u, killreason, killoperreason)); } else { diff --git a/src/modules.cpp b/src/modules.cpp index 944d27741..9deaa7954 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -157,7 +157,7 @@ void Module::OnRawSocketConnect(int fd) { } int Module::OnRawSocketRead(int fd, char* buffer, unsigned int count, int &readresult) { return 0; } void Module::OnUserMessage(userrec* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list) { } void Module::OnUserNotice(userrec* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list) { } -void Module::OnRemoteKill(userrec* source, userrec* dest, const std::string &reason) { } +void Module::OnRemoteKill(userrec* source, userrec* dest, const std::string &reason, const std::string &operreason) { } void Module::OnUserInvite(userrec* source,userrec* dest,chanrec* channel) { } void Module::OnPostLocalTopicChange(userrec* user, chanrec* chan, const std::string &topic) { } void Module::OnGetServerDescription(const std::string &servername,std::string &description) { } diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index fe9dcaedd..b5de84701 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -1058,11 +1058,15 @@ void ModuleSpanningTree::OnUserKick(userrec* source, userrec* user, chanrec* cha } } -void ModuleSpanningTree::OnRemoteKill(userrec* source, userrec* dest, const std::string &reason) +void ModuleSpanningTree::OnRemoteKill(userrec* source, userrec* dest, const std::string &reason, const std::string &operreason) { std::deque<std::string> params; + params.push_back(":"+reason); + Utils->DoOneToMany(dest->nick,"OPERQUIT",params); + params.clear(); params.push_back(dest->nick); params.push_back(":"+reason); + dest->SetOperQuit(operreason); Utils->DoOneToMany(source->nick,"KILL",params); } diff --git a/src/modules/m_spanningtree/main.h b/src/modules/m_spanningtree/main.h index 620bddd28..c184ef076 100644 --- a/src/modules/m_spanningtree/main.h +++ b/src/modules/m_spanningtree/main.h @@ -170,7 +170,7 @@ class ModuleSpanningTree : public Module virtual void OnUserQuit(userrec* user, const std::string &reason, const std::string &oper_message); virtual void OnUserPostNick(userrec* user, const std::string &oldnick); virtual void OnUserKick(userrec* source, userrec* user, chanrec* chan, const std::string &reason, bool &silent); - virtual void OnRemoteKill(userrec* source, userrec* dest, const std::string &reason); + virtual void OnRemoteKill(userrec* source, userrec* dest, const std::string &reason, const std::string &operreason); virtual void OnRehash(userrec* user, const std::string ¶meter); virtual void OnOper(userrec* user, const std::string &opertype); void OnLine(userrec* source, const std::string &host, bool adding, char linetype, long duration, const std::string &reason); |