'Part message
Parameters: <channel> *( "," <channel> ) [ <Part Message> ]'

def irc_PART(self, prefix, params):

    try:
        groupName = params[0]
        if isinstance(params[0], bytes):
            groupName = params[0].decode(self.encoding)
    except UnicodeDecodeError:
        self.sendMessage(irc.ERR_NOTONCHANNEL, params[0], ':Could    not    decode    your    unicode!')
        return
    if groupName.startswith('#'):
        groupName = groupName[1:]
    if (len(params) > 1):
        reason = params[1]
        if isinstance(reason, bytes):
            reason = reason.decode('utf-8')
    else:
        reason = None
    def cbGroup(group):
        def cbLeave(result):
            self.userLeft(group, self, reason)
        return self.avatar.leave(group, reason).addCallback(cbLeave)
    def ebGroup(err):
        err.trap(ewords.NoSuchGroup)
        self.sendMessage(irc.ERR_NOTONCHANNEL, ('#' + groupName), (':' + err.getErrorMessage()))
    self.realm.lookupGroup(groupName).addCallbacks(cbGroup, ebGroup)
