How to display only the status message to anonymous users in page.tpl.php
This seems like a similar question to yours regarding printing messages. Additionally, this indicates that the message type is stored within the message object. You should just be able to iterate through a message object to get it. Something like 

foreach (drupal_get_messages($messagesVariable) as $type =&gt; $messages) { 
    if (($status_heading[$type] != 'error') || ($status_heading[$type] != 'warning')) {
        *perform your given action here*
    }
}