Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-09-27 17:16:15 +0000
committerStijn Buys <ingar@osirion.org>2008-09-27 17:16:15 +0000
commitca0c1d3e6f8b5fa4eb2e0a86fcf47b12fb600786 (patch)
tree5d72e330f11350065806e83cc8712693241b9aad /src/core/gameserver.h
parent29984680d6e0e52efec489497b1796e056164442 (diff)
mission targets, texture unloading, private messages
Diffstat (limited to 'src/core/gameserver.h')
-rw-r--r--src/core/gameserver.h37
1 files changed, 19 insertions, 18 deletions
diff --git a/src/core/gameserver.h b/src/core/gameserver.h
index 1f6d8cc..b25f1a0 100644
--- a/src/core/gameserver.h
+++ b/src/core/gameserver.h
@@ -8,6 +8,7 @@
#define __INCLUDED_CORE_GAMESERVER_H__
#include "core/gameinterface.h"
+#include "core/message.h"
#include "core/module.h"
#include "core/netserver.h"
@@ -21,8 +22,6 @@ namespace core
class GameServer : public GameInterface
{
public:
- typedef std::list<Player *> Players;
-
GameServer();
~GameServer();
@@ -34,9 +33,6 @@ public:
/// returns true if the game server can not run a time frime
inline bool error() { return !server_running; }
- /// show a list of connected players
- void list_players();
-
/// show the current time
void showtime();
@@ -57,23 +53,32 @@ public:
/// a player sends a chat message to the public channel
void say(Player *player, std::string const &args);
+ /// a player sends a private message to another player
+ void private_message(Player *player, std::string const &args);
+
/// kick a player from the server
void kick(Player *player, std::string const &reason);
- /// broadcast a message to all players
- void broadcast(std::string const & message, Player *ignore_player = 0);
+ /// broadcast an Info message to all players
+ void broadcast(std::string const message, Player *ignore_player = 0);
+
+ /// broadcast a message to all players on a specified channel
+ void broadcast_message(Message::Channel const channel, std::string const message, Player *ignore_player = 0);
+
+ /// send an Info message to a single player
+ void send(Player *player, std::string const message);
- /// send a message to a single player
- void send(Player *player, std::string message);
+ /// send a RCon message to a single player
+ void send_rcon(Player *player, std::string const message);
+
+ /// send a message on the specific channel to the specified Player
+ void send_message(Message::Channel const channel, Player *player, std::string const message);
/// broadcast a sound to all players
- void broadcast_sound(std::string const & sound, Player *ignore_player = 0);
+ void broadcast_sound(std::string const sound, Player *ignore_player = 0);
/// send a sound to a single player
- void send_sound(Player *player, std::string sound);
-
- /// send a rcon message to a single player
- void send_rcon(Player *player, std::string message);
+ void send_sound(Player *player, std::string const sound);
/// a player sends a command to the game server
void exec(Player *player, std::string const &cmdline);
@@ -81,8 +86,6 @@ public:
/// find the first player who's id or name matches the search string
Player *find_player(std::string const search);
- inline Players & players() { return server_players; }
-
/*----- static ---------------------------------------------------- */
/// return the current game server
@@ -104,8 +107,6 @@ private:
float server_frametime;
float server_time;
float server_previoustime;
-
- Players server_players;
};
inline GameServer *server() { return GameServer::instance(); }