|
Planeshift
|
AdviceManager keeps track of all the invitations of any kind that are pending, using a collection of PendingAdvice objects. More...
#include <advicemanager.h>
Public Member Functions | |
| void | AddAdvisor (Client *client) |
| Adds a new advisor available to answer questions. More... | |
| AdviceManager (psDatabase *db) | |
| void | AdviceRequestTimeout (AdviceSession *adviceSession) |
| Resend request for advice due to timeout. More... | |
| void | CancelAdvisorSession (gemActor *who, AdviceSession *adviceSession, const char *msg) |
| Remove advise session due to timeout. More... | |
| bool | GetAdvisorMode (int id, int connectionId) |
| Retrieve the clients advisor mode. More... | |
| void | HandleAdviceMessage (MsgEntry *pMsg, Client *client) |
| void | RemoveAdvisor (uint32_t id, int connectionId) |
| Remove advisor available to answer questions. More... | |
| void | RemoveSession (AdviceSession *adviceSession) |
| virtual | ~AdviceManager () |
Public Member Functions inherited from MessageManager< AdviceManager > | |
| void | HandleMessage (MsgEntry *msg, Client *client) |
| Transfers the message to the manager specific function. More... | |
| void | Subscribe (FunctionPointer fpt, msgtype type, uint32_t flags=0x01) |
| Subscribes this manager to a specific message type with a custom callback. More... | |
| bool | Unsubscribe (msgtype type) |
| Unsubscribes this manager from a specific message type. More... | |
| bool | Unsubscribe (FunctionPointer handler, msgtype type) |
| Unsubscribes a specific handler from a specific message type. More... | |
| bool | UnsubscribeAll () |
| Unsubscribes this manager from all message types. More... | |
| virtual | ~MessageManager () |
| Unsubscribes all messages then destroys this object. More... | |
Public Member Functions inherited from MessageManagerBase | |
| csArray< csString > | DecodeCommandArea (Client *client, csString target) |
| Decodes an area: expression. More... | |
| gemObject * | FindObjectByString (const csString &str, gemActor *me) const |
| Find the object we are referring to in str. More... | |
| Client * | FindPlayerClient (const char *name) |
| Finds Client* of character with given name. More... | |
| virtual bool | Verify (MsgEntry *pMsg, unsigned int flags, Client *&client) |
Protected Member Functions | |
| bool | FloodControl (csString &newmessage, Client *client) |
| void | HandleAdviceList (Client *advisor) |
| void | HandleAdviceRequest (Client *advisee, csString message) |
| void | HandleAdviceResponse (Client *advisee, csString sAdvisee, csString message) |
| void | HandleAdviseeList (Client *advisor) |
| void | HandleListAdvisors (Client *advisor) |
Protected Attributes | |
| csHash< AdviceSession * > | AdviseeList |
| size_t | advisorPos |
| csArray< AdvisorStruct > | advisors |
| psDatabase * | database |
Additional Inherited Members | |
Public Types inherited from MessageManager< AdviceManager > | |
| typedef void(AdviceManager::* | FunctionPointer) (MsgEntry *, Client *) |
AdviceManager keeps track of all the invitations of any kind that are pending, using a collection of PendingAdvice objects.
An invitation is pending between the time that the Noob sends the invitation and when an Advisor sends a response.
Definition at line 77 of file advicemanager.h.
| AdviceManager::AdviceManager | ( | psDatabase * | db | ) |
|
virtual |
| void AdviceManager::AddAdvisor | ( | Client * | client | ) |
Adds a new advisor available to answer questions.
| client | The player client. |
| void AdviceManager::AdviceRequestTimeout | ( | AdviceSession * | adviceSession | ) |
Resend request for advice due to timeout.
| adviceSession | The session that has expired |
| void AdviceManager::CancelAdvisorSession | ( | gemActor * | who, |
| AdviceSession * | adviceSession, | ||
| const char * | msg | ||
| ) |
Remove advise session due to timeout.
| who | The actor. |
| adviceSession | The session that has expired. |
| msg | A message for the player. |
|
protected |
Retrieve the clients advisor mode.
| id | The id of the advisor to remove ( same as player ID ) |
| connectionId | The client id that client dropping advisor role. |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| void AdviceManager::RemoveAdvisor | ( | uint32_t | id, |
| int | connectionId | ||
| ) |
Remove advisor available to answer questions.
| id | The id of the advisor to remove ( same as player ID ) |
| connectionId | The client id that client dropping advisor role. |
| void AdviceManager::RemoveSession | ( | AdviceSession * | adviceSession | ) |
|
protected |
Definition at line 137 of file advicemanager.h.
|
protected |
Definition at line 139 of file advicemanager.h.
|
protected |
Definition at line 138 of file advicemanager.h.
|
protected |
Definition at line 140 of file advicemanager.h.