def is_self(conn, target):
 if re.search('(^..?.?.?self|{})'.format(re.escape(conn.nick)), target, re.I):
  return True
 else:
  return False

def is_self ( conn , target ) : if re . search ( '(^..?.?.?self|{})' . format ( re . escape ( conn . nick ) ) , target , re . I ) : return True else : return False
checks if a string is "****self" or contains conn .