diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-05-22 20:41:16 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-05-22 20:41:16 +0000 |
commit | da8fe330c2b3445b370cb80ecae93c7fb34d441d (patch) | |
tree | 4b6ef238c206d3440b36827b847fd3895dc300f8 /src/commands.cpp | |
parent | 38c9d65253a67dbe13c77792027a9db601735813 (diff) |
Added support for changing of text within OnUserPreNotice and OnUserPreMessage (required for modes +G and +S etc)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@821 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands.cpp')
-rw-r--r-- | src/commands.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/commands.cpp b/src/commands.cpp index 5b3c14f98..5144d7ae5 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -560,10 +560,12 @@ void handle_privmsg(char **parameters, int pcnt, userrec *user) int MOD_RESULT = 0; - FOREACH_RESULT(OnUserPreMessage(user,chan,TYPE_CHANNEL,std::string(parameters[1]))); + std::string temp = parameters[1]; + FOREACH_RESULT(OnUserPreMessage(user,chan,TYPE_CHANNEL,temp)); if (MOD_RESULT) { return; } + parameters[1] = (char*)temp.c_str(); ChanExceptSender(chan, user, "PRIVMSG %s :%s", chan->name, parameters[1]); @@ -591,10 +593,12 @@ void handle_privmsg(char **parameters, int pcnt, userrec *user) int MOD_RESULT = 0; - FOREACH_RESULT(OnUserPreMessage(user,dest,TYPE_USER,std::string(parameters[1]))); + std::string temp = parameters[1]; + FOREACH_RESULT(OnUserPreMessage(user,dest,TYPE_USER,temp)); if (MOD_RESULT) { return; } + parameters[1] = (char*)temp.c_str(); @@ -643,11 +647,13 @@ void handle_notice(char **parameters, int pcnt, userrec *user) } int MOD_RESULT = 0; - - FOREACH_RESULT(OnUserPreNotice(user,chan,TYPE_CHANNEL,std::string(parameters[1]))); + + std::string temp = parameters[1]; + FOREACH_RESULT(OnUserPreNotice(user,chan,TYPE_CHANNEL,temp)); if (MOD_RESULT) { return; } + parameters[1] = (char*)temp.c_str(); ChanExceptSender(chan, user, "NOTICE %s :%s", chan->name, parameters[1]); @@ -669,10 +675,12 @@ void handle_notice(char **parameters, int pcnt, userrec *user) { int MOD_RESULT = 0; - FOREACH_RESULT(OnUserPreNotice(user,dest,TYPE_USER,std::string(parameters[1]))); + std::string temp = parameters[1]; + FOREACH_RESULT(OnUserPreNotice(user,dest,TYPE_USER,temp)); if (MOD_RESULT) { return; } + parameters[1] = (char*)temp.c_str(); if (!strcmp(dest->server,user->server)) { |