<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def privmsg(self, text):
 """ Send text to DCC peer. The text will be padded with a newline if it's a DCC CHAT session. """

        if self.dcctype == 'chat':
            text += '\n'
        return self.send_bytes(self.encode(text))