Create a big enough string in your function that can get all the cvar string and use get_pcvar_string to copy it there.
Check string's length to see if it has anything in it ( "strlen( your_string )" ) and print either the string or your custom message (through client_print, like LearninG's sample)