By Arnoud van Leeuwen 1280950
#528821 Hi all,

I am writing a Plugin for ES from which I need to send pilots a text message if they are flagged as text-only.
I am using DisplayUserMessage() to do this.
However somehow if I pass the controller frequency as the handler name I get what seems to be a duplicate version of the frequency chat.

Code: Select allif (!ControllerMyself().IsValid())
            return;

        CGrountToAirChannel channel = GroundToArChannelSelectFirst();
        while (!channel.GetIsPrimary())
            channel = GroundToArChannelSelectNext(channel);

        std::stringstream ss;
        ss << std::fixed << std::setprecision(3) << channel.GetFrequency();
        DisplayUserMessage(ss.str().c_str(),
                           "",
                           str.c_str(),
                           true, false, false, false, false);

This yields the following result:
Image
But what I want to see is this:
Image
Note the two seemingly identical voice handlers. Problem is the lower channel is the actual voice channel, and the upper one is a private chat of sorts to callsign 118.400, which does not exist.

I am starting to suspect that DisplayUserMessage() is not the way to go here.
Can anyone help me out on how to achieve on-frequncy message posting by a plugin?

Regards,
Arnoud