adminListener plugin

Questions, comments, and news on the server side plug-ins and it's API
Post Reply
User avatar
Posts: 2026
Joined: Wed Mar 01, 2006 5:43 am

adminListener plugin

Post by macsforme » 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:

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?

(778 Bytes) Downloaded 257 times

User avatar
A Vicious Muffin
Private First Class
Private First Class
Posts: 534
Joined: Sat Aug 26, 2006 12:25 am
Location: Drury Lane

Post by A Vicious Muffin » Sat Nov 04, 2006 2:41 pm

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!

Post Reply