ChatBlade SDK Documentation

Class   CBIgnoreList
Header   CBIgnoreList.h

Data    Member Summary    Member Details


Information 

This Class is designed to support allowing a Player to Ignore Chat Messages coming from undesirable Characters.  
 
If a Player finds another Character to be obnoxious, the Player can add that Character Name to their Ignore List.  
Any Chat Messages, including /emotes, /auctions, etc.,  coming from Characters on the Ignore List are discarded by ChatBlade and are not displayed.  
 
ChatBlade has implemented the Ignore functionality.  
Players can Ignore other Characters chat by using the /ignore toggle command (by default).  
Players can list the Characters in their Ignore List by typing either "/ignore list" or "/ignorelist" (if the Game is using the Slash Commands defined in SlashCommands.XML).  Note:  "List" is a special parameter.  If there is a Character named "List" that Character shall not be able to be ignored by anyone.  The Game should disallow any Player to created a Character with the name "List".  ChatBlade supplies a Reserved Words file to Game companies which list the few words which should not be used as Character names.  
 
Example Commands:  
    "/ignore LeetDude"  would add LeetDude to the Ignore List.  
    "/ignore LeetDude"  would remove LeetDude from the Ignore List if he was already in.  /Ignore is a Toggle command.  
    "/unignore ChoMamma Inbed" would Add or Remove "ChoMamma Inbed" from the Ignore List.  /Unignore acts the same as /ignore, it is a Toggle.  
    "/ignore List"  would list all the current Character Names in the Ignore List.  
    "/ignorelist"   would list all the current Character Names in the Ignore List.  
 
An instance of this Class does not need to be created by the Developer.  ChatBlade stores an instance in CBChatHandler.  That instance may be referenced by CBData::pChatHandler->m_IgnoreList.  
 
Chat Messages with no Source have a Source assigned of the string "CBNONE".  ChatBlade shall endeavor to ensure that "CBNONE" cannot be added to the Ignore List.  
 
Certain Chat Channels such as CB_CHANNEL_SERVER, CB_CHANNEL_MANDATORY_A, and CB_CHANNEL_CUSTOMER_SERVICE_TELL cannot be Ignored, even if the sender somehow makes it on the Ignore List.  
ChatBlade ensures that Chat Messages on these Channels always are able to be displayed.  
 

Game Developer Implementation:  

Game Developers do not need to make an instance of this Class.  ChatBlade creates an instance stored in CBChatHandler as CBChatHandler.m_IgnoreList.  
Developers should fill in the stub, CBClientImplementation::LoadIgnoreList() with functionality that retrieves a Players Ignore list and adds the Character Names to the Ignore List stored in CBChatHandler.  This can be done by invoking CBData::pChatHandler->m_IgnoreList.AddCharacter() once for each Character Name.  
ChatBlade has already implemented the /Ignore Slash Command functionality.  
Developers should fill in the stub, CBClientImplementation::IsIgnorableCharacterName() to disallow the Ignoring of CSRs and GMs.  
Related Functions:  
    CBClientImplementation::LoadIgnoreList()
    CBClientImplementation::IsIgnorableCharacterName()
    CBSlashCommands::OnCommandIgnore()
    CBSlashCommands::OnCommandIgnoreList()

Source File Comments:  

// Represents a list of Character names which this Player wants to Ignore
// Any tells, emotes, or other communication originating from Character names in the CBIgnoreList should not be displayed
// Each Character should maintain their own Ignore list
// The CBIgnoreList instance should be populated on startup with any previous entries added by the Player
// Typically one might add a Player to their Ignore list with the toggle Command /ignore PlayerName for example
 
// CBIgnoreList is implemented as a set of Character names to Ignore
// Character names are converted to all UPPERCASE prior to storing
 
//  ChatBlade shall check each incoming chat message and if it originates from a Character in the CBIgnoreList that message shall not be stored
 
//  ChatBlade attempts to insure that a Player cannot Ignore messages originating from official game channels and GMs and CSRs
 

Data:  

std::set<CBSTRING> m_IgnoreListSet
        A list of Character names to Ignore (implemented as a Set to avoid duplicates).  
 

Member Function Summary:  

     CBIgnoreList()
        Empty Constructor.  
int  ClearList()
        Empties out all members in the Ignore List.  
int  AddCharacter(CBSTRING sCharacterName)
        Adds a Character name to the Ignore List.  
int  RemoveCharacter(CBSTRING sCharacterName)
        Removes a Character name from the Ignore List.  
int  IsIgnored(CBSTRING sCharacterName)
        Checks to see if a Character name is currently included in the Ignore List.  
int  GetCurrentSize()
        Returns the amount of Character names in the Ignore List.  
 

Member Function Detail:  

      CBIgnoreList::CBIgnoreList()
Comments:
Empty Constructor.  
Parameters:
None
Returns:
None
 
int  CBIgnoreList::ClearList()
Comments:
Empties out all members in the Ignore List.  
Parameters:
None
Returns:
CB_SUCCESS
 
int  CBIgnoreList::AddCharacter( CBSTRING sCharacterName)
Comments:
Adds a Character Name to the Ignore List.  
Chat Messages with Sources that match Character Names in the Ignore List are discarded by ChatBlade.  
ChatBlade Ignores messages on a Character Name basis, not on a Player account basis.  
ChatBlade attempts to prevent Players from Ignoring Customer Service Representatives and GMs.  See CBClientImplementation::IsIgnorableCharacterName()
Called by CBSlashCommands::OnCommandIgnore().  
Parameters:
sCharacterName
    The Character Name of an obnoxious Player to Ignore.  
Returns:
CB_ERROR_CANNOT_IGNORE if the Player tries to Ignore "CBNONE" or attempts to Ignore CSRs or GMs.  
CB_SUCCESS
 
int  CBIgnoreList::RemoveCharacter( CBSTRING sCharacterName)
Comments:
Removes a Character name from the Ignore List.  
After removal, all Chat Messages from the removed Character should now be displayed normally.  
Called by CBSlashCommands::OnCommandIgnore().  
Parameters:
sCharacterName
    A name of a Character that is already in the Ignore List that we now want to unignore.  
Returns:
CB_SUCCESS regardless of if the Name was already in the Ignore List or not.  
 
int  CBIgnoreList::IsIgnored( CBSTRING sCharacterName)
Comments:
Checks to see if a Character name is currently included in the Ignore List.  
Returns CB_TRUE if the Character is currently Ignored and CB_FALSE if it is not in the Ignore List.  
Called by CBChatHandler::AddMessageToTextWindowDatas() and CBSlashCommands::OnCommandIgnore().  
Parameters:
sCharacterName
    The name of a Character which we want to verify the Ignore status of.  
Returns:
CB_FALSE if the Character Name is not Ignored.  
CB_TRUE if the Character Name is Ignored.  
 
int  CBIgnoreList::GetCurrentSize()
Comments:
Returns the amount of Character names in the Ignore List.  
Parameters:
None
Returns:
Returns the amount of Character names in m_IgnoreListSet
 
 

 

 

 

ChatBlade Copyright Flex Dolphynn