From 3a7dd5b129450b94e0a87b8ad5009da70905b8e5 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 17 Sep 2006 14:01:53 +0000 Subject: Add const std::string &original_command to OnPreCommand and OnPostCommand, which gives the entire untouched command string and params in all its colon-ny glory git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5265 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/modules/m_spanningtree.cpp') diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 7555a027e..5b62697d7 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -601,7 +601,8 @@ class cmd_rconnect : public command_t ServerInstance->SNO->WriteToSnoMask('l',"Remote CONNECT from %s matching \002%s\002, connecting server \002%s\002",user->nick,parameters[0],parameters[1]); const char* para[1]; para[0] = parameters[1]; - Creator->OnPreCommand("CONNECT", para, 1, user, true); + std::string original_command = std::string("CONNECT ") + parameters[1]; + Creator->OnPreCommand("CONNECT", para, 1, user, true, original_command); return CMD_SUCCESS; } @@ -4224,7 +4225,7 @@ class ModuleSpanningTree : public Module return 0; } - virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, bool validated) + virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, bool validated, const std::string &original_line) { /* If the command doesnt appear to be valid, we dont want to mess with it. */ if (!validated) @@ -4286,7 +4287,7 @@ class ModuleSpanningTree : public Module return 0; } - virtual void OnPostCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, CmdResult result) + virtual void OnPostCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, CmdResult result, const std::string &original_line) { if ((result == CMD_SUCCESS) && (ServerInstance->IsValidModuleCommand(command, pcnt, user))) { -- cgit v1.2.3