Text this: Detection of selfish nodes based on credit mechanism in opportunistic networks