ChatBlade How To Documentation
How To Use the MFC Test Client

Related ChatBlade Classes and functions:  
    CBMFCTestClient.cpp
    CBSampleChatServer.java
    CBSampleImplementation
    

 
Summary:  
  Note:  The Sample Java Chat Server needs to be running in order to receive Chat Messages.  
  Jump to section   Make sure the Java Sample Chat Server is running.  
  Jump to section Test sending Chat on various Chat Channels.  
  Jump to section Test making an Alias.  
  Jump to section Test the Chat Filter.  
  Jump to section Test Chat History.  
  Jump to section Test Elvish.  
  Jump to section Test Drunken Speech.  
  Jump to section Test Verbose and Concise Chat Formats.  
  Jump to section Test Moods.  
  Jump to section Observe the Debug Chat area.  
  Jump to section Test Chat Channel Monitoring.  
  Jump to section Generate sample Combat Chat Spam.  
  Jump to section Test Priority Chat Channels.  
  Jump to section Test /ChatHelp.  
  Jump to section Test /Tells.  
  Jump to section Test AFK and DND.  
  Jump to section Test creating a Nickname.  
  Jump to section Test Ignoring yourself.  
Jump to section Test the Spam Filter.  
  Jump to section Test Default Slash Commands.  
  Jump to section Test Quick Commands.  
  Jump to section Test Unicode.  
 

 
Details:  
 
Make sure the Java Sample Chat Server is running.  
     The MFC Test Client (CBMFCTestClient.exe) is designed to work with the Sample Java Chat Server, as well as the code contained in CBSampleImplementation.  
The MFC Test Client sends Chat Messages to the Sample Chat Server via UDP.  The Sample Chat Server is hard-coded to propagate the Chat Message to up to 3 recipients.  By default, it only forwards Chat Messages to the local machine (127.0.0.1), but can be configured for remote machines.  
The MFC Test Client listens for Chat Messages coming back from the Chat Server.  It then displays those Chat Messages.  
If the Sample Chat Server is not running, then any /say, /group, /auction or other Chat Messages shall not be displayed in the UI.  
Chat Text not meant to be sent to a Chat Server can still be displayed (such as informational messages from "/alias list" or "/mood list"), but the MFC Test Client needs the Sample Java Chat Server to be running in order to be fully functional.  
The Sample Java Chat Server can be configured via ChatServer.xml.  This XML file contains the UDP ports to send and receive from, the recipient IP Addresses to propagate Chat Messages to, and a flag to determine if UNICODE is being utilized.  
The Sample Chat Server can be started by going to a Command Prompt and typing in "C:\PROGRAM FILES\JAVA\JDK1.6.0_02\BIN\JAVA" CBSampleChatServerApp.  Note:  The path to the JAVA program may be different depending on ones JAVA installation.  
To stop the Sample Chat Server hit Ctrl-C.  
Once the Sample Chat Server is up and running, the MFC Test Client can then be started up and should display Chat Messages sent out to the Sample Chat Server, and received back.  
See How to Compile ChatBlade Sample Programs.  
Example:
 
Test sending Chat on various Chat Channels.  
     Once the Sample Java Chat Server is up and running, test out sending Chat Messages on various Chat Channels.  
The following examples assume one is using the provided Slash Command Interface (SlashCommands.xml).  
Type "/say Hello" to send a Chat Message on the Say Chat Channel (CB_CHANNEL_SAY).  
Type "/g Thanks for inviting me" to send a Chat Message on the Group Chat Channel (CB_CHANNEL_GROUP).  
Type "/guild Forming guild group levels 10 - 20" to send a Chat Message on the Guild Chat Channel (CB_CHANNEL_GUILD).  
Type "/auction Blast Shield E" to send a Chat Message on the Auction Chat Channel (CB_CHANNEL_AUCTION).  
Type "/ooc Anyone see last nights Game?" to send an OOC Chat Message (CB_CHANNEL_OOC).  
Type "/Race What is the name of our Starting City?" to send a Chat Message on the sample Users Race Chat Channel (CB_CHANNEL_RACE).  
Type "/Class Anyone need my old Hang Drum?"  to send a Chat Message on the sample Users Class Chat Channel (CB_CHANNEL_CLASS).  
ChatBlade ships with nearly 100 pre-defined Chat Channels, though they shall likely need to be altered to suit individual Game Design.  Chat Channels are defined in CBConstants.h.  
Notice that by default the Chat Windows in the MFC Test Client are set to Monitor different Chat Channels.  For example:  Window 2 receives Guild Messages but not Group Chat, while Window 1 Monitors most all Chat Channels.  
Sample:
 
Test making an Alias.  
     ChatBlade includes the /alias function which allows Players to create their own Slash Commands which map to existing Slash Commands and the Commands parameters (if any).  
Lets make an Alias of the /follow command which we shall call /tail.  
Type "/alias /tail /follow".  If formatted correctly, a feedback message should be displayed stating that the Alias command was successful.  
Type "/alias list" to see a list of all the current Aliases set up.  
Typing "/tail" should now execute as if the Player had typed in "/follow".  
Lets make another Alias so that we can send /tells to our friend Jill easily.  
Type "/alias /Jill /tell Xynelle,".  
Now we can type in /Jill to send a Chat Message to Jill's Character.  
Type "/Jill Where you at?" to send her Character, Xynelle, a Tell.  
To remove an Alias just use the /Alias command with the Alias to remove, without supplying an existing Slash Command.  
Type "/Alias /Jill" to remove /Jill as an Alias.  Alternatively one can use the /aliasremove Slash Command.  
Sample:  
 
Test the Chat Filter.  
     ChatBlade ships with a Chat Filter of American English bad words.  These words are loaded from Filter.xml when using CBSampleImplementation.  
If the Chat Filter is enabled, ChatBlade shall replace offensive text with !$%@&! style text.  
Type "Nice Butt." and notice that the result is filtered.  
The /filter Slash Command is a toggle Command which enables or disables the Chat Filter.  
Type "/filter" to toggle the Chat Filter off.  Now type "Nice Butt" and notice it is not filtered.  
ChatBlade allows the User to add and remove words from their own Chat Filter, according to the Users sensibilities.  
If the User does not think the word "Butt" should be filtered out, they can remove it from their private Chat Filter using /unfilterword.  Words can be added to the Chat Filter of the User with the /filterword Slash Command.  
Lets test removing "Butt" from the current Chat Filter.  
Force the Chat Filter on with "/filter on".  Type in "Nice Butt" and notice "Butt" has been replaced.  
Type "/unfilterword Butt" to remove "Butt" from the Chat Filter.  
Now type "Nice Butt" again and notice that "Butt" is displayed and is not blocked out.  
Lets add the word "Nice" to the Chat Filter.  
Type "/filterword Nice" to add it to the Chat Filter.  If we then type out "Nice Butt" notice that "Nice" is now filtered.  
Words added to or removed from the Chat Filter are local only to the current User and are not presently persisted.  Game Developers may want to store the changes in the Game Database so that they can be loaded up the next time the Player logs in.  
ChatBlade ignores any punctuation found in a bad word, so "Butt!", "Bu?tt", and "Bu@#tt!!!!!" are all filtered.  
Chat Filtering only works on single words, and not phrases.  In addition all variations of a word need to be added to the Chat Filter for complete coverage.  So "Butt", "Butts", "ButtHead", and others need to be individually added to the Chat Filter.  Using this method, the word "Assassin" is not filtered, nor is "Cockatrice", even though those words may contain substrings that are offensive individually.  
Sample:  
 
Test Chat History.  
     ChatBlade allows Players to repeat previously entered in Chat Text.  This is called Chat History (or Chat Repeat).  
Type in a few lines of Chat.  
Now with the Edit Field containing focus, hit the up-arrow key to cycle back through previously entered in Chat.  
Use the down-arrow key to go the opposite direction.  
This functionality is similar to the old DOS command, DOSKey.  
Each Edit field maintains its own separate Chat History.  
No Sample provided.  
 
Test Elvish.  
     ChatBlade include support for artificial in-game languages such as Elvish, Orcish, Vulcan, or whatever works according to Game Design.  
ChatBlade ships with a sample Elvish language included (Elvish words are stored in Elvish.xml).  
For Characters which are not fluent in the language of a Chat Message, those Characters shall see artificial words instead of the English (or other) words the Chat Message was originally typed in as.  
ChatBlade allows Characters to have partial knowledge of each language.  If a Character knows Elvish 50% then approximately half the words of an Elvish Chat Message shall be in Elvish, and the other half English (or whatever the User typed in originally).  
A Character must be fully fluent (100%) in a language in order to send Chat Messages using that language.  
Characters can change their default in-game language using the /language Slash Command.  
The MFC Test Client starts out with Characters fluent in Elvish and contains a slider to change how fluent the sample Character is, for testing purposes.  
Type "/language list" to see a list of languages the Character is fully fluent in.  
Type "/language Elvish" to change the default language for Chat Messages sent to be Elvish.  
Now type in some normal Chat.  
Type "Testing out the Elvish Language".  Notice is shows up in normal English.  
Now lets change how proficient we are with Elvish.  Go to Options->Elvish Fluency and change the slider to about halfway (representing a mid-level of Elvish knowledge).  
Type "Testing out the Elvish Language" again and notice that some of the words are showing up in Elvish and some in English.  
Slide the Elvish Proficiency to 0 and notice that all the words now show up in Elvish.  
Also notice that the language the Chat Message was sent in, shows up after displaying the Chat Channel (for most Chat Channels).  
ChatBlade uses a hash so each real word should always match the same in-game artificial language word.  
ChatBlade also endeavors to match short real words to shorter artificial words, and long real words to longer artificial words.  
Type "/language" to see the current language used.  
Type "/language None" to change to the default language.  
Sample:  
 
Test Drunken Speech.  
     ChatBlade supports altering Chat Text according to how drunk the Character is.  
ChatBlade supports 4 levels of Intoxication: None, Light, Medium, and Heavy.  
Type "Bartender, another drink please."  
Now lets change how drunk our sample Character is.  Go to Options->Intoxication Level and set it to CB_INTOXICATION_LIGHT.  
Repeat the last line, and notice it is slightly modified.  
Change to CB_INTOXICATION_MEDIUM, repeat the line, and notice the speech is a bit more slurred.  
Change to CB_INTOXICATION_HEAVY, repeat the line, and notice that the speech is substantially modified.  
Chat Intoxication is supported only for English and some Western Character Sets.  
ChatBlade relies on the code in CBClientImplementation to tell ChatBlade how drunk a Character is.  
Sample:  
 
Test Verbose and Concise Chat Formats.  
     ChatBlade includes support for 2 types of Chat Formatting; Verbose and Concise.  
Concise Chat displays the Chat Channel, Language, Mood, and Senders name in a compact format.  
Verbose Chat displays the same information, but in a proper sentence format.  
Players can change the Chat Formatting with the /verbose or /concise Slash Commands.  
Type "/g  Lets go fight the Helium Magnapard".  Notice how Concise Chat is formatted.  
  [Group] You: Lets go fight the Helium Magnapard
Now shift to Verbose Chat Formatting.  
Type "/verbose" and repeat the /group Chat line.  Notice how Verbose formatting looks.  
  You Tell the Group: Lets go fight the Helium Magnapard
Not all Chat Channels support both formats.  For Example:  Auction Chat is always in Concise formatting, while /tells are always displayed in Verbose formatting.  
Sample:  
 
Test Moods.  
     ChatBlade includes support for over 20 Moods in Chat Messages.  New Moods can easily be added, according to Game Design.  
Chat Moods include being Happy, Sad, Angry, Playful, Innocent, Polite, Rude, Thoughtful, Humble, and more.  
Chat Moods are #defined in CBConstants.h.  
Players can change their current Mood using the /mood Slash Command.  
Type "/mood Humble".  Now lets see how it looks.  
Type "/g Can we go on the Butterfly Quest" and see how it shows up.  
  [Group] Humble, You: Can we go on the Butterfly Quest?
Change to Verbose formatting.  Type "/verbose".  Repeat the line and notice how the Mood is now in Adverb format (Humbly instead of Humble).  
  You Humbly Tell the Group: Can we go on the Butterfly Quest?
Players can display their current mood by typing "/mood".  
Players can list the available Moods by typing "/mood List".  
Players can get rid of their current mood by typing "/mood none" which resets the Mood to none.  
Moods show up on most Chat Channels, but not all.  For example, Auction Chat Messages do not display Moods.  
Sample:  
 
Observe the Debug Chat area.  
     The MFC Test Client includes a Debug Chat area at the top of the UI that displays Debug information of the latest Chat Message.  
It is designed to work with the Sample Chat Networking (CBChatSampleNetworkClient).  
The debug information displays the Source, Destination, Chat Channel, Mood, Language, Faction, and Text of the last Chat Message received.  
Type "/say Hi" and notice the Debug information up top.  
S=Vanadia means the Source was Vanadia
D=CBNONE means there was no Destination set for the Chat Message.  
C=51 means that the Chat Message was sent on Chat Channel 51 (CB_CHANNEL_SAY).  
M=0 means that the Chat Message did not have a Mood set.  
L=0 means that the Chat Message did not have a Language set.  
F=0 means that no Faction was set for the Chat Message.  Factions are primarily used for PvP games and ChatBlade uses them to prevent display of Chat Messages from an opposing Faction (Orcs wont see Elf Chat).  
Finally the Chat Text is displayed at the end.  
Lets change our Mood and Language.  
Type "/mood Cheerful".  
Type "/Language Elvish".  
Now lets send a Raid Chat Message and see how it looks in the Debug area.  
Type "/raid All Fighters to the back of the Dragon", and look at the Debug area.  
Notice the changes.  
D=Thorias Raid A means that the Destination of the Chat Message is a RAIDID of "Thorias Raid A".  This is a hard-coded value used by the sample code.  In real Game code this would be whatever ID is used by the Game to represent the RAID.  ChatBlade mandates that each Group, Guild, Raid, and Alliance have a unique ID, that it uses as the Destination of corresponding Chat Messages.  
M=2 means that the Mood is now 2 (CB_MOOD_CHEERFUL).  
L=1 means that the Language of the Chat Message is LANGUAGEID of 1 (CB_LANGUAGE_ELVISH).  
A Chat Server should look at the Chat Channel and the Destination fields of a Chat Message to determine who to propagate a Chat Message to.  
The Debug area displays how Chat is sent using the Sample Networking Code.  Actual Game network data may be arranged differently.  
Sample:  
 
Test Chat Channel Monitoring.  
     Monitoring is the term used by ChatBlade to designate when a Chat Window wants to display Chat Messages from a certain Chat Channel.  The Chat Window is Monitoring the Chat Channel.  
Each Chat Window can have a different set of Chat Channels which it Monitors.  Multiple Chat Windows can Monitor the same Chat Channel.  
Many Games allow the Player to set up their UI to contain Multiple Chat Windows and Chat Tabs.  One Window might be set to only display Combat Spam, while another is devoted to /OOC, /Auction, and /Guild Chat Messages.  
ChatBlade ships with nearly 100 defined Chat Channels to allow easy of refining which Chat Message a Player wants to display, and where (and typically in what color).  
Initially the 3 Chat Windows of the MFC Test Client are set up to Monitor different sets of Chat Channels.  
Chat Window 1 is set up to receive most all Chat Channels.  Window 2 is set up for Guild, Auction, and Status messages.  Window 3 is initially set up only to receive Combat Chat Messages.  
Type "/g Lets Hunt for treasure rather than XP".  Notice that this sends a Chat Message on the Group Chat Channel, but it is only displayed on Window 1.  
Lets now set up Window 3 to receive Group (and other) Chat Messages as well.  
Click the Channels button under Window 3.  Select 'Base Channels' and hit OK.  Now Window 3 is Monitoring a wide assortment of Chat Channels including Group.  
Repeat the /Group Chat message and notice it shows up in both Chat Window 1 and Window 3 now.  
The MFC Test Client only uses a granularity of 8 Channel groupings for ease of coding, but a real Game Client could use a granularity of nearly 100 Chat Channels the User could choose to Monitor for each Chat Window.  
It is expected that each Game shall modify the Chat Channels used according to Game Design.  The Chat Channels included in ChatBlade make a nice base, but likely shall be tweaked for each Game.  
See How to Monitor Chat Channels.  
See How to Add a Chat Channel to ChatBlade.  
No Sample provided:  
 
Generate sample Combat Chat Spam.  
     The MFC test client is not a real Game Client, so there are no Monsters to fight.  
But under Options is the ability to simulate Combat related Chat Messages.  
Go to Options->Generate Combat Spam to spew out some simulated Combat Chat.  
Notice the Combat Chat goes to both Window 1 and Window 3.  
Type "/clear" to clear out all Chat Messages from the Chat Windows.  
Open up Window 3s Chat Channels Monitoring dialog (Channels button under Window 3) and turn off Combat Hits and Misses, Powers, and Combat Healing (leave only Combat various Channels selected).  
Again generate Combat Spam from the Options Menu and notice that while all Combat spam showed up in Window 1, only a couple lines of general Combat Messages showed up in Window 3.  
ChatBlade comes with over 30 different Combat related Chat Channels so Players can show information that is important to them, while suppressing Combat spam they are uninterested in.  
It is up to the real Game Client to generate Combat Chat Messages on the appropriate Chat Channels (Damage Shields on one Channel, while Pet attacks are on another).  
No Sample provided.   
 
Test Priority Chat Channels.  
     ChatBlade includes a small innovation called Priority Chat Channels.  
Priority Chat Channels are designed mainly for Raid Chat, but are also included for Group, Guild, and Alliance Chat.  
Priority Chat Messages go to the same set of Players as non-priority Chat, but they are actually a separate Chat Channel that can be color-coded differently, or assigned to a different Chat Window.  
In many Games when a large Raid is being formed, it is difficult to separate the important Chat Messages from general Raid Chat.  Using the Raid Priority Chat Channel, Group or Raid Leaders can distribute important information.  
Type "/raidpri Group 1 Ready!"
Notice that it should be disseminated to the same Characters as normal Raid Chat (all Raid Members).  
It is up to the Players to only transmit important Chat Messages on the Priority Chat Channels.  ChatBlade does not limit it to leaders of the Group, Guild, or Raid.  
Sample:  
 
Test /ChatHelp.  
     ChatBlade includes built in help for each Slash Command using the /ChatHelp Command.  
Users can type /ChatHelp CommandName to see any usage info and Aliases for a Slash Command.  
Type "/ChatHelp Follow".  Notice it lists information on the /Follow Slash Command.  
Type "/ChatHelp /g" to list all the Slash Commands which send Group Chat.  
Game Developers can supply extensive usage information for each Slash Command if desired.  
Sample:  
 
Test /Tells.  
     The MFC Test Client talks with the Sample Java Chat Server.  
The Sample Java Chat Server is only sample pseudo code and is Hard Coded to send all Chat Messages back to the MFC Test Client (or other IP Address).  
ChatBlade is designed to Echo back to the User when they send a /tell.  
Since the Sample Java Chat Server routes all Chat back to the MFC Test Client, /tell Chat shall be displayed twice in the MFC Test Client; once for the Echo, and once from the Chat Server.  
In a real Game Client the Chat Server would only forward the /tell to the recipient, so the Sender should only see the /tell show up once, when it is Echoed back to them.  
Type "/tell Vanadia Hi".  Notice that the MFC Test Client is configured to simulate a Character named Vanadia.  
ChatBlade changes the Source or Destination name of Chat to "You" if it is the name of the Character.  
Type "/tell Xodar, What is up?".    
Notice that ChatBlade allows either a comma ',' or a space ' ' to delimit a Character Name when using Single word Character Names.  
When Game Design allows for Multi-word Character Names a comma ',' is used to separate the Name from the text of the Chat.
When a /tell is received ChatBlade stores the Character Name of the Sender for use in any future /reply Commands.  
Sample:  
 
Test AFK and DND.  
     ChatBlade has built in Chat support for AFK (Away from Keyboard) and DND (Do No Disturb) settings.  
Players can set themselves as being AFK or in DND mode.  They can also supply optional text for each setting.  
When AFK or in DND mode, any /tells received by the Player shall automatically be replied to.  
If no optional text is supplied for the /afk Command then the default text stating that the User is Away from the Keyboard is sent to anyone sending a /tell to the User.  A similar mechanism works for Do Not Disturb mode.  
It is difficult to see the AFK functionality in the MFC Test Client.  
ChatBlade does not allow a Character to /reply to a /tell if the /tell came from themselves.  
This is done to prevent infinite /tell looping.  If a Character is AFK they automatically /reply to any /tell.  If that /tell came from themselves then they would be endlessly replying to their reply.  ChatBlade prevents this.  
But this prevention makes it difficult to see the workings of /afk behavior in the MFC Test Client.  Once a real Chat Server is used, rather than the Sample Java Chat Server, it should be easier to test /afk behavior.  
Type "/afk" to flag your Character as being Away from Keyboard.  
Type "/dnd I am busy Crafting and cannot be disturbed" to flag your Character as being in Do No Disturb mode.  
In either mode, any /tells received shall be automatically replied to (either with the supplied text, or default AFK/DND text).  If a Character is both AFK and DND only the AFK text shall be sent.  
AFK and DND are toggle commands.  
Type "/afk" again to remove the AFK setting.  
Type "/dnd" to toggle off Do Not Disturb mode.  
ChatBlade handles the Chat mechanism of AFK and DND but most Games also do a bit more when these settings are used.  
Typically AFK or DND flagged Characters might have an AFK word next to their displayed Character Name (or a different color Name text indicating AFK or DND).  In addition, Characters flagged as AFK or DND should display that they are AFK/DND when another Character does a /who command to list Characters on the server.  
This additional, non-Chat functionality is beyond the scope of ChatBlade, so Game Developers should modify the AFK and DND Slash Command code to implement this functionality if desired.  
ChatBlade is configured to return CB_ERROR_NOT_IMPLEMENTED for any Slash Command which is not fully implemented by ChatBlade (such as /follow, /mapwindow, and most non-Chat Slash Commands).  In Debug compilations, ChatBlade shall display any Return Codes which are not CB_SUCCESS.  
Sample:  
 
Test creating a Nickname.  
     ChatBlade came up with an innovation called a Nickname, to help make /tells easier to use.  
A Nickname is a short, easy to remember name for another Players Character.  
Nicknames are primarily used in /tells.  
A Players created Nicknames are only used by that Player and are not shared with other Players.  Each Player has their own set of Nicknames they have created for other Characters.  
ChatBlade expands any Nicknames encountered into their full Character Name before sending a /tell.  
Type "/Nickname Pal, Palladia".  This creates a Nickname called "Pal" that expands into the Character Name "Palladia".  
Type "/tell Pal, Hello".  Notice how the /tell went to Palladia.  
Nicknames are very useful when Characters have hard to type Character Names.  
Type "/nickname Ill, Illuminarniesse".  
Nicknames are also useful to send information to ones Real Life Friends.  
Type "/nickname Jill, Xynelle".  Now one can send a /tell to Jill and have it go to her Character Xynelle.  
Type "/nickname list" to display the Nicknames one has set up.  (The MFC Test Client sets up a couple).  
To remove a Nickname just supply the Nickname parameter without a Character Name to expand to.  
Type '/nickname Jill" to remove Jill as being a Nickname for Xynelle.  /removenickname can also be used.  
If a Player creates a Nickname that is an actual Character Name of a real Character, then that Character may not be able to receive /tells from the Player until the conflicting Nickname is removed.  
Sample:  
 
Test Ignoring yourself.  
     ChatBlade includes support for Ignoring any Chat Messages received from sources on the Players Ignore List.  
Sometimes one encounters foul-mouthed or obnoxious Players that one wants to Ignore.  
ChatBlade shall discard any Chat Messages coming from Characters that have been Ignored.  
Type "/ignore Vanadia".  This test should add Vanadia to the Ignore list.  Vanadia is the sample Character Name representing the Player using the MFC Test Client.  
So Ignoring Vanadia should block any Chat Messages sent by yourself.  
Type "/g Can anyone see this?", and notice that the Group Chat Message is not displayed.  Since it comes from a Character on the Ignore list (Vanadia) it is discarded by ChatBlade before it can be shown.  
Type "/Ignore list" to see a list of Characters currently being Ignored.  
Internally ChatBlade UPPERCASEs Character Names, Slash Commands, and other values so that when comparing strings the comparison is always between Uppercase versions (this makes most things non-case sensitive).  So sending a /tell to VanaDIA is the same as sending a /tell to VANAdia.  /FOLLow is the same as /follOW.  
To remove a Character from the Ignore List, just Ignore them again (/ignore is a toggle).  
Type "/ignore Vanadia" to remove Vanadia from the Ignore list and be able to see your own Chat.  Alternatively one can use the /unignore Slash Command.  
Type "/g Can you hear me now?" and notice that the Group Chat should now be displayed from Vanadia.  
Sample:  
 
Test the Spam Filter 
     ChatBlade includes a Spam Filter.   
Any Chat Messages containing words found in the Spam Filter are blocked and are not Displayed.   
Some unscrupulous companies have resorted to using Spam Bots to advertise their services, thereby reducing the usefulness of the Chat Window, due to a preponderance of Spam.   
Players can Add and Remove words to the Spam Filter with the /blockword and /unblockword Slash Commands (by default)
Type "Come to http://www.wepowerlevelyou.com".  Notice that the Chat Message is displayed normally.   
Now lets block any Chat Messages containing the string "http" 
Type "/block http".  "Http" is now added to the Spam Filter and the Filter is enabled.   
Type "Come to http://www.wepowerlevelyou.com" again and notice that it no longer shows up.   
Internally ChatBlade stores the Spam Strings in UPPERCASE.  Entire strings, even those containing spaces, may be added to the Spam Filter.  
To disable the Spam Filter use the /unblockspam Slash Command.   
Type "/UnBlockSpam" to disable the Spam Filter.   
Type "Come to http://www.wepowerlevelyou.com" and notice that it is once again displayed.  
The Spam Filter is different from the Chat Filter in that it filters out entire Chat Messages rather than blocking portions of their text.  
The Spam Filter differs from the Ignore List in that blocking is based upon message content rather than source.  
Some Chat Messages (such as Tells from Customer Service) are exempt from Spam Filtering and shall not be blocked.  
Sample:  
 
Test Default Slash Commands.  
     Default Slash Commands are the Slash Commands used if Chat Text does not start with a Slash Command.  
Typically the Default Slash Command starts out as being /say.  Anything a Player types shall be the same as if they typed in /say Text.  
ChatBlade allows each Chat related Edit Field to have a different Default Slash Command.  
The MFC Test Client has 3 Chat Edit Fields, one for each Chat Window.  
Above the Edit Field, one can see that Edit Fields Default Slash Command.  
Window 1 is set to default to /say.  Window 2 defaults to /group.  Window 3 defaults to sending a /tell to Irridia.  
Type "Hello" in Edit Field 2.  Notice that it creates a Group Chat Message.  
Any Chat that does not start with a Slash character '/' gets the Default Slash Command for that Edit Field prepended to the Chat.  
Type "/auction Lightning Sword" in Edit Field 2.  Notice that it did not go to the Group Chat Channel, but instead went to the Auction Channel, as specified.  
Type "How are you?" in Edit Field 3.  Notice it sent a /tell to Irridia.  
The MFC Test Client allows the User to change the Default Slash Command for each Edit Field.  
Lets change Edit Field 3 to default to /ooc.  
Click on /tell Irridia, above Edit Field 3 and replace it with /ooc, then hit enter.  
Now type "Anyone see the Game?" in Edit Field 3.  Notice it now goes to the /OOC Chat Channel.  
A Default Slash Command needs to start with a Slash character '/'.  If an incorrect Default Slash Command is set, then ChatBlade shall change it to be /CBSAY, which is the same as /say.  
If a Game uses Chat Tabs which share an Edit Field, and the Edit Fields Default Slash Command should change depending on which Chat Tab is active, then the Developer should change the Default Slash Command whenever the User changes Chat Tabs.  
No Sample provided.   
 
Test Quick Commands.  
     ChatBlade includes support for Quick Commands.  Quick Commands are single Characters that expand to common Chat Commands such as /group, /guild, or /emote.  
':' Expands to /emote
';' Expands to /emote
'!' Expands to /say
'@' Expands to /guild
'#' Expands to /group
'$' Expands to /auction
'^'   Expands to /raid
Type "# OOM".  Notice it gets sent on the Group Chat Channel.  
Type "^ I need an armor Buff" to send a quick Chat Message to ones Raid.  
Sample:  
 
Test Unicode.    
     ChatBlade was built from the ground up with Unicode support in mind.  
Unicode support allows Players from any country to type Chat in their native language.  
Korean Chat can intermingle with Swedish and Chinese characters.  
ChatBlade uses a string abstraction called CBSTRING.  CBSTRING is #defined as std::string if UNICODE is not #defined, and as std::wstring if UNICODE is #defined before compilation.  std::wstring can handle Unicode characters.  
Single byte character set  std:strings are easier to debug, but it is recommended that UNICODE be #defined so that the Game can be more easily distributed world-wide.  
Paste "/g 온라인 게임이다 is Korean" into the MFC Test Client (shift-insert to paste).  Notice that the Korean text coexists with English Characters without problem (if the MFC Test Client was built with UNICODE and _UNICODE #defined).  
Sample:  
 
    
 

 

Code Samples:  

 
Starting the Sample JAVA Chat Server.  
Edit the Batch file to point at the JAVA installation then execute the Batch file from a Command prompt.  
     C:\ChatBlade\Source\CBSampleChatServer>RunCBSampleServer.bat
 
Sending Chat on various Chat Channels.  Type the following lines into Edit Field 1.  
     /say Hello
/g Thanks for inviting me
/guild Forming guild group levels 10 - 20
/auction Blast Shield E
/ooc Anyone see last nights Game?
/Race What is the name of our Starting City?
/Class Anyone need my old Hang Drum?
 
Testing out the /Alias Command
     /alias /tail /follow
/alias list
/tail
/alias /Jill /tell Xynelle,
/Jill Where you at?
/Alias /Jill
/aliasremove /tail
 
Testing out the Chat Filter.  
     Nice Butt
/filter
Nice Butt
/filter on
Nice Butt
/unfilterword Butt
Nice Butt
/filterword Nice
Nice Butt
Ni!!!ce Butt
Cockatrice
 
Testing out Elvish.  
     /language list
/language Elvish
Testing out the Elvish Language
Now to to Options->Elvish Fluency and change it to about 50%.  
     Testing out the Elvish Language
Now to to Options->Elvish Fluency and change it to 0%.  
     Testing out the Elvish Language
/language
/language None
 
Testing out Chat Intoxication.  
     Bartender, another drink please.
Go to Options->Intoxication Level and set it to CB_INTOXICATION_LIGHT. 
     Bartender, another drink please.
Go to Options->Intoxication Level and set it to CB_INTOXICATION_MEDIUM. 
     Bartender, another drink please.
Go to Options->Intoxication Level and set it to CB_INTOXICATION_HEAVY. 
     Bartender, another drink please.
 
Testing Verbose and Concise Chat Formatting.  
     /g  Lets go fight the Helium Magnapard
/verbose
/g  Lets go fight the Helium Magnapard
/auction Thunder Sword
/tell Irridia, Hey
 
Testing Moods.  
     /mood Humble
/concise
/g Can we go on the Butterfly Quest
/verbose
/g Can we go on the Butterfly Quest
/mood
/mood List
/Auction Thunder Sword
/mood none
 
Using the Debug Chat Message Display.  
     /say Hi
/mood Cheerful
/Language Elvish  (Make sure the Elvish Fluency is set to 100% in Options)
/raid All Fighters to the back of the Dragon
 
Testing out the Raid Priority Chat Channel.  
     /raidpri Group 1 Ready!
 
Testing /ChatHelp.    
     /ChatHelp Follow
/ChatHelp /g
 
Testing /Tells.  
     /tell Vanadia Hi
/tell Xodar, What is up?
/reply Nada
 
Testing AFK and DND.  
     /afk
/dnd I am busy Crafting and cannot be disturbed
/tell Vanadia, Yo
/afk
/dnd
 
Testing Nicknames.  
     /Nickname Pal, Palladia
/tell Pal, Hello
/nickname Ill, Illuminarniesse
/nickname Jill, Xynelle
/Tell Jill, Wanna hit the Movies after the Raid?  
/nickname list
/nickname Jill
/removenickname Ill
 
Ignoring Vanadia (the Clients sample Users Character name).  
     /ignore Vanadia
/g Can anyone see this?
/Ignore list
/ignore Vanadia
/unignore Phrost
/g Can you hear me now?
 
Testing the Spam Filter.  
     Come to http://www.wepowerlevelyou.com
/block http
Come to http://www.wepowerlevelyou.com
/UnBlockSpam
Come to http://www.wepowerlevelyou.com
 
Testing Quick Commands.  
     # OOM
^ I need an armor Buff
 
Testing Unicode.  
     /g 온라인 게임이다
 
    
    
 
    
    
    
 
    

 

 

 

 

 

 
 
 
 
ChatBlade Copyright Flex Dolphynn