Page 1 of 1

adminListener plugin

Posted: Sat Nov 04, 2006 8:51 am
by macsforme
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:

Code: Select all

std::string message =
	std::string( "[Player to team] " ) +
	senderCallsign +
	std::string( ": " ) +
	std::string( (messageEvent->message).c_str() );
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!

Posted: Sat Nov 04, 2006 2:41 pm
by A Vicious Muffin
That is a good plugin, but i guess if the admin was evil, he could listen in on the team conversations and tell them to the other team. I don't think anyone would do that though :twisted: . Nice way to monitor chat!