I'm attempting to make use of this code to show something within the 'single.php' file on the party's theme once the publish is of the certian catagory.

$cat = get_query_var('cat');
if ($cat == '4') {
echo "post";
} else {
echo "no data";
}

However it appears to disregard the $cat var query and therefore on every publish display no data message.

The kitty var isn't within the url.

I guess wordpress don't set %cat% query variable because publish might be recognized for many groups.

Try something similar to this:

if ( in_category(4, get_the_ID()) publish"
else

Remember that you ought to call get_the_ID function once you call the_publish