adminListener plugin
Posted: Sat Nov 04, 2006 8:51 am
Hi all.
I've created a new plugin, called adminListener. When loaded, it sends all team conversation to admins who are observers. It does not send team conversation to admins who are playing (it therefore avoids the any kind of advantage problem). It sends a message in white text as follows "[Player to team] <sender callsign>: <message>". This closely follows the format for normal team messages, while allowing admin observers to tell the difference from real team messages (between observers).
In the future, I may add support for individual conversation as well. I'd really appreciate any feedback before I do an official release.
If there are any C++ experts out there who feel like answering a quick question, I'm wondering if there's any better way to code the following:
Concatenating a string seems like such a simple task, and yet it always gives some error about "no such operator" or "invalid cast" if I try a simpler method. Any thoughts?
Enjoy!
I've created a new plugin, called adminListener. When loaded, it sends all team conversation to admins who are observers. It does not send team conversation to admins who are playing (it therefore avoids the any kind of advantage problem). It sends a message in white text as follows "[Player to team] <sender callsign>: <message>". This closely follows the format for normal team messages, while allowing admin observers to tell the difference from real team messages (between observers).
In the future, I may add support for individual conversation as well. I'd really appreciate any feedback before I do an official release.
If there are any C++ experts out there who feel like answering a quick question, I'm wondering if there's any better way to code the following:
Code: Select all
std::string message =
std::string( "[Player to team] " ) +
senderCallsign +
std::string( ": " ) +
std::string( (messageEvent->message).c_str() );
Enjoy!