#include <player.hpp>
Public Types | |
| enum | STATUS { LOBBY, PLAYING, OBSERVING } |
Public Member Functions | |
| player (const std::string &n, simple_wml::node &cfg, bool registered, const size_t max_messages=4, const size_t time_period=10, const bool sp=false, const bool moderator=false) | |
| void | set_status (STATUS status) |
| void | mark_available (const int game_id=0, const std::string &location="") |
| void | mark_registered (bool registered=true) |
| bool | registered () const |
| const std::string & | name () const |
| bool | selective_ping () const |
| const simple_wml::node * | config_address () const |
| bool | is_message_flooding () |
| bool | in_game () const |
| const game * | get_game () const |
| void | set_game (game *g) |
| void | set_moderator (bool moderator) |
| bool | is_moderator () const |
Private Attributes | |
| const std::string | name_ |
| simple_wml::node & | cfg_ |
| const bool | selective_ping_ |
| bool | registered_ |
| time_t | flood_start_ |
| unsigned int | messages_since_flood_start_ |
| const size_t | MaxMessages |
| const time_t | TimePeriod |
| STATUS | status_ |
| bool | moderator_ |
Definition at line 28 of file player.hpp.
| Enumerator | |
|---|---|
| LOBBY | |
| PLAYING | |
| OBSERVING | |
Definition at line 31 of file player.hpp.
| wesnothd::player::player | ( | const std::string & | n, |
| simple_wml::node & | cfg, | ||
| bool | registered, | ||
| const size_t | max_messages = 4, |
||
| const size_t | time_period = 10, |
||
| const bool | sp = false, |
||
| const bool | moderator = false |
||
| ) |
Definition at line 21 of file player.cpp.
References cfg_, mark_available(), simple_wml::node::set_attr(), and simple_wml::node::set_attr_dup().
|
inline |
Definition at line 54 of file player.hpp.
References cfg_.
Referenced by wesnothd::server::handle_player_in_game().
| const game* wesnothd::player::get_game | ( | ) | const |
Referenced by in_game().
|
inline |
Definition at line 61 of file player.hpp.
References get_game().
| bool wesnothd::player::is_message_flooding | ( | ) |
Definition at line 81 of file player.cpp.
|
inline |
Definition at line 72 of file player.hpp.
References moderator_.
Referenced by wesnothd::server::adminmsg_handler(), and wesnothd::server::handle_query().
| void wesnothd::player::mark_available | ( | const int | game_id = 0, |
| const std::string & | location = "" |
||
| ) |
Definition at line 62 of file player.cpp.
Referenced by player().
| void wesnothd::player::mark_registered | ( | bool | registered = true | ) |
Definition at line 75 of file player.cpp.
|
inline |
Definition at line 51 of file player.hpp.
References name_.
Referenced by wesnothd::server::ban_handler(), wesnothd::server::create_game(), wesnothd::server::gban_handler(), wesnothd::server::handle_player_in_game(), wesnothd::server::handle_query(), wesnothd::server::kick_handler(), wesnothd::server::kickban_handler(), wesnothd::player_record::name(), wesnothd::server::pm_handler(), and wesnothd::server::status_handler().
|
inline |
Definition at line 48 of file player.hpp.
References registered_.
|
inline |
Definition at line 52 of file player.hpp.
References selective_ping_.
|
inline |
Definition at line 71 of file player.hpp.
References moderator_.
Referenced by wesnothd::server::handle_query().
Definition at line 42 of file player.cpp.
|
private |
Definition at line 76 of file player.hpp.
Referenced by config_address(), and player().
|
private |
Definition at line 81 of file player.hpp.
|
private |
Definition at line 83 of file player.hpp.
|
private |
Definition at line 82 of file player.hpp.
|
private |
Definition at line 86 of file player.hpp.
Referenced by is_moderator(), and set_moderator().
|
private |
Definition at line 75 of file player.hpp.
Referenced by name().
|
private |
Definition at line 79 of file player.hpp.
Referenced by registered().
|
private |
Definition at line 77 of file player.hpp.
Referenced by selective_ping().
|
private |
Definition at line 85 of file player.hpp.
|
private |
Definition at line 84 of file player.hpp.
1.8.8