chathistory plugin: Make sure that the commandline string contains something before parsing it
chathistory plugin: Fix potential segmentation fault when iterating through the user's messages