TS3 SDK - Stop message from sending?

Johnny1987

Member
Apr 21, 2016
6
0
33
Hello,

I wanted to ask if there is any function that I can use to stop client from sending current message?
I'd like to make auto text format thing which will automatically eg. make the text bold or change its color.

I mean I want it to like this: Client sends a message -> plugin stops the message from sending and saves it to variable -> the message is prepared to its bold -> send the message using requestSendPrivateTextMsg
 

0x0539

Retired Staff
Contributor
Jan 30, 2016
1,334
1,214
254
So you want every received message in bold/color?

If this is what you want, you might as well use a skin, not the bold part but there are definitely color changes in them.
 

Johnny1987

Member
Apr 21, 2016
6
0
33
So you want every received message in bold/color?

If this is what you want, you might as well use a skin, not the bold part but there are definitely color changes in them.

Not received, I want to make my messages bold and I don't want it to send 2 messages like:
I wrote this msg
I wrote this msg
because i managed to do something like that, but that doesnt satisfy me.
 

Johnny1987

Member
Apr 21, 2016
6
0
33
Code:
int ts3plugin_onTextMessageEvent(uint64 serverConnectionHandlerID, anyID targetMode, anyID toID, anyID fromID, const char* fromName, const char* fromUniqueIdentifier, const char* message, int ffIgnored) {

    anyID clid;
    ts3Functions.getClientID(serverConnectionHandlerID, &clid);
    if(clid == fromID)
    {
    char msg[256];
    uint64 channelid;

    snprintf(msg, sizeof(msg), u8"[b]%s[/b]", message);

    ts3Functions.getChannelOfClient(serverConnectionHandlerID, clid, &channelid);
    ts3Functions.requestSendChannelTextMsg(serverConnectionHandlerID, msg, channelid, NULL);
    }
    return 0;
}
 
Last edited:

Derp

Retired Staff
Contributor
Apr 30, 2015
933
1,017
217
change
Code:
return 0;
to
Code:
return 1;

-Derp
 

Johnny1987

Member
Apr 21, 2016
6
0
33
change
Code:
return 0;
to
Code:
return 1;

-Derp

But still people see that previous message which I really dont want to be happening

I want the plugin to totally stop the first message and then send only the second one (the formatted one)
 
Last edited:
Top