ManaPlus
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
PlayerRelationsManager Class Reference

#include <playerrelations.h>

Public Member Functions

 PlayerRelationsManager ()
 
 ~PlayerRelationsManager ()
 
void init ()
 
void load ()
 
void store () const
 
unsigned int checkPermissionSilently (const std::string &player_name, const unsigned int flags) const
 
bool hasPermission (const Being *const being, const unsigned int flags) const
 
bool hasPermission (const std::string &being, const unsigned int flags) const
 
void setRelation (const std::string &name, const RelationT relation)
 
RelationT getRelation (const std::string &name) const
 
void removePlayer (const std::string &name)
 
unsigned int getDefault () const
 
void setDefault (const unsigned int permissions)
 
std::vector< PlayerIgnoreStrategy * > * getPlayerIgnoreStrategies ()
 
const PlayerIgnoreStrategygetPlayerIgnoreStrategy () const
 
void setPlayerIgnoreStrategy (PlayerIgnoreStrategy *const strategy)
 
int getPlayerIgnoreStrategyIndex (const std::string &shortname)
 
StringVectgetPlayers () const
 
StringVectgetPlayersByRelation (const RelationT rel) const
 
void clear ()
 
bool getPersistIgnores () const
 
void ignoreTrade (const std::string &name) const
 
bool isGoodName (Being *const being) const
 
bool isGoodName (const std::string &name) const
 
void setPersistIgnores (const bool value)
 
void addListener (PlayerRelationsListener *const listener)
 
void removeListener (PlayerRelationsListener *const listener)
 
bool checkBadRelation (const std::string &name) const
 

Private Member Functions

void signalUpdate (const std::string &name)
 

Static Private Member Functions

static bool checkName (const std::string &name)
 

Private Attributes

bool mPersistIgnores
 
unsigned int mDefaultPermissions
 
PlayerIgnoreStrategymIgnoreStrategy
 
std::map< std::string, PlayerRelation * > mRelations
 
std::list< PlayerRelationsListener * > mListeners
 
std::vector< PlayerIgnoreStrategy * > mIgnoreStrategies
 

Detailed Description

Player relations class, represents any particular relations and/or preferences the user of the local client has wrt other players (identified by std::string).

Definition at line 47 of file playerrelations.h.

Constructor & Destructor Documentation

◆ PlayerRelationsManager()

PlayerRelationsManager::PlayerRelationsManager ( )

Definition at line 151 of file playerrelations.cpp.

151  :
152  mPersistIgnores(false),
154  mIgnoreStrategy(nullptr),
155  mRelations(),
156  mListeners(),
158 {
159 }
unsigned int mDefaultPermissions
std::vector< PlayerIgnoreStrategy * > mIgnoreStrategies
PlayerIgnoreStrategy * mIgnoreStrategy
std::map< std::string, PlayerRelation * > mRelations
std::list< PlayerRelationsListener * > mListeners
static const unsigned int DEFAULT

◆ ~PlayerRelationsManager()

PlayerRelationsManager::~PlayerRelationsManager ( )

Definition at line 161 of file playerrelations.cpp.

162 {
164 
166  delete it->second;
167  mRelations.clear();
168 }
void delete_all(Container &c)
Definition: dtor.h:56
#define FOR_EACH(type, iter, array)
Definition: foreach.h:25
PlayerRelations::const_iterator PlayerRelationsCIter

References delete_all(), FOR_EACH, mIgnoreStrategies, and mRelations.

Member Function Documentation

◆ addListener()

void PlayerRelationsManager::addListener ( PlayerRelationsListener *const  listener)
inline

◆ checkBadRelation()

bool PlayerRelationsManager::checkBadRelation ( const std::string &  name) const

Definition at line 460 of file playerrelations.cpp.

461 {
462  if (name.empty())
463  return true;
464 
465  const RelationT relation = getRelation(name);
466 
467  if (relation == Relation::IGNORED ||
468  relation == Relation::DISREGARDED ||
469  relation == Relation::BLACKLISTED ||
470  relation == Relation::ERASED ||
471  relation == Relation::ENEMY2)
472  {
473  return true;
474  }
475  return false;
476 }
RelationT getRelation(const std::string &name) const
@ DISREGARDED
Definition: relation.h:33
@ ENEMY2
Definition: relation.h:37
@ IGNORED
Definition: relation.h:34
@ ERASED
Definition: relation.h:35
@ BLACKLISTED
Definition: relation.h:36
Relation ::T RelationT
Definition: relation.h:39

References Relation::BLACKLISTED, Relation::DISREGARDED, Relation::ENEMY2, Relation::ERASED, getRelation(), and Relation::IGNORED.

Referenced by LocalPlayer::checAttackPermissions().

◆ checkName()

bool PlayerRelationsManager::checkName ( const std::string &  name)
staticprivate

Definition at line 635 of file playerrelations.cpp.

636 {
637  const size_t size = name.size();
638  const std::string check = config.getStringValue("unsecureChars");
639  const std::string lastChar = name.substr(size - 1, 1);
640 
641  if (name.substr(0, 1) == " " ||
642  lastChar == " " ||
643  lastChar == "." ||
644  name.find(" ") != std::string::npos)
645  {
646  return false;
647  }
648  else if (check.empty())
649  {
650  return true;
651  }
652  else if (name.find_first_of(check) != std::string::npos)
653  {
654  return false;
655  }
656  else
657  {
658  return true;
659  }
660 }
std::string getStringValue(const std::string &key) const
Configuration config
int size()
Definition: emotedb.cpp:306

References config, Configuration::getStringValue(), and EmoteDB::size().

Referenced by isGoodName().

◆ checkPermissionSilently()

unsigned int PlayerRelationsManager::checkPermissionSilently ( const std::string &  player_name,
const unsigned int  flags 
) const

Determines whether the player in question is being ignored, filtered by the specified flags.

Definition at line 277 of file playerrelations.cpp.

279 {
280  const std::map<std::string, PlayerRelation *>::const_iterator
281  it = mRelations.find(player_name);
282  if (it == mRelations.end())
283  {
284  return mDefaultPermissions & flags;
285  }
286 
287  const PlayerRelation *const r = (*it).second;
288  unsigned int permissions = PlayerRelation::RELATION_PERMISSIONS[
289  CAST_S32(r->mRelation)];
290 
291  switch (r->mRelation)
292  {
293  case Relation::NEUTRAL:
294  permissions = mDefaultPermissions;
295  break;
296 
297  case Relation::FRIEND:
298  permissions |= mDefaultPermissions; // widen
299  break;
300 
302  case Relation::IGNORED:
303  case Relation::ERASED:
305  case Relation::ENEMY2:
306  default:
307  permissions &= mDefaultPermissions; // narrow
308  break;
309  }
310 
311  return permissions & flags;
312 }
#define CAST_S32
Definition: cast.h:30
@ FRIEND
Definition: relation.h:32
@ NEUTRAL
Definition: relation.h:31
static const unsigned int RELATION_PERMISSIONS[RELATIONS_NR]
RelationT mRelation

References Relation::BLACKLISTED, CAST_S32, Relation::DISREGARDED, Relation::ENEMY2, Relation::ERASED, Relation::FRIEND, Relation::IGNORED, mDefaultPermissions, PlayerRelation::mRelation, mRelations, Relation::NEUTRAL, and PlayerRelation::RELATION_PERMISSIONS.

Referenced by hasPermission(), EAthena::ChatRecv::processBeingChat(), and TmwAthena::ChatRecv::processBeingChat().

◆ clear()

void PlayerRelationsManager::clear ( )

Removes all recorded player info.

Definition at line 170 of file playerrelations.cpp.

171 {
172  StringVect *const names = getPlayers();
173  FOR_EACHP (StringVectCIter, it, names)
174  removePlayer(*it);
175  delete names;
176 }
StringVect * getPlayers() const
void removePlayer(const std::string &name)
#define FOR_EACHP(type, iter, array)
Definition: foreach.h:31
StringVect::const_iterator StringVectCIter
Definition: stringvector.h:31
std::vector< std::string > StringVect
Definition: stringvector.h:29

References FOR_EACHP, getPlayers(), and removePlayer().

Referenced by init(), and load().

◆ getDefault()

unsigned int PlayerRelationsManager::getDefault ( ) const

Retrieves the default permissions.

Definition at line 430 of file playerrelations.cpp.

431 {
432  return mDefaultPermissions;
433 }

References mDefaultPermissions.

Referenced by PopupMenu::addBuySell(), PopupMenu::addBuySellDefault(), Setup_Relations::apply(), Setup_Relations::externalUpdated(), and Setup_Relations::updatedPlayer().

◆ getPersistIgnores()

bool PlayerRelationsManager::getPersistIgnores ( ) const
inline

Do we persist our ‘ignore’ setup?

Definition at line 169 of file playerrelations.h.

170  { return mPersistIgnores; }

References mPersistIgnores.

◆ getPlayerIgnoreStrategies()

std::vector< PlayerIgnoreStrategy * > * PlayerRelationsManager::getPlayerIgnoreStrategies ( )

Retrieves all known player ignore strategies.

The player ignore strategies are allocated statically and must not be deleted.

Definition at line 577 of file playerrelations.cpp.

578 {
579  if (mIgnoreStrategies.empty())
580  {
581  // not initialised yet?
583  // TRANSLATORS: ignore strategi
584  _("Floating '...' bubble"),
587  // TRANSLATORS: ignore strategi
588  _("Floating bubble"),
589  "emote1"));
590  mIgnoreStrategies.push_back(new PIS_nothing);
591  mIgnoreStrategies.push_back(new PIS_dotdotdot);
592  mIgnoreStrategies.push_back(new PIS_blinkname);
593  }
594  return &mIgnoreStrategies;
595 }
#define _(s)
Definition: gettext.h:35
static const unsigned int FIRST_IGNORE_EMOTE
static const char *const PLAYER_IGNORE_STRATEGY_EMOTE0

References _, FIRST_IGNORE_EMOTE, mIgnoreStrategies, and PLAYER_IGNORE_STRATEGY_EMOTE0.

Referenced by Setup_Relations::action(), IgnoreChoicesListModel::getElementAt(), getPlayerIgnoreStrategyIndex(), load(), and Setup_Relations::reset().

◆ getPlayerIgnoreStrategy()

const PlayerIgnoreStrategy* PlayerRelationsManager::getPlayerIgnoreStrategy ( ) const
inline

Return the current player ignore strategy.

Returns
A player ignore strategy, or nullptr

Definition at line 130 of file playerrelations.h.

133  { return mIgnoreStrategy; }

References mIgnoreStrategy.

Referenced by Setup_Relations::reset(), Setup_Relations::Setup_Relations(), and Setup_Relations::updateAll().

◆ getPlayerIgnoreStrategyIndex()

int PlayerRelationsManager::getPlayerIgnoreStrategyIndex ( const std::string &  shortname)

For a given ignore strategy short name, find the appropriate index in the ignore strategies vector.

Parameters
Theshort name of the ignore strategy to look up
Returns
The appropriate index, or -1

Definition at line 182 of file playerrelations.cpp.

184 {
185  const STD_VECTOR<PlayerIgnoreStrategy *> *const strategies
187 
188  if (strategies == nullptr)
189  return -1;
190 
191  const size_t sz = strategies->size();
192  for (size_t i = 0; i < sz; i++)
193  {
194  if ((*strategies)[i]->mShortName == name)
195  return CAST_S32(i);
196  }
197 
198  return -1;
199 }
std::vector< PlayerIgnoreStrategy * > * getPlayerIgnoreStrategies()

References CAST_S32, and getPlayerIgnoreStrategies().

Referenced by load(), Setup_Relations::Setup_Relations(), and Setup_Relations::updateAll().

◆ getPlayers()

StringVect * PlayerRelationsManager::getPlayers ( ) const

Retrieves a sorted vector of all players for which we have any relations recorded.

Definition at line 374 of file playerrelations.cpp.

375 {
376  StringVect *const retval = new StringVect;
377 
379  {
380  if (it->second != nullptr)
381  retval->push_back(it->first);
382  }
383 
384  std::sort(retval->begin(), retval->end(), playersRelSorter);
385 
386  return retval;
387 }
class anonymous_namespace{playerrelations.cpp}::SortPlayersFunctor playersRelSorter

References FOR_EACH, mRelations, and anonymous_namespace{playerrelations.cpp}::playersRelSorter.

Referenced by clear(), and PlayerTableModel::playerRelationsUpdated().

◆ getPlayersByRelation()

StringVect * PlayerRelationsManager::getPlayersByRelation ( const RelationT  rel) const

Definition at line 389 of file playerrelations.cpp.

391 {
392  StringVect *const retval = new StringVect;
393 
395  {
396  if ((it->second != nullptr) &&
397  it->second->mRelation == rel)
398  {
399  retval->push_back(it->first);
400  }
401  }
402 
403  std::sort(retval->begin(), retval->end(), playersRelSorter);
404 
405  return retval;
406 }

References FOR_EACH, mRelations, and anonymous_namespace{playerrelations.cpp}::playersRelSorter.

Referenced by SocialFriendsTab::getPlayersAvatars().

◆ getRelation()

RelationT PlayerRelationsManager::getRelation ( const std::string &  name) const

Updates the relationship with this player.

Definition at line 416 of file playerrelations.cpp.

418 {
419  const std::map<std::string, PlayerRelation *>::const_iterator
420  it = mRelations.find(name);
421  if (it != mRelations.end())
422  return (*it).second->mRelation;
423 
424  return Relation::NEUTRAL;
425 }

References mRelations, and Relation::NEUTRAL.

Referenced by PopupMenu::addPlayerRelation(), Actions::changeRelation(), LocalPlayer::checAttackPermissions(), checkBadRelation(), ActorManager::findMostDamagedPlayer(), WhoIsOnline::handlerPlayerRelation(), ActorManager::heal(), ChatWindow::ignoreAllWhispers(), ignoreTrade(), PlayerTableModel::playerRelationsUpdated(), Actions::reportRelation(), Being::showName(), and Being::updateColors().

◆ hasPermission() [1/2]

bool PlayerRelationsManager::hasPermission ( const Being *const  being,
const unsigned int  flags 
) const

Tests whether the player in question is being ignored for any of the actions in the specified flags. If so, trigger appropriate side effects if requested by the player.

Definition at line 314 of file playerrelations.cpp.

316 {
317  if (being == nullptr)
318  return false;
319 
320  if (being->getType() == ActorType::Player)
321  {
322  return static_cast<unsigned int>(hasPermission(
323  being->getName(), flags)) == flags;
324  }
325  return true;
326 }
const std::string & getName() const
Definition: being.h:232
ActorTypeT getType() const
Definition: being.h:116
bool hasPermission(const Being *const being, const unsigned int flags) const

References Being::getName(), Being::getType(), and ActorType::Player.

Referenced by EAthena::ChatRecv::processBeingChat(), TmwAthena::ChatRecv::processBeingChat(), Ea::BeingRecv::processBeingEmotion(), Ea::TradeRecv::processTradeRequestContinue(), TmwAthena::TradeRecv::processTradeResponse(), Ea::TradeRecv::processTradeResponseContinue(), EAthena::ChatRecv::processWhisperContinue(), and TmwAthena::ChatRecv::processWhisperContinue().

◆ hasPermission() [2/2]

bool PlayerRelationsManager::hasPermission ( const std::string &  being,
const unsigned int  flags 
) const

Definition at line 328 of file playerrelations.cpp.

330 {
331  if (actorManager == nullptr)
332  return false;
333 
334  const unsigned int rejections = flags
335  & ~checkPermissionSilently(name, flags);
336  const bool permitted = (rejections == 0);
337 
338  if (!permitted)
339  {
340  // execute `ignore' strategy, if possible
341  if (mIgnoreStrategy != nullptr)
342  {
343  Being *const b = actorManager->findBeingByName(
344  name, ActorType::Player);
345 
346  if ((b != nullptr) && b->getType() == ActorType::Player)
347  mIgnoreStrategy->ignore(b, rejections);
348  }
349  }
350 
351  return permitted;
352 }
ActorManager * actorManager
Being * findBeingByName(const std::string &name, const ActorTypeT type) const
Definition: being.h:96
virtual void ignore(Being *const being, const unsigned int flags) const =0
unsigned int checkPermissionSilently(const std::string &player_name, const unsigned int flags) const

References actorManager, checkPermissionSilently(), ActorManager::findBeingByName(), Being::getType(), PlayerIgnoreStrategy::ignore(), mIgnoreStrategy, and ActorType::Player.

◆ ignoreTrade()

void PlayerRelationsManager::ignoreTrade ( const std::string &  name) const

Definition at line 443 of file playerrelations.cpp.

444 {
445  if (name.empty())
446  return;
447 
448  const RelationT relation = getRelation(name);
449 
450  if (relation == Relation::IGNORED ||
451  relation == Relation::DISREGARDED ||
452  relation == Relation::BLACKLISTED ||
453  relation == Relation::ERASED)
454  {
455  return;
456  }
458 }
void setRelation(const std::string &name, const RelationT relation)
PlayerRelationsManager playerRelations

References Relation::BLACKLISTED, Relation::DISREGARDED, Relation::ERASED, getRelation(), Relation::IGNORED, playerRelations, and setRelation().

Referenced by ShopWindow::action(), and RequestTradeListener::action().

◆ init()

void PlayerRelationsManager::init ( )

Initialise player relations manager (load config file etc.)

Definition at line 227 of file playerrelations.cpp.

228 {
229  load();
230 
231  if (!mPersistIgnores)
232  {
233  clear(); // Yes, we still keep them around in the config file
234  // until the next update.
235  }
236 
238  (*it)->updateAll();
239 }
PlayerRelationListeners::const_iterator PlayerRelationListenersCIter

References clear(), FOR_EACH, load(), mListeners, and mPersistIgnores.

Referenced by Client::stateConnectServer1().

◆ isGoodName() [1/2]

bool PlayerRelationsManager::isGoodName ( Being *const  being) const

Definition at line 612 of file playerrelations.cpp.

613 {
614  if (being == nullptr)
615  return false;
616  if (being->getGoodStatus() != -1)
617  return being->getGoodStatus() == 1;
618 
619  const std::string &name = being->getName();
620  const size_t size = name.size();
621 
622  if (size < 3)
623  return true;
624 
625  const std::map<std::string, PlayerRelation *>::const_iterator
626  it = mRelations.find(name);
627  if (it != mRelations.end())
628  return true;
629 
630  const bool status = checkName(name);
631  being->setGoodStatus(status ? 1 : 0);
632  return status;
633 }
void setGoodStatus(const int n)
Definition: being.h:803
int getGoodStatus() const
Definition: being.h:800
static bool checkName(const std::string &name)

References checkName(), Being::getGoodStatus(), Being::getName(), mRelations, Being::setGoodStatus(), and EmoteDB::size().

Referenced by ChatWindow::addWhisperTab(), TradeWindow::initTrade(), BeingPopup::show(), and Being::showName().

◆ isGoodName() [2/2]

bool PlayerRelationsManager::isGoodName ( const std::string &  name) const

Definition at line 597 of file playerrelations.cpp.

598 {
599  const size_t size = name.size();
600 
601  if (size < 3)
602  return true;
603 
604  const std::map<std::string, PlayerRelation *>::const_iterator
605  it = mRelations.find(name);
606  if (it != mRelations.end())
607  return true;
608 
609  return checkName(name);
610 }

References checkName(), mRelations, and EmoteDB::size().

◆ load()

void PlayerRelationsManager::load ( )

Load configuration from our config file, or substitute defaults.

Definition at line 201 of file playerrelations.cpp.

202 {
203  Configuration *const cfg = &serverConfig;
204  clear();
205 
206  mPersistIgnores = (cfg->getValue(PERSIST_IGNORE_LIST, 1) != 0);
209 
210  const std::string ignore_strategy_name = cfg->getValue(
212  const int ignore_strategy_index = getPlayerIgnoreStrategyIndex(
213  ignore_strategy_name);
214 
215  if (ignore_strategy_index >= 0)
216  {
218  [ignore_strategy_index]);
219  }
220 
221  cfg->getList<std::pair<std::string, PlayerRelation *>,
222  std::map<std::string, PlayerRelation *> *>
223  ("player", &(mRelations), &player_conf_serialiser);
224 }
std::string getValue(const std::string &key, const std::string &deflt) const
CONT getList(const std::string &name, CONT empty, ConfigurationListManager< T, CONT > *manager)
void setPlayerIgnoreStrategy(PlayerIgnoreStrategy *const strategy)
int getPlayerIgnoreStrategyIndex(const std::string &shortname)
Configuration serverConfig
static const char *const DEFAULT_PERMISSIONS
static PlayerConfSerialiser player_conf_serialiser
static const char *const PERSIST_IGNORE_LIST
static const char *const DEFAULT_IGNORE_STRATEGY
static const char *const PLAYER_IGNORE_STRATEGY

References CAST_S32, clear(), DEFAULT_IGNORE_STRATEGY, DEFAULT_PERMISSIONS, ConfigurationObject::getList(), getPlayerIgnoreStrategies(), getPlayerIgnoreStrategyIndex(), ConfigurationObject::getValue(), mDefaultPermissions, mPersistIgnores, mRelations, PERSIST_IGNORE_LIST, player_conf_serialiser, PLAYER_IGNORE_STRATEGY, serverConfig, and setPlayerIgnoreStrategy().

Referenced by init().

◆ removeListener()

void PlayerRelationsManager::removeListener ( PlayerRelationsListener *const  listener)
inline

◆ removePlayer()

void PlayerRelationsManager::removePlayer ( const std::string &  name)

Deletes the information recorded for a player.

Definition at line 408 of file playerrelations.cpp.

409 {
410  delete mRelations[name];
411  mRelations.erase(name);
412  signalUpdate(name);
413 }
void signalUpdate(const std::string &name)

References mRelations, and signalUpdate().

Referenced by Setup_Relations::action(), and clear().

◆ setDefault()

void PlayerRelationsManager::setDefault ( const unsigned int  permissions)

Sets the default permissions.

Definition at line 435 of file playerrelations.cpp.

436 {
437  mDefaultPermissions = permissions;
438 
439  store();
440  signalUpdate("");
441 }

References mDefaultPermissions, signalUpdate(), and store().

Referenced by Setup_Relations::apply().

◆ setPersistIgnores()

void PlayerRelationsManager::setPersistIgnores ( const bool  value)
inline

Change the ‘ignore persist’ flag.

Parameters
valueWhether to persist ignores

Definition at line 183 of file playerrelations.h.

184  { mPersistIgnores = value; }

References mPersistIgnores.

◆ setPlayerIgnoreStrategy()

void PlayerRelationsManager::setPlayerIgnoreStrategy ( PlayerIgnoreStrategy *const  strategy)
inline

Sets the strategy to call when ignoring players.

Definition at line 138 of file playerrelations.h.

140  { mIgnoreStrategy = strategy; }

References mIgnoreStrategy.

Referenced by Setup_Relations::action(), and load().

◆ setRelation()

void PlayerRelationsManager::setRelation ( const std::string &  name,
const RelationT  relation 
)

Updates the relationship with this player.

Definition at line 354 of file playerrelations.cpp.

356 {
357  if (localPlayer == nullptr ||
358  (relation != Relation::NEUTRAL &&
359  localPlayer->getName() == player_name))
360  {
361  return;
362  }
363 
364  PlayerRelation *const r = mRelations[player_name];
365  if (r == nullptr)
366  mRelations[player_name] = new PlayerRelation(relation);
367  else
368  r->mRelation = relation;
369 
370  signalUpdate(player_name);
371  store();
372 }
LocalPlayer * localPlayer

References Being::getName(), localPlayer, PlayerRelation::mRelation, mRelations, Relation::NEUTRAL, signalUpdate(), and store().

Referenced by Actions::changeRelation(), ChatWindow::ignoreAllWhispers(), ignoreTrade(), and PlayerTableModel::updateModelInRow().

◆ signalUpdate()

void PlayerRelationsManager::signalUpdate ( const std::string &  name)
private

Definition at line 259 of file playerrelations.cpp.

260 {
262  (*it)->updatedPlayer(name);
263 
264  if (actorManager != nullptr)
265  {
266  Being *const being = actorManager->findBeingByName(
267  name, ActorType::Player);
268 
269  if (being != nullptr &&
270  being->getType() == ActorType::Player)
271  {
272  being->updateColors();
273  }
274  }
275 }
void updateColors()
Definition: being.cpp:2663

References actorManager, ActorManager::findBeingByName(), FOR_EACH, Being::getType(), mListeners, ActorType::Player, and Being::updateColors().

Referenced by removePlayer(), setDefault(), and setRelation().

◆ store()

void PlayerRelationsManager::store ( ) const

Save configuration to our config file.

Definition at line 241 of file playerrelations.cpp.

242 {
243  serverConfig.setList<std::map<std::string,
244  PlayerRelation *>::const_iterator,
245  std::pair<std::string, PlayerRelation *>,
246  std::map<std::string, PlayerRelation *> *>
247  ("player", mRelations.begin(), mRelations.end(),
249 
255 
257 }
void setList(const std::string &name, IT begin, IT end, ConfigurationListManager< T, CONT > *manager)
void setValue(const std::string &key, const std::string &value)

References DEFAULT_IGNORE_STRATEGY, DEFAULT_PERMISSIONS, mDefaultPermissions, mIgnoreStrategy, mPersistIgnores, mRelations, PlayerIgnoreStrategy::mShortName, PERSIST_IGNORE_LIST, player_conf_serialiser, PLAYER_IGNORE_STRATEGY, serverConfig, ConfigurationObject::setList(), Configuration::setValue(), and Configuration::write().

Referenced by Setup_Relations::apply(), setDefault(), and setRelation().

Field Documentation

◆ mDefaultPermissions

unsigned int PlayerRelationsManager::mDefaultPermissions
private

Definition at line 199 of file playerrelations.h.

Referenced by checkPermissionSilently(), getDefault(), load(), setDefault(), and store().

◆ mIgnoreStrategies

std::vector<PlayerIgnoreStrategy *> PlayerRelationsManager::mIgnoreStrategies
private

Definition at line 206 of file playerrelations.h.

Referenced by getPlayerIgnoreStrategies(), and ~PlayerRelationsManager().

◆ mIgnoreStrategy

PlayerIgnoreStrategy* PlayerRelationsManager::mIgnoreStrategy
private

◆ mListeners

std::list<PlayerRelationsListener *> PlayerRelationsManager::mListeners
private

Definition at line 205 of file playerrelations.h.

Referenced by addListener(), init(), removeListener(), and signalUpdate().

◆ mPersistIgnores

bool PlayerRelationsManager::mPersistIgnores
private

Definition at line 197 of file playerrelations.h.

Referenced by getPersistIgnores(), init(), load(), setPersistIgnores(), and store().

◆ mRelations

std::map<std::string, PlayerRelation *> PlayerRelationsManager::mRelations
private

The documentation for this class was generated from the following files: